Unable to restore_defaults

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
drug
Posts: 86
Joined: Wed Apr 03, 2013 3:19 pm

Unable to restore_defaults

Post by drug »

Due to problems detailed in another thread ("Configuration files not updating") I wanted to restore our nagiosql database to defaults.

I executed restore_defaults.sh but it failed initially because remote root logins are not allowed on our MySQL server.

I resolved the permissions issue and executed restore_defaults.sh a second time, however I receive the following error:

Code: Select all

URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=XXXXXXXXXX' -O nagiosql.login--2016-01-08 12:13:54--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

    [ <=>                                                                               ] 10,880      --.-K/s   in 0.008s  

2016-01-08 12:13:55 (1.23 MB/s) - ‘nagiosql.login’ saved [10880]

NAGIOSQL LOGIN FAILED!
Last edited by drug on Fri Jan 08, 2016 12:47 pm, edited 1 time in total.
drug
Posts: 86
Joined: Wed Apr 03, 2013 3:19 pm

Re: Unable to restore_defaults

Post by drug »

When I attempt to Apply Configuration from the UI, I see the following error:

Error: Invalid max_attempts, check_interval, retry_interval, or notification_interval value for service 'C Drive' on host 'd303.example.com'
Error: Could not register service (config file '/usr/local/nagios/etc/services/hqerp.example.com.cfg', starting on line 16)


However, these hosts and services no longer appear within CCM.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Unable to restore_defaults

Post by hsmith »

Did you change any of the MySQL passwords?
Former Nagios Employee.
me.
drug
Posts: 86
Joined: Wed Apr 03, 2013 3:19 pm

Re: Unable to restore_defaults

Post by drug »

hsmith wrote:Did you change any of the MySQL passwords?
No MySQL passwords were changed. I only granted temporary remote access for the root account after I realized the first run of this script failed.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to restore_defaults

Post by ssax »

Try this:

Go to Admin > System Config > Reset Security Credentials
- Don't change anything, just click the Update Credentials button.

Let us know if that resolves the issue for you.
drug
Posts: 86
Joined: Wed Apr 03, 2013 3:19 pm

Re: Unable to restore_defaults

Post by drug »

ssax wrote: Go to Admin > System Config > Reset Security Credentials
- Don't change anything, just click the Update Credentials button.
I also set the time on both (XI and MySQL server) servers to UTC following this document: https://assets.nagios.com/downloads/nag ... m_Time.pdf

I clicked the 'Update Credentials" button and it returned with a success message but running restore_defaults.sh still returns "NAGIOSQL LOGIN FAILED!".

I think our next steps at this point are to run uninstall_xi.sh and then reinstall to see if the problems persist.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unable to restore_defaults

Post by ssax »

We should be able to get this working, please PM me your /usr/local/nagiosxi/scripts/nagiosql.login file.

Thank you
drug
Posts: 86
Joined: Wed Apr 03, 2013 3:19 pm

Re: Unable to restore_defaults

Post by drug »

ssax wrote:We should be able to get this working, please PM me your /usr/local/nagiosxi/scripts/nagiosql.login file.

Thank you
Thanks ssax, sorry I should have made clear that we did indeed move forward with a reinstall so this thread may be moot. I did open a new ticket in the Customer Support forum regarding a problem with the re-installation.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Unable to restore_defaults

Post by hsmith »

I'm going to go ahead and close this thread since we have a different one open.
Former Nagios Employee.
me.
Locked