Reset Config Permissions Failed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
GreatWolfResorts
Posts: 48
Joined: Tue Mar 15, 2011 11:12 am
Location: Madison, WI

Reset Config Permissions Failed

Post by GreatWolfResorts »

We're trying to cut over from a virtual instance of NagiosXI to a physical one on it's own dedicated server. During the migration process, we've run into a series of issues I've been trying to resolve. Initially we found that performance data wasn't displaying properly, but resolved that with the assistance of a post on the forums, converting the perfdata .rrd files to rrd.xml, followed by a compression, transfer, and restore using the rrdtool.

Shortly afterwards, we identified trouble with the mrtg check for our bandwidth graphs. It does not appear to be pulling any data from the devices. This remains an issue at the moment.

When attempting to update the configuration through Nagios Core Configuration Manager, we are receiving an error "Reset Config Permissions Failed." I attempted to reset the configuration permissions manually via /usr/local/nagioxi/scripts/reset_config_perms.sh. This returns a "RESETTING PERMS" but nothing else, and does not resolve. In addition the "reset_config_perms" file returns:

-bash: /usr/local/nagiosxi/scripts/reset_config_perms: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Running the "reconfigure_nagios.sh" script returns the following:

Code: Select all

[root@noc scripts]# ./reconfigure_nagios.sh
URL: http://localhost/nagiosql/index.php
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUsername=nagiosxi&tfPassword=377rMNT2' -O nagiosql.login--2012-03-22 15:56:32--  http://localhost/nagiosql/index.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/admin.php [following]
--2012-03-22 15:56:32--  http://localhost/nagiosql/admin.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5286 (5.2K) [text/html]
Saving to: ânagiosql.loginâ

100%[===================================================================================================================>] 5,286       --.-K/s   in 0s

2012-03-22 15:56:32 (281 MB/s) - ânagiosql.loginâ

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosql/admin/import.php
Array
(
)
./export_nagiosql.sh: ./reset_config_perms: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
RESETTING CONFIG PERMS FAILED!\n
So I think we definitely have our work cut out for us. Any help would be greatly appreciated!

- Dan
Nagios XI 5.2.5 | CentOS6.3 x86_64 | Virtual Instance on VMware vSphere 6
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Reset Config Permissions Failed

Post by scottwilkerson »

If you still have your /tmp/nagiosxi directory, run the following

Code: Select all

cd /tmp/nagiosxi
./build-perms-bin
If not, run

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/xi-2011-latest.tar.gz
tar xzf xi-2011-latest.tar.gz
cd /tmp/nagiosxi
./build-perms-bin
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
GreatWolfResorts
Posts: 48
Joined: Tue Mar 15, 2011 11:12 am
Location: Madison, WI

Re: Reset Config Permissions Failed

Post by GreatWolfResorts »

That did the trick for the configuration permissions.

Would you have time to dive into the failing check-xi_service_mrtgtraf checks? The response from the check comes back in an "OK" state, but it isn't pulling any performance data. Everything is flat-lined at 0. I did a little research on this but everything was fairly inconclusive.
Nagios XI 5.2.5 | CentOS6.3 x86_64 | Virtual Instance on VMware vSphere 6
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Reset Config Permissions Failed

Post by scottwilkerson »

Can you confirm the devices are in /etc/mrtg/mrtg.cfg

Don't attach it here because the file may have sensitive info in it...

It is possible that the mrtg.cfg didn't get transferred...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
GreatWolfResorts
Posts: 48
Joined: Tue Mar 15, 2011 11:12 am
Location: Madison, WI

Re: Reset Config Permissions Failed

Post by GreatWolfResorts »

It appears the mrtg.cfg did not come over during the restore. One was there, but a drastically reduced size to the one on the old server. I renamed the old configuration file and replaced it with the one from the original server. I then restarted the system, and attempted to pull data from the check. Looks like it is still returning 0 traffic data.
Nagios XI 5.2.5 | CentOS6.3 x86_64 | Virtual Instance on VMware vSphere 6
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Reset Config Permissions Failed

Post by scottwilkerson »

Can you run this from the commandline to check for errors

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
Also, it should be noted that mrtg only runs every 5 minutes on cron, so it may take several cycles for data to appear
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
GreatWolfResorts
Posts: 48
Joined: Tue Mar 15, 2011 11:12 am
Location: Madison, WI

Re: Reset Config Permissions Failed

Post by GreatWolfResorts »

Here is the output:

Code: Select all

2012-03-23 09:39:27: ERROR: Creating templock /var/lock/mrtg/mrtg_l_12743: No such file or directory at /usr/bin/mrtg line 1868.
Nagios XI 5.2.5 | CentOS6.3 x86_64 | Virtual Instance on VMware vSphere 6
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Reset Config Permissions Failed

Post by scottwilkerson »

Run

Code: Select all

mkdir -p /var/lock/mrtg
and then try the previous command again
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
GreatWolfResorts
Posts: 48
Joined: Tue Mar 15, 2011 11:12 am
Location: Madison, WI

Re: Reset Config Permissions Failed

Post by GreatWolfResorts »

The following is being produced for each one of the devices we're attempting check (with some censoring of course):

Code: Select all

SNMP Error:
no response received
SNMPv1_Session (remote host: "10.2.***.***" [10.2.***.***].161)
                  community: "*****"
                 request ID: 357522709
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/bin/../lib/mrtg2/SNMP_util.pm line 492
SNMPGET Problem for ifInOctets.3 ifOutOctets.3 on *****@10.2.***.***:::::1:v4only
 at /usr/bin/mrtg line 2242
2012-03-23 09:47:48: WARNING: skipping because at least the query for ifInOctets.3 on  10.2.***.*** did not succeed
2012-03-23 09:47:48: WARNING: no data for ifInOctets&ifOutOctets:*****@10.2.***.***. Skipping further queries for Host 10.2.***.*** in this round.
Nagios XI 5.2.5 | CentOS6.3 x86_64 | Virtual Instance on VMware vSphere 6
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Reset Config Permissions Failed

Post by scottwilkerson »

Are you sure the devices can be reached from the new server (ie. firwall or iptables blocking)?

Can you run something like this from the Nagios XI server?

Code: Select all

snmpwalk -v 1 -c <COMMUNITY_STRING> 10.2.***.*** sysUpTimeInstance
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart