Page 1 of 1

NagiosXI Redirecting to install.php w/o install or upgrade

Posted: Tue Sep 29, 2015 12:08 pm
by crnelson
Scenario
NagiosXI landing page redirecting to install.php, though no upgrade has been ran. There were no changes between 6pm yesterday and 8am this morning. Nagios Core still accessible and fully functional. No impact to notifications.

Host Details
Linux Distribution and version?
CentOS release 5.11 (Final)

32 or 64bit?
32bit

VMware Image or Manual Install of XI?
VMware Image

Special configurations?
Yes, using SSL with self-signed certificate

Other

Code: Select all

tail -f /var/log/httpd/error_log
[Tue Sep 29 09:50:52 2015] [error] [client *.*.*.*] PHP Warning:  The first parameter of bindtextdomain must not be empty in /usr/local/nagiosxi/html/includes/utils.inc.php on line 330
[Tue Sep 29 09:50:52 2015] [error] [client *.*.*.*] PHP Warning:  The first parameter of bindtextdomain must not be empty in /usr/local/nagiosxi/html/includes/utils.inc.php on line 330
[Tue Sep 29 09:50:52 2015] [error] [client *.*.*.*] script '/usr/local/nagiosxi/html/install.php' not found or unable to stat
[Tue Sep 29 09:51:03 2015] [error] [client *.*.*.*] script '/usr/local/nagiosxi/html/install.php' not found or unable to stat
[Tue Sep 29 09:51:05 2015] [error] [client *.*.*.*] PHP Warning:  The first parameter of bindtextdomain must not be empty in /usr/local/nagiosxi/html/includes/utils.inc.php on line 330, referer: https://hostname.domain.org/nagiosxi/install.php
WARNING:  database "postgres" must be vacuumed within 2280215 transactions
HINT:  To avoid a database shutdown, execute a full-database VACUUM in "postgres".
[Tue Sep 29 09:51:08 2015] [error] [client *.*.*.*] PHP Warning:  The first parameter of bindtextdomain must not be empty in /usr/local/nagiosxi/html/includes/utils.inc.php on line 330
[Tue Sep 29 09:51:09 2015] [error] [client *.*.*.*] PHP Warning:  The first parameter of bindtextdomain must not be empty in /usr/local/nagiosxi/html/includes/utils.inc.php on line 330

Re: NagiosXI Redirecting to install.php w/o install or upgra

Posted: Tue Sep 29, 2015 12:12 pm
by hsmith
What happens if you try to access https://x.x.x.x/nagiosxi ?

Re: NagiosXI Redirecting to install.php w/o install or upgra

Posted: Tue Sep 29, 2015 12:15 pm
by crnelson

Re: NagiosXI Redirecting to install.php w/o install or upgra

Posted: Tue Sep 29, 2015 1:07 pm
by crnelson
Instead of redirecting to install.php, it started showing this error in the browser

Code: Select all

DB Connect Error [nagiosxi]: Database connection failed DB Connect Error [nagiosxi]: Database connection failed
I checked everything in https://support.nagios.com/forum/viewto ... 16&t=22283. There were no issues with space or inodes, so I restarted postgresql. It started OK.

Now I'm seeing this error in the httpd error.log

Code: Select all

[Tue Sep 29 10:58:17 2015] [error] [client *.*.*.*] PHP Warning:  pg_pconnect() [<a href='function.pg-pconnect'>function.pg-pconnect</a>]: PostgreSQL link lost, unable to reconnect in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682
[Tue Sep 29 10:58:28 2015] [error] [client *.*.*.*] File does not exist: /usr/local/nagios/share/images/logos/snmptrap.png, referer: https://host.domain.org/nagios/cgi-bin/status.cgi?host=all
[Tue Sep 29 10:59:58 2015] [error] [client *.*.*.*] File does not exist: /usr/local/nagios/share/images/logos/snmptrap.png, referer: https://host.domain.org/nagios/cgi-bin/status.cgi?host=all
[Tue Sep 29 11:01:05 2015] [error] [client *.*.*.*] PHP Warning:  pg_pconnect() [<a href='function.pg-pconnect'>function.pg-pconnect</a>]: Unable to connect to PostgreSQL server: FATAL:  database is not accepting commands to avoid wraparound data loss in database "postgres"\nHINT:  Stop the postmaster and use a standalone backend to vacuum database "postgres". in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: https://fwapp003.wvus.org/nagiosxi/install.php
[Tue Sep 29 11:01:05 2015] [error] [client *.*.*.*] PHP Warning:  pg_pconnect() [<a href='function.pg-pconnect'>function.pg-pconnect</a>]: Unable to connect to PostgreSQL server: FATAL:  database is not accepting commands to avoid wraparound data loss in database "postgres"\nHINT:  Stop the postmaster and use a standalone backend to vacuum database "postgres". in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682, referer: https://fwapp003.wvus.org/nagiosxi/install.php

Re: NagiosXI Redirecting to install.php w/o install or upgra

Posted: Tue Sep 29, 2015 1:17 pm
by crnelson
I've followed https://support.nagios.com/forum/viewto ... 83&p=92511 - no fix.

This line didn't work, so reused the earlier statement from the post.

Code: Select all

postgres --single -D /var/lib/pgsql/data/ -O nagiosxi

Re: NagiosXI Redirecting to install.php w/o install or upgra

Posted: Tue Sep 29, 2015 1:18 pm
by tmcdonald
What XI version is this?

Re: NagiosXI Redirecting to install.php w/o install or upgra

Posted: Tue Sep 29, 2015 1:30 pm
by crnelson
Is there a quick way to do this from the CLI?

Re: NagiosXI Redirecting to install.php w/o install or upgra

Posted: Tue Sep 29, 2015 1:34 pm
by crnelson

Code: Select all

backend> bash-3.2$ echo "VACUUM FULL;" | postgres -D /var/lib/pgsql/data/ template1

PostgreSQL stand-alone backend 8.1.23
backend> backend> bash-3.2$ echo "VACUUM FULL;" | postgres -D /var/lib/pgsql/data/ nagiosxi

PostgreSQL stand-alone backend 8.1.23
Looks like this method worked. I started postgresql and I'm not redirected to a login page :)