Nagios xi(Evaluation) mysql Error

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
shabeer
Posts: 31
Joined: Fri Dec 31, 2010 10:57 am

Nagios xi(Evaluation) mysql Error

Post 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
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA

Re: Nagios xi(Evaluation) mysql Error

Post by tonyyarusso »

By any chance are you installing this on a system that is running Gnome?
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
shabeer
Posts: 31
Joined: Fri Dec 31, 2010 10:57 am

Re: Nagios xi(Evaluation) mysql Error

Post by shabeer »

Yes, the system running in Gnome

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

Thanks,
shabeer
shabeer
Posts: 31
Joined: Fri Dec 31, 2010 10:57 am

Re: Nagios xi(Evaluation) mysql Error

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios xi(Evaluation) mysql Error

Post 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.
shabeer
Posts: 31
Joined: Fri Dec 31, 2010 10:57 am

Re: Nagios xi(Evaluation) mysql Error

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios xi(Evaluation) mysql Error

Post by mguthrie »

Are you installing this in a "clean" (aka freshly installed) system? I haven't seen this particular issue on CentOS before.
shabeer
Posts: 31
Joined: Fri Dec 31, 2010 10:57 am

Re: Nagios xi(Evaluation) mysql Error

Post by shabeer »

yes its freshly installed OS
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA

Re: Nagios xi(Evaluation) mysql Error

Post 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.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/