migrated to 5.4.1 rhel 7

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

migrated to 5.4.1 rhel 7

Post by btemple »

We have upgraded migrated to 5.4.1 rhel 7 Database backend will not start
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: migrated to 5.4.1 rhel 7

Post by rkennedy »

What is the output for the following commands?

Code: Select all

service ndo2db status
service mariadb status
service mysqld status
service nagios status
It may just be a graphical error which is what I'm trying to decipher at this point.
Former Nagios Employee
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: migrated to 5.4.1 rhel 7

Post by btemple »

[09:55:54][root@wxnagios01:~]# service ndo2db status
ndo2db is not running but subsystem locked
[10:01:15][root@wxnagios01:~]# service mariadb status
Redirecting to /bin/systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2017-02-02 09:42:28 PST; 18min ago
Process: 1172 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
Process: 1062 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 1170 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─1170 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─1406 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb...

Feb 02 09:42:23 wxnagios01 systemd[1]: Starting MariaDB database server...
Feb 02 09:42:25 wxnagios01 mysqld_safe[1170]: 170202 09:42:25 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
Feb 02 09:42:25 wxnagios01 mysqld_safe[1170]: 170202 09:42:25 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Feb 02 09:42:28 wxnagios01 systemd[1]: Started MariaDB database server.
[10:01:27][root@wxnagios01:~]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
Unit mysqld.service could not be found.
[10:01:35][root@wxnagios01:~]# service nagios status
nagios (pid 52508) is running...
[10:01:46][root@wxnagios01:~]#
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: migrated to 5.4.1 rhel 7

Post by rkennedy »

What is the output if you run service ndo2db start?
Former Nagios Employee
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: migrated to 5.4.1 rhel 7

Post by btemple »

service ndo2db start
Starting ndo2db (via systemctl): [ OK ]
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: migrated to 5.4.1 rhel 7

Post by btemple »

all my hosts are

Host check is pending...
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: migrated to 5.4.1 rhel 7

Post by rkennedy »

I've seen this happen when the DB type is off from PHP. It looks good that your database started, now it's getting past this problem. Does the time line up between all these commands?

Code: Select all

grep "date.timezone" /etc/php.ini
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
date
mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
Former Nagios Employee
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: migrated to 5.4.1 rhel 7

Post by btemple »

[11:17:29][root@wxnagios01:/usr/local/nagios/var]# grep "date.timezone" /etc/php.ini
; http://php.net/date.timezone
date.timezone = UTC
[11:17:37][root@wxnagios01:/usr/local/nagios/var]# ls -l /etc/localtime
lrwxrwxrwx 1 root root 39 Nov 17 2014 /etc/localtime -> /usr/share/zoneinfo/America/Los_Angeles
[11:17:46][root@wxnagios01:/usr/local/nagios/var]# php -r 'echo date("D M j G:i:s T Y")."\n";'
Thu Feb 2 19:17:56 UTC 2017
[11:17:56][root@wxnagios01:/usr/local/nagios/var]# date
Thu Feb 2 11:18:05 PST 2017
[11:18:05][root@wxnagios01:/usr/local/nagios/var]# mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
+---------------------+
| NOW() |
+---------------------+
| 2017-02-02 11:18:16 |
+---------------------+
[11:18:16][root@wxnagios01:/usr/local/nagios/var]#
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: migrated to 5.4.1 rhel 7

Post by btemple »

Everything looked ok. Then we deleted a host plus saved the config and the monitoring engine will not start

Same issue we migrated from.

Says

No lock file found in
/usr/local/nagios/var/Nagios.lock
btemple
Posts: 183
Joined: Fri Nov 08, 2013 9:30 am

Re: migrated to 5.4.1 rhel 7

Post by btemple »

after about 4 mins the service comes back. config takes a very long time to write , write completes, nagios service fails, service finally starts again
Locked