[opencms-dev] Configuration wizard fails on FC4 / MySQL
mwpowell at adelphia.net
Tue Nov 22 01:31:35 CET 2005
For the benefit of others here. I was able to resolve this issue with changes to the configuration of SElinux that is delivered with Fedora Core 4. Although SElinux was delivered with FC3 as well, it was only limited to a few daemon processes. In FC4 it acts as protection for MySQL and prohibits the connections to the mysqld (even for localhost).
You must change SElinux configuration options to allow connections to the mysqld. I temporarily disabled my SElinux by making changes to the 'config' file in the /etc/selinux directory.
I changed following line:
SELINUX = enforcing
SELINUX = disabled
So my config file is as follows:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
Please note that this disables SElinux and you will need to change specific mysql settings for SElinux when you change it back to 'enforcing' mode. But at least this is a temporary fix for the install of OpenCMS.
Many thanks to Christof for your suggestions and putting me on the right path to looking into what was blocking the mysql connection. The remainder of the config wizard worked great!
---- Michael Powell <mwpowell at adelphia.net> wrote:
> Thanks for your reply. I saw mention of this in the archives, and I tried this solution. However, I seem to be getting the same error. Must I restart Tomcat or MySQL for this to take effect?
> The error I'm receiving is:
> Database could not be created!
> Error connecting to database using: "jdbc:mysql://localhost:3306/".
> java.sql.SQLException: Unable to connect to any hosts due to exception:
> java.net.SocketException: Invalid argument or cannot assign requested address **
> BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: Invalid argument or
> cannot assign requested address STACKTRACE: java.net.SocketException: Invalid
> argument or cannot assign requested address at
> java.net.PlainSocketImpl.socketConnect(Native Method)
> ---- Christof Dallermassl <ce-christof.dallermassl at bearingpoint.com> wrote:
> > Hi!
> > I had to change the order in /etc/hosts, so localhost is before
> > localhost.localdomain:
> > 127.0.0.1 localhost localhost.localdomain opencms
> > as otherwise mysql won't let you connect.
> > try to telnet to port 3306 (mysql) - when it works, the opencms setup worked
> > as well.
> > regards
> > Christof
> > > I am unable to complete the opencms setup wizard on linux fedora core 4.
> > >
> > > My environment information is as follows:
> > >
> > > Linux Fedora Core 4
> > > MySQL 4.1.11
> > > Java 1.4.2_10 SDK
> > > OpenCMS 6.02
> > > Tomcat 4.1
> > >
> > > When stepping through the OpenCMS setup wizard, the wizard fails to create
> > > the opencms database in mysql with an java exeption error message that says
> > > it cannot connect to the mysql database.
> > >
> > > I am able to login to mysql through the command line and add users and
> > > query tables. I have successfully setup opencms on an NT box but I must be
> > > missing something with the linux setup. I checked all logs and they did not
> > > yeild any information.
> > >
> > > Is there something basic that I am missing with linux? In the my.cnf file
> > > perhaps?
> > >
> > > Mike
> > >
> > >
> > > _______________________________________________
> > > This mail is send to you from the opencms-dev mailing list
> > > To change your list options, or to unsubscribe from the list, please visit
> > > http://mail.opencms.org/mailman/listinfo/opencms-dev
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please visit
> > http://mail.opencms.org/mailman/listinfo/opencms-dev
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
More information about the opencms-dev