We have just upgraded to NagiosXI from 5.2.3 to 5.5.3, and when we run an apply config, and it fails we get the error message and it says that is is rolling back to the last good checkpoint, but it does not.
I tailed the /usr/local/nagiosxi/var/cmdsubsys.log file and see these errors:
RESTORING NOM SNAPSHOT : /usr/local/nagiosxi/nom/checkpoints/nagioscore/1541597570.tar.gz
tar: usr/local/nagios/etc/services: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/services: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/hosts_backup: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/hosts_backup: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/static: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/static: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/services_backup: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/services_backup: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/import: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/import: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/hosts: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/hosts: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp/pages: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp/pages: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp/check_commands: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp/check_commands: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/pnp: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/pnp: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/nggf/services: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/nggf/services: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/nggf/hosts: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/nggf/hosts: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/nggf: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/nggf: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc/externalView: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc/externalView: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: usr/local/nagios/etc: Cannot utime: Operation not permitted
tar: usr/local/nagios/etc: Cannot change mode to rwxrwxr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
I have run the /usr/local/nagiosxi/scripts/reset_config_perms.sh script, but that has not fixed the issue. What should our next step be?
RESTORING NOM SNAPSHOT - Failure
-
- Posts: 19
- Joined: Wed Jan 20, 2016 9:03 am
RESTORING NOM SNAPSHOT - Failure
You do not have the required permissions to view the files attached to this post.
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: RESTORING NOM SNAPSHOT - Failure
Hello, @daniel.ledford. Please run the following commands from the command line and show me the output.
Also, did you run the reset_config_perms.sh as a root user?chage -l nagios
ll -d /usr/local/nagios
ll /usr/local/nagios
ll -d /usr/local/nagios/etc/hosts /usr/local/nagios/etc/services /usr/local/nagios/etc/pnp'
grep nag /etc/passwd
grep nag /etc/group
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 19
- Joined: Wed Jan 20, 2016 9:03 am
Re: RESTORING NOM SNAPSHOT - Failure
Here are the outputs of those commands, and yes I ran that script with sudo.
Code: Select all
-bash-4.1$ chage -l nagios
Last password change : Feb 23, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
-bash-4.1$ ll -d /usr/local/nagios
drwxr-xr-x 11 root root 4096 Jun 4 06:52 /usr/local/nagios
-bash-4.1$ ll /usr/local/nagios
total 116
drwxr-xr-x 2 nagios nagios 4096 Nov 6 13:36 bin
drwxrwxr-x 11 apache nagios 4096 Nov 7 13:39 etc
drwxr-xr-x 2 root root 4096 Feb 23 2016 include
drwxrwsr-x 4 apache nagios 12288 Nov 6 15:26 libexec
drwx------ 2 root root 16384 Apr 21 2016 lost+found
drwxr-xr-x 2 nagios nagios 4096 Sep 14 2017 mysql_backup
-rw-r--r-- 1 root root 0 Nov 7 16:53 ro-test
drwxrwxr-x 2 nagios nagios 4096 Feb 5 2018 sbin
drwxrwxr-x 18 nagios nagios 4096 Feb 23 2016 share
drwxrwxr-x 7 nagios nagios 61440 Nov 7 18:54 var
-bash-4.1$ ll -d /usr/local/nagios/etc/hosts /usr/local/nagios/etc/services /usr/local/nagios/etc/pnp
drwxrwxr-x 2 apache nagios 413696 Nov 7 13:39 /usr/local/nagios/etc/hosts
drwxrwxr-x 4 apache nagios 4096 Nov 7 13:39 /usr/local/nagios/etc/pnp
drwxrwxr-x 2 apache nagios 409600 Nov 7 13:39 /usr/local/nagios/etc/services
You have new mail in /var/spool/mail/nagios
-bash-4.1$ grep nag /etc/passwd
nagios:x:500:500::/home/nagios:/bin/bash
-bash-4.1$ grep nag /etc/group
nagios:x:500:nagios,apache,snmptt
nagcmd:x:501:nagios,apache,snmptt
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: RESTORING NOM SNAPSHOT - Failure
@daniel.ledford, Please follow this article to rebuild the sudoers file:
Also, please show me permissions on some of the files in the error log:
ls -ld /usr/local/nagios/etc/services
ls -ld /usr/local/nagios/etc/nggf/services
ls -ld /usr/local/nagios/etc/hosts
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 19
- Joined: Wed Jan 20, 2016 9:03 am
Re: RESTORING NOM SNAPSHOT - Failure
The snapshot is actually being restored despite these error messages, and I had missed that. Thanks for your help.
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: RESTORING NOM SNAPSHOT - Failure
@daniel.ledford, Thanks for the update.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.