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
Nagios xi(Evaluation) mysql Error
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
Re: Nagios xi(Evaluation) mysql Error
By any chance are you installing this on a system that is running Gnome?
-
- Posts: 31
- Joined: Fri Dec 31, 2010 10:57 am
Re: Nagios xi(Evaluation) mysql Error
Yes, the system running in Gnome
i am fresher in linux pls help me to sort out this issue.
Thanks,
shabeer
i am fresher in linux pls help me to sort out this issue.
Thanks,
shabeer
-
- Posts: 31
- Joined: Fri Dec 31, 2010 10:57 am
Re: Nagios xi(Evaluation) mysql Error
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
[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
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am
Re: Nagios xi(Evaluation) mysql Error
I think postgres is already running, try:
You'll need to make sure that the service command is added to your binary $PATH so that you can execute the commands:
Once you can run that, you'll want to run the installer scripts starting from 3-dbservers.
Code: Select all
/sbin/service restart
Code: Select all
service <servicename> restart
-
- Posts: 31
- Joined: Fri Dec 31, 2010 10:57 am
Re: Nagios xi(Evaluation) mysql Error
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
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
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am
Re: Nagios xi(Evaluation) mysql Error
Are you installing this in a "clean" (aka freshly installed) system? I haven't seen this particular issue on CentOS before.
-
- Posts: 31
- Joined: Fri Dec 31, 2010 10:57 am
Re: Nagios xi(Evaluation) mysql Error
yes its freshly installed OS
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
Re: Nagios xi(Evaluation) mysql Error
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.