Hello,
We have just upgraded our test box from Nagios xi version 5.2.9 to 5.5.11. There was a mistake made where the unix administrator didn't stop the Nagios service before before performing the upgrade, since reinstalling Nagios we are getting the error message SQL Error [nagiosxi] : Table 'nagiosxi.xi_sessions' doesn't exist.
I also cannot restart Nagios because it tells me that there are errors in the pre-flight checks:
Checking objects...
Error: There are no services defined!
Checked 0 services.
Error: There are no hosts defined!
Checked 0 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 4 contacts.
Checked 2 contact groups.
Checked 124 commands.
Checked 10 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
There is also no lock file found when I try and stop Nagios.
Could someone assist me please?
Thanks,
Paul
SQL Error [nagiosxi] : Table 'nagiosxi.xi_sessions' doesn't
-
- Posts: 44
- Joined: Fri Apr 13, 2018 6:41 am
-
- Support Tech
- Posts: 5045
- Joined: Tue Feb 07, 2017 11:26 am
Re: SQL Error [nagiosxi] : Table 'nagiosxi.xi_sessions' does
Attached are two sql files - one for the mysql database and one for the postgres database. To import them on a default install where the database is on the xi machine:
Note that one of these can fail - if you have a postgres database the mysql import will fail and vise versa.
Code: Select all
mysql -uroot -pnagiosxi -Dnagiosxi < schema_03.sql
Code: Select all
psql -U nagiosxi
\i schema_03.psql
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 44
- Joined: Fri Apr 13, 2018 6:41 am
Re: SQL Error [nagiosxi] : Table 'nagiosxi.xi_sessions' does
Thanks for the reply. I have run the following.
[nagios@smpnagios-kn-t100 p5003574]$ mysql -uroot -pnagiosxi -Dnagiosxi < schema_03.sql
[nagios@smpnagios-kn-t100 p5003574]$ psql -U nagiosxi \i schema_03.sql
psql: warning: extra command-line argument "schema_03.sql" ignored
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
It does seem to have cured the issue though, the error message has gone.
[nagios@smpnagios-kn-t100 p5003574]$ mysql -uroot -pnagiosxi -Dnagiosxi < schema_03.sql
[nagios@smpnagios-kn-t100 p5003574]$ psql -U nagiosxi \i schema_03.sql
psql: warning: extra command-line argument "schema_03.sql" ignored
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
It does seem to have cured the issue though, the error message has gone.
-
- Support Tech
- Posts: 5045
- Joined: Tue Feb 07, 2017 11:26 am
Re: SQL Error [nagiosxi] : Table 'nagiosxi.xi_sessions' does
Thanks for the update and glad to hear it's working now! It's expected that one of those commands would fail since you'll only have either a postgres or mysql database but not both.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.