Page 1 of 2

Error while applying Configuration

Posted: Sun May 05, 2013 1:52 am
by sarfarosh
Hello Guys,
Today i have have done a clean installation of Nagios XI 2012R 1.8, after applying the setting am getting the error

Code: Select all

Command submitted for processing...
Waiting for configuration verification....................................................
Backend login to the Core Config Manager failed.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good 
Httpd Error Log says

Code: Select all

[root@nagios155 scripts]# tail -f /var/log/httpd/error_log
[Sun May 05 12:14:46 2013] [notice] Digest: generating secret for digest authentication ...
[Sun May 05 12:14:46 2013] [notice] Digest: done
[Sun May 05 12:14:46 2013] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Sun May 05 12:14:46 2013] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sun May 05 12:15:07 2013] [error] [client 120.62.186.251] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/admin/
[Sun May 05 12:15:07 2013] [error] [client 120.62.186.251] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/admin/
[Sun May 05 12:15:07 2013] [error] [client 120.62.186.251] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/admin/
[Sun May 05 12:15:07 2013] [error] [client 120.62.186.251] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/admin/
[Sun May 05 12:15:07 2013] [error] [client 120.62.186.251] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/admin/
[Sun May 05 12:15:07 2013] [error] [client 120.62.186.251] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/admin/
tail -f /usr/local/nagiosxi/var/cmdsubsys.log says

Code: Select all

[root@nagios155 scripts]# tail -f /usr/local/nagiosxi/var/cmdsubsys.log
.......
PROCESSED 0 COMMANDS
 NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosql/index.php
CMDLINE
nagiosql.login: Permission denied
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUsername=nagiosxi&tfPassword=n@gweb' -O nagiosql.loginLOGIN SUCCESSFUL!
NAGIOSQL LOGIN FAILED!
OUTPUT=NAGIOSQL LOGIN FAILED!
RETURNCODE=2



fore or while processing the request..	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request..	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request..	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request..	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.	SQL: 	SQL Error [nagiosxi] :</b> FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally


Re: Error while applying Configuration

Posted: Mon May 06, 2013 10:53 am
by scottwilkerson
is your hard drive full?

Code: Select all

df -h
df -i
If not, is postgresql running

Code: Select all

service postgresql status

Re: Error while applying Configuration

Posted: Tue May 07, 2013 3:48 am
by sarfarosh
Hello Scott,
There is ample of space for nagios in Server below are the Output

Code: Select all

[root@nagios155 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       72G   16G   53G  23% /
/dev/sda1              99M   13M   81M  14% /boot
tmpfs                 2.0G     0  2.0G   0% /dev/shm

Code: Select all

[root@nagios155 ~]# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/mapper/VolGroup00-LogVol00
                     19431424  248610 19182814    2% /
/dev/sda1              26104      35   26069    1% /boot
tmpfs                 505450       1  505449    1% /dev/shm

Code: Select all

[root@nagios155 ~]# service postgresql status
postmaster (pid 21472 18427 9651 9127 8575 8543 8403 8401 8400 8399 8398 8348 8108 8107 8106 8104 8102 1968 1966 1962 1959) is running...

Re: Error while applying Configuration

Posted: Tue May 07, 2013 10:40 am
by abrist
Lets stop postgres, kill all postgres procs, and then bring postgres back up:

Code: Select all

service postgresql stop
killall postgres 
Check to make sure they are gone:

Code: Select all

ps -aef | grep postgres
Start postgres:

Code: Select all

service postgres start

Re: Error while applying Configuration

Posted: Wed May 08, 2013 3:30 am
by sarfarosh
Hello Abrist,
have tried killing all POSTGRESQL running process & restarting Postgresql but this didn't help.

Below is latest HTTPD error log

Code: Select all

[root@nagios155 ~]# tail -f /var/log/httpd/error_log
[Wed May 08 13:42:43 2013] [notice] caught SIGTERM, shutting down
[Wed May 08 13:44:11 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed May 08 13:44:11 2013] [notice] Digest: generating secret for digest authentication ...
[Wed May 08 13:44:11 2013] [notice] Digest: done
[Wed May 08 13:44:16 2013] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Wed May 08 13:44:16 2013] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Wed May 08 13:46:59 2013] [error] [client 183.83.234.5] PHP Warning:  pg_pconnect(): PostgreSQL link lost, unable to reconnect in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/index.php?
[Wed May 08 13:46:59 2013] [error] [client 183.83.234.5] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/index.php?
[Wed May 08 13:46:59 2013] [error] [client 183.83.234.5] PHP Warning:  pg_pconnect(): PostgreSQL link lost, unable to reconnect in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/index.php?
[Wed May 08 13:47:00 2013] [error] [client 183.83.234.5] PHP Warning:  pg_pconnect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused\n\tIs the server running on host "localhost" and accepting\n\tTCP/IP connections on port 5432? in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: http://123.176.37.155/nagiosxi/index.php?

Re: Error while applying Configuration

Posted: Wed May 08, 2013 9:55 am
by abrist
Did you change any of the default database passwords? Looks like the system is failing to login to ql:

Code: Select all

nagiosql.login: Permission denied
What version of CentOS are you running?
Was this a minimal install?
Is this a corporate build?

EDIT: Can you post your original install.log from the XI installation?

Re: Error while applying Configuration

Posted: Thu May 09, 2013 1:54 am
by sarfarosh
Hello Abrist,

Attaching here with the Install.log of NagiosXi, no am not modified any Credential of Postgresql, i have just offloaded MYSQL DB to another server.

Re: Error while applying Configuration

Posted: Thu May 09, 2013 11:02 am
by lmiltchev
Can you run the following command and show the output?

Code: Select all

ll /etc/nsswitch.conf

Re: Error while applying Configuration

Posted: Thu May 09, 2013 2:29 pm
by sarfarosh
lmiltchev here is mine output

Code: Select all

[root@nagios155 ~]# ll /etc/nsswitch.conf 
-rw-r--r-- 1 root root 1716 May  2 07:11 /etc/nsswitch.conf

Re: Error while applying Configuration

Posted: Thu May 09, 2013 5:00 pm
by scottwilkerson
Is postgresql running?

Code: Select all

service postgresql status
Is the disk full?

Code: Select all

df -h
df -i
Can you also run the following

Code: Select all

ls -l /usr/local/nagiosxi/scripts/nagiosql.*