Page 1 of 2

migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 12:52 pm
by btemple
We have upgraded migrated to 5.4.1 rhel 7 Database backend will not start

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 12:57 pm
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.

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 1:02 pm
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:~]#

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 1:13 pm
by rkennedy
What is the output if you run service ndo2db start?

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 1:16 pm
by btemple
service ndo2db start
Starting ndo2db (via systemctl): [ OK ]

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 1:18 pm
by btemple
all my hosts are

Host check is pending...

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 2:14 pm
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();"

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 2:18 pm
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]#

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 2:49 pm
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

Re: migrated to 5.4.1 rhel 7

Posted: Thu Feb 02, 2017 2:57 pm
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