Page 1 of 1

5.4.13 won't upgrade. ./apply-patches: line 9: not found

Posted: Tue Oct 23, 2018 10:55 am
by dfmco
Currently the database backend fails to start and the monitoring system is down as a result. Tried a database repair which seems to have succeeded but still the db will not start and upgrades fail.

I tried to restore from the primary to the secondary but it failed and hosed the webserver on the backup.

Additionally, I have these questions:
1. the primary server was built with a traditional install but the backup used the RPM setup. We would like to rebuild the primary as an RPM install but will there be any issues backing up a traditional install to an RPM install?
2. What are the proper backup procedures for a primary and failover server? I am concerned that if the versions have to match exactly then we are at risk every time we upgrade.
3. If the system does fail and the restore does not work but the old machine is accessible, is there a way to export out data from the old to the new to prevent having to rebuild the new nagios?

Re: 5.4.13 won't upgrade. ./apply-patches: line 9: not foun

Posted: Tue Oct 23, 2018 3:22 pm
by ssax
Are you out of disk space?

Code: Select all

df -h
df -i
When you say "database backend" do you mean mysql/mariadb or NDO2DB?

If you meant the mysql/mariadb DB, what does /var/log/mysqld.log or /var/log/mariadb/mariadb.log or even /var/log/messages show when you try to start the DB?

If ndo2db is failing to start, please try running these commands to see if it fixes it:

Code: Select all

service nagios stop
service ndo2db stop
rm -rf /usr/local/nagios/var/ndo.sock
rm -rf /usr/local/nagios/var/ndo2db.lock
service ndo2db start
service nagios start
If it's still not starting, please send me the output of service ndo2db status and what you are seeing in your /usr/local/nagios/var/nagios.log and /var/log/messages.

Thank you

Re: 5.4.13 won't upgrade. ./apply-patches: line 9: not foun

Posted: Tue Oct 23, 2018 3:33 pm
by ssax
1. the primary server was built with a traditional install but the backup used the RPM setup. We would like to rebuild the primary as an RPM install but will there be any issues backing up a traditional install to an RPM install?
You shouldn't have any problem backing up and restoring from an source based install to an RPM install.

I would do it on a test system first though to make sure everything goes smoothly.
2. What are the proper backup procedures for a primary and failover server? I am concerned that if the versions have to match exactly then we are at risk every time we upgrade.
You would just follow the guide:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

As long as you have a valid backup file you can spin up a new VM with the same OS/XI version and restore the backup to make it an exact copy of the XI configuration the backup was taken from.
3. If the system does fail and the restore does not work but the old machine is accessible, is there a way to export out data from the old to the new to prevent having to rebuild the new nagios?
Technically as long as the files and databases contain the data it should be recoverable/exportable but it would be a manual process.

Re: 5.4.13 won't upgrade. ./apply-patches: line 9: not foun

Posted: Tue Oct 23, 2018 6:29 pm
by dfmco
ahha! Looks like our RAM disk was full! How does that happen? I thought that the RAM Disk for Nagios did nothing but cache files?

Re: 5.4.13 won't upgrade. ./apply-patches: line 9: not foun

Posted: Tue Oct 23, 2018 6:44 pm
by dfmco
No dice. Database backend still won't start. I saw another thread on this and ran the commands requested:
[root@dfmco-mon1 ~]# mysql -V
cat /usr/local/nagiosxi/var/xi-sys.cfg | grep mysqldmysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1
[root@dfmco-mon1 ~]# cat /usr/local/nagiosxi/var/xi-sys.cfg | grep mysqld
mysqld='mariadb'
[root@dfmco-mon1 ~]#

The other thread said to contact [email protected].

We need to get the db backend started and it looks like it may be an issue with 5.4 so maybe an upgrade will fix that? Can you tell us why the apply-patches on line 9 of the upgrade script fails?

Re: 5.4.13 won't upgrade. ./apply-patches: line 9: not foun

Posted: Tue Oct 23, 2018 7:12 pm
by dfmco
Solution found in this thread:
Failed Update from Nagios XI 5.4.13 to 5.5.3

The Nagios forum search did not find this but Google did.

Re: 5.4.13 won't upgrade. ./apply-patches: line 9: not foun

Posted: Wed Oct 24, 2018 9:06 am
by ssax
So you're up an running? Is there any outstanding issue?

Re: 5.4.13 won't upgrade. ./apply-patches: line 9: not foun

Posted: Wed Oct 24, 2018 9:12 am
by dfmco
Issue is resolved