Apply configuration not working after upgrade to XI 5.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Apply configuration not working after upgrade to XI 5.

Post by inas.labib »

Hi,

We recently upgraded our Nagios XI server from version 2014R2.5 to 5.2.0. After the upgrade we can't seem to make any changes using the CCM. It stays at "Waiting for configuration verification..............................................." forever. It neither throws an error or times out.

The following works fine:
su nagios
/usr/local/nagios/libexec/
./reconfigure_nagios.sh

./reconfigure_nagios.sh throws an error as well: sudo: ldap_sasl_bind_s(): Can't contact LDAP server.

I also looked for and removed the reconfigure_nagios_lock file earlier.

What could be the issue?

Thanks.
Last edited by inas.labib on Wed Oct 21, 2015 9:42 am, edited 1 time in total.
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: Apply configuration not working after upgrade to XI 5.

Post by inas.labib »

We are also getting the following error when we force a check: "Your request was not processed in a timely manner..."
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration not working after upgrade to XI 5.

Post by lmiltchev »

Were you using LDAP prior to the upgrade or you started using it after the upgrade? Did you set the "nagiosadmin" user to use LDAP? Give us some info on how you modified your XI instance.

Show the output of:

Code: Select all

uname -a
cat /etc/*release
Run the following commands:

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh &> /tmp/reconfig.txt
and post the "reconfig.txt" file that was generated in the "/tmp/" directory from running the above command.
Be sure to check out our Knowledgebase for helpful articles and solutions!
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: Apply configuration not working after upgrade to XI 5.

Post by inas.labib »

Hi ,

We have been using LDAP before upgrade , "nagiosadmin" user is not from LDAP.
Now none of the LDAP users are able to login to the Nagios server.
Please find the attached "reconfig.txt" and other details below.

# uname -a
Linux wp1rngs02t.wdprocessing.pvt 2.6.32-504.8.1.el6.x86_64 #1 SMP Fri Dec 19 12:09:25 EST 2014 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/*release
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Red Hat Enterprise Linux Server release 6.6 (Santiago)

Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration not working after upgrade to XI 5.

Post by lmiltchev »

It is possible that the issue is caused by a specific version of openldap or a misconfiguration - I am not sure.

I found the following explanation in the redhat knowledge base:

https://access.redhat.com/solutions/36836#

Please, verify the "/etc/ldap.conf" for any misconfiguration. Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: Apply configuration not working after upgrade to XI 5.

Post by inas.labib »

After further troubleshooting we got to the point where ./reconfigure_nagios.sh as nagios user was getting stuck waiting for sudo password. We fixed this issue by adding a few lines to /etc/sudoers but want to confirm if this is is the right way to do it.

grep -i nagios /etc/sudoers:

# NEEDED TO ALLOW NAGIOS TO CHECK SERVICE STATUS
Defaults:nagios !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
nagios ALL=NOPASSWD: /usr/local/nagiosxi/scripts/reset_config_perms.sh
nagios ALL=NOPASSWD: /usr/local/nagiosxi/scripts/restart_nagios_with_export.sh
nagios ALL=NOPASSWD: /usr/local/nagiosxi/scripts/import_nagiosql.sh
nagios ALL=NOPASSWD: /usr/local/nagiosxi/scripts/manage_services.sh

#nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_asterisk_sip_peers.sh, /usr/local/nagios/libexec/nagisk.pl, /usr/sbin/asterisk
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Apply configuration not working after upgrade to XI 5.

Post by tgriep »

What you have in the sudoers looks like it is just the minimal needed for just applying the configuration. I have included the default settings needed in the sudoers file below. You may want to edit yours to match.

Code: Select all

Defaults:nagios !requiretty
Defaults:apache !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_linux_stats.pl

User_Alias      NAGIOSXI=nagios
User_Alias              NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
Be sure to check out our Knowledgebase for helpful articles and solutions!
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: Apply configuration not working after upgrade to XI 5.

Post by ranjitw »

Hi ,

Will try this solution and provide an update.
Regards,
Ranjit W
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Apply configuration not working after upgrade to XI 5.

Post by tgriep »

Let us know if this solves it for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
inas.labib
Posts: 170
Joined: Tue Sep 11, 2012 3:48 am

Re: Apply configuration not working after upgrade to XI 5.

Post by inas.labib »

Inserting the correct entries to /etc/sudoers fixed this issue. I am pretty sure the upgrade messed up the file.
Locked