Page 1 of 2

After OS reboot, nagiosxi home page becomes to install.php.

Posted: Thu May 07, 2020 4:40 am
by eycklin
Hi,

There is one Nagios XI which version is v5.5.x on centos.
The OS has been rebooted recently.
And when we use web browser to login nagiosxi,
the web page jump to "install.php".

The nagios core is running ok.
But we cannot login nagiosxi.

Any suggestions?
Eyck Lin

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Thu May 07, 2020 2:18 pm
by jdunitz
Hello, Eyck!

Might you have upgraded PHP?

Also, what version of CentOS is this?

If you do an "rpm -qa | grep php", what do you see?

--Jeffrey

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Thu May 07, 2020 10:17 pm
by eycklin
Hi,

Customer don't upgrade php.

Info updated as below:
OS: Red Hat Enterprise Linux Server release 6.7 (Santiago)
Kernel: 2.6.32-573.22.1.el6.x86_64
Xi Version: 5.5.11

# rpm -qa | grep php
php-pd0-5.3.3-46.el6_7.1.x86_64
php-mcrypt-5.3.3-4.el6.x86_64
php-ldap-5.3.3-46.el6_7.1.x86_64
php-gd-5.3.3-46.el6_7.1.x86_64
php-mssql-5.3.3-4.el6.x86_64
php-common-5.3.3-46.el6_7.1.x86_64
php-cli-5.3.3-46.el6_7.1.x86_64
php-pear-HTML-Template-IT-1.3.0-2.el5.noarch
php-snmp-5.3.3-46.el6_7.1.x86_64
php-pgsql-5.3.3-46.el6_7.1.x86_64
php-5.3.3-46.el6_7.1.x86_64
php-mbstring-5.3.3-46.el6_7.1.x86_64
php-xml-5.3.3-46.el6_7.1.x86_64
php-pear-1.9.4-4.el6.noarch
php-mysql-5.3.3-46.el6_7.1.x86_64


This is a production NagiosXI system.
It can monitor but cannot login nagiosxi,
and customer said that alert email cannot send out.

Please help to resolve it.

Thanks,
Eyck Lin

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Fri May 08, 2020 11:22 am
by jdunitz
Does the file /tmp/nagiosxi.forceinstall exist?
If so, try removing it and see if that helps. You might also have a couple database settings that didn't get updated from the install, and here's how you can check :

Code: Select all

echo "select * from xi_options where name = 'db_version' OR name = 'install_version';" | mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi
 
Let me know what you discover!
--Jeffrey

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Sun May 10, 2020 9:18 pm
by eycklin
Hi,

1. There is no such file (nagiosxi.forceinstall) in /tmp.
2. There is no ouput returned.

ps: This NagiosXI system is running for a long time, not a new installation.
After customer rebooted the OS, they cannot login nagiosxi web UI.


Thanks,
Eyck Lin

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Mon May 11, 2020 1:56 pm
by ssax
Do you have crashed DB tables?

Code: Select all

tail -n50 /var/log/mysqld.log /var/log/mariadb/mariadb.log
Try repairing them:

Code: Select all

cd /usr/local/nagiosxi/scripts
./repair_databases.sh
Since you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*​​
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then PM me the resulting /usr/local/nagiosxi/var/components/profile.zip​ file.​

If the profile script fails, please include the ENTIRE output.

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Tue May 12, 2020 12:13 am
by eycklin
Hi,

Customer has ran repair_databases.sh after last reboot.
Now, there is no error reported in dblog.

And there is no such script,
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT

Since NagiosXI version is 5.5.11.

Any suggestions?

Regards,
Eyck Lin

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Tue May 12, 2020 10:28 am
by ssax
That file should exist:

Code: Select all

ls -lh /usr/local/nagiosxi/scripts/components/getprofile.sh
Does this now show anything?

Code: Select all

echo "select * from xi_options where name = 'db_version' OR name = 'install_version';" | mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi
I assume it's still redirecting to the install.php?

If it's still redirecting, please create a ticket for this and include a link back to this forum thread so we can get a remote session setup:

https://support.nagios.com/tickets/

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Tue May 12, 2020 8:48 pm
by eycklin
Hi,

There is no such script, /usr/local/nagiosxi/scripts/components/getprofile.sh.
and no /usr/local/nagiosxi/scripts/components directory in Nagios v5.5.11.
(I have a new install, test environment, which is Nagios v5.5.11, it doesn't have that script.)

And,
echo "select * from xi_options where name = 'db_version' OR name = 'install_version';" | mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi
it returned nothing.

Regards,
Eyck Lin

Re: After OS reboot, nagiosxi home page becomes to install.p

Posted: Tue May 12, 2020 10:44 pm
by eycklin
Hi,

Customer do a test.

He run upgrade.sh in v5.5.11 package.
Now, He can see the normal login page, not install.php.

But the original nagiosadmin password seems not work.

He use
/usr/local/nagiosxi/scripts/reset_nagiosadmin_password.php --password=newpassword

But got the message:
ERROR: Unable to get user id for nagiosadmin account

And now,
echo "select * from xi_options where name = 'db_version' OR name = 'install_version';" | mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosxi

Got following:
option_id name value
993 db_version 113
994 install_version 5.5.11

Please help to reset nagiosadmin password.

Thanks,
Eyck Lin