On CCM, attempting to apply the configuration, but got the following error,
Backend login to the Core Config Manager failed.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
In the log, seeing the following error
OUTPUT=/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&backend=1&username=nagiosxi&password=xxxxxxxxxx' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
Any hints ?
NAGIOSQL LOGIN FAILED! RETURNCODE=2
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: NAGIOSQL LOGIN FAILED! RETURNCODE=2
Are you using a proxy? If so, please run through https://support.nagios.com/kb/article.php?id=147
Are you using an offline db? Any other customizations, like changing the db password? If you changed the db password or name, you'll need to also change that in your /usr/local/nagiosxi/html/includes/components/ccm/config.inc.php. You'll also need to change it in /usr/local/nagiosxi/html/config.inc.php, but the more immediate issue is with the CCM.
Also, what version of XI is this? On what OS/version are you running XI?
Are you using an offline db? Any other customizations, like changing the db password? If you changed the db password or name, you'll need to also change that in your /usr/local/nagiosxi/html/includes/components/ccm/config.inc.php. You'll also need to change it in /usr/local/nagiosxi/html/config.inc.php, but the more immediate issue is with the CCM.
Also, what version of XI is this? On what OS/version are you running XI?
Re: NAGIOSQL LOGIN FAILED! RETURNCODE=2
>Are you using a proxy? If so, please run through https://support.nagios.com/kb/article.php?id=147
>
Yes. The instructions were followed. The accesses to the local http are fine.
Here's a logout while the CCM conf being applied.
PROCESSED 0 COMMANDS
RE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2017-03-03 10:35:59-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response...
200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
0K .......... ......... 164M=0s
2017-03-03 10:36:37 (164 MB/s) - `nagiosql.login' saved [19813]
/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&backend=1&username=nagiosxi&password=xxxxxxxx' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
OUTPUT=/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&backend=1&username=nagiosxi&password=xxxxxxxxx' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
PROCESSED 1 COMMANDS
>Are you using an offline db? Any other customizations, like changing the db password? If you changed the db password or name, you'll need >to also change that in your /usr/local/nagiosxi/html/includes/components/ccm/config.inc.php. You'll also need to change it in >/usr/local/nagiosxi/html/config.inc.php, but the more immediate issue is with the CCM.
>
No customization. No DB account nor config were changed. The only thing that was changed was the login password for nagisadmin account.
>Also, what version of XI is this? On what OS/version are you running XI?
Running XI 5.4.2 on Redhat 5.11
>
Yes. The instructions were followed. The accesses to the local http are fine.
Here's a logout while the CCM conf being applied.
PROCESSED 0 COMMANDS
RE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2017-03-03 10:35:59-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response...
200 OK
Length: unspecified [text/html]
Saving to: `nagiosql.login'
0K .......... ......... 164M=0s
2017-03-03 10:36:37 (164 MB/s) - `nagiosql.login' saved [19813]
/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&backend=1&username=nagiosxi&password=xxxxxxxx' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
OUTPUT=/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&backend=1&username=nagiosxi&password=xxxxxxxxx' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
RETURNCODE=2
PROCESSED 1 COMMANDS
>Are you using an offline db? Any other customizations, like changing the db password? If you changed the db password or name, you'll need >to also change that in your /usr/local/nagiosxi/html/includes/components/ccm/config.inc.php. You'll also need to change it in >/usr/local/nagiosxi/html/config.inc.php, but the more immediate issue is with the CCM.
>
No customization. No DB account nor config were changed. The only thing that was changed was the login password for nagisadmin account.
>Also, what version of XI is this? On what OS/version are you running XI?
Running XI 5.4.2 on Redhat 5.11
Re: NAGIOSQL LOGIN FAILED! RETURNCODE=2
Please follow this KB article:
If that doesn't resolve it, go to Admin > System Config > Reset Security Credentials
- Don't change anything, just click the Update Credentials button.
Now test it again.
If you are still having issues, please go to Configure > Core Config Manager > Config Manager Admin > Manage Config Access
- Edit the nagiosxi user, type in the password that the previous error showed (taken from the URL listed in the tail output you posted) and click the Save button
Try the upgrade again, if you are still having issues, please run this command and sent the full output:
- Make sure to change PASSWORD in the command below
Thank you
Code: Select all
https://support.nagios.com/kb/article.php?id=532- Don't change anything, just click the Update Credentials button.
Now test it again.
If you are still having issues, please go to Configure > Core Config Manager > Config Manager Admin > Manage Config Access
- Edit the nagiosxi user, type in the password that the previous error showed (taken from the URL listed in the tail output you posted) and click the Save button
Try the upgrade again, if you are still having issues, please run this command and sent the full output:
- Make sure to change PASSWORD in the command below
Code: Select all
curl 'http://localhost/nagiosxi/includes/components/ccm/?submit=Login&hidelog=true&loginSubmitted=true&backend=1&username=nagiosxi&password=PASSWORD' -k -vRe: NAGIOSQL LOGIN FAILED! RETURNCODE=2
Awesome. Update Credentials and the issue is resolved. Thank you.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: NAGIOSQL LOGIN FAILED! RETURNCODE=2
As your issue is resolved, I am going to go ahead and lock this thread.