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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
eycklin
Posts: 30
Joined: Wed Apr 10, 2019 8:40 pm

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

Post 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
User avatar
jdunitz
Posts: 235
Joined: Wed Feb 05, 2020 2:50 pm

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

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
eycklin
Posts: 30
Joined: Wed Apr 10, 2019 8:40 pm

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

Post 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
User avatar
jdunitz
Posts: 235
Joined: Wed Feb 05, 2020 2:50 pm

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

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
eycklin
Posts: 30
Joined: Wed Apr 10, 2019 8:40 pm

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

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
eycklin
Posts: 30
Joined: Wed Apr 10, 2019 8:40 pm

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

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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/
eycklin
Posts: 30
Joined: Wed Apr 10, 2019 8:40 pm

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

Post 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
eycklin
Posts: 30
Joined: Wed Apr 10, 2019 8:40 pm

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

Post 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
Locked