Page 1 of 1

Nagios XI(Evaluation) mysql Error

Posted: Thu Jan 20, 2011 6:38 am
by shabeer
Hi,

Thanks For support

While i installing Nagios XI on CentOS i got error in 3rd step(./3-dbservers) the error as follows,

[root@localhost nagiosxi]# ./3-dbservers
Initializing PostgresQL...
./3-dbservers: line 13: service: command not found
Starting PostgresQL...
./3-dbservers: line 17: service: command not found
Restarting PostgresQL...
./3-dbservers: line 23: service: command not found
Starting MySQL...
./3-dbservers: line 31: service: command not found
Setting MySQL root password...
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
MySQL root password set to: nagiosxi
[root@localhost nagiosxi]#

Please help me to sort out this issue at earliest possible

Thanks.
Shabeer

Re: Nagios XI(Evaluation) mysql Error

Posted: Thu Jan 20, 2011 10:11 am
by tonyyarusso
By any chance are you installing this on a system that is running Gnome?

Re: Nagios XI(Evaluation) mysql Error

Posted: Thu Jan 20, 2011 9:21 pm
by shabeer
Yes, the system running in Gnome

i am fresher in linux pls help me to sort out this issue.

Thanks,
shabeer

Re: Nagios XI(Evaluation) mysql Error

Posted: Fri Jan 21, 2011 12:28 am
by shabeer
My services command included in sbin directory that is "/sbin/services"

[root@localhost /]# /sbin/service postgresql start
Initializing database: mkdir: cannot create directory `/var/lib/pgsql/data/pg_log': File exists
[FAILED]
Starting postgresql service: [FAILED]
[root@localhost /]#

faled to start postgresql

how to exclude it from sbin directory.....pls help

thanks,
shabeer

Re: Nagios XI(Evaluation) mysql Error

Posted: Fri Jan 21, 2011 3:22 pm
by mguthrie
I think postgres is already running, try:

Code: Select all

/sbin/service restart
You'll need to make sure that the service command is added to your binary $PATH so that you can execute the commands:

Code: Select all

service <servicename> restart
Once you can run that, you'll want to run the installer scripts starting from 3-dbservers.

Re: Nagios XI(Evaluation) mysql Error

Posted: Sun Jan 23, 2011 11:57 pm
by shabeer
Hi all,

Thanks for support

I tried the command but,

[root@localhost ~]# /sbin/service postgresql restart
Stopping postgresql service: [FAILED]
Initializing database: mkdir: cannot create directory `/var/lib/pgsql/data/pg_log': File exists
[FAILED]
Starting postgresql service: [FAILED]
[root@localhost ~]#

the postgresql failed to restart

Re: Nagios XI(Evaluation) mysql Error

Posted: Mon Jan 24, 2011 11:54 am
by mguthrie
Are you installing this in a "clean" (aka freshly installed) system? I haven't seen this particular issue on CentOS before.

Re: Nagios XI(Evaluation) mysql Error

Posted: Mon Jan 24, 2011 10:06 pm
by shabeer
yes its freshly installed OS

Re: Nagios XI(Evaluation) mysql Error

Posted: Tue Jan 25, 2011 10:37 am
by tonyyarusso
I believe you will probably need to start over, and add /sbin to your $PATH before running the installation scripts. For some bizarre reason CentOS normally includes this, but removes it if you install Gnome.