Page 1 of 1

Unable to restore_defaults

Posted: Fri Jan 08, 2016 12:20 pm
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!

Re: Unable to restore_defaults

Posted: Fri Jan 08, 2016 12:26 pm
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.

Re: Unable to restore_defaults

Posted: Fri Jan 08, 2016 1:58 pm
by hsmith
Did you change any of the MySQL passwords?

Re: Unable to restore_defaults

Posted: Fri Jan 08, 2016 2:41 pm
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.

Re: Unable to restore_defaults

Posted: Fri Jan 08, 2016 3:18 pm
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.

Re: Unable to restore_defaults

Posted: Fri Jan 08, 2016 3:41 pm
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.

Re: Unable to restore_defaults

Posted: Mon Jan 11, 2016 11:23 am
by ssax
We should be able to get this working, please PM me your /usr/local/nagiosxi/scripts/nagiosql.login file.

Thank you

Re: Unable to restore_defaults

Posted: Mon Jan 11, 2016 11:31 am
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.

Re: Unable to restore_defaults

Posted: Mon Jan 11, 2016 11:34 am
by hsmith
I'm going to go ahead and close this thread since we have a different one open.