nagiosql.loginNAGIOSQL LOGIN FAILED

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
vmwareguy
Posts: 69
Joined: Wed Mar 16, 2016 9:41 am

nagiosql.loginNAGIOSQL LOGIN FAILED

Post by vmwareguy »

Hi everyone I'm having a problem doing a manual upgrade from 5.2.9 to 5.3.1 on a centos build sitting behind a proxy server.

I'm using these instructions to do the upgrade https://assets.nagios.com/downloads/nag ... nstall.pdf

For some reason I keep getting a NAGIOSQL Login failed error - here is the error from the upgrade.log file

*** Main program, CGIs and HTML files installed ***

You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

make install-init
- This installs the init script in /etc/rc.d/init.d

make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file

make install-config
- This installs sample config files in /usr/local/nagios/etc

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.2.4'
Running configuration check...
Stopping nagios: done.
Starting nagios: done.
Saving old crontab to /tmp/root.crontab.orig...
Removing XI cron jobs...
Copying over new XI directory...
Updating NagiosQL...
NAGIOSQL-POST
Patching NDOUtils...
NDOUtils already patched at level 103
Installing new PNP templates...
Updating init script...
Enabling large install tweaks...
Fixing config file permissions...
Fixing htpasswd permissions...
Checking group memberships...
Installing new XI templates...
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&backend=1&username=nagiosxi&password=696969' -O nagiosql.loginNAGIOSQL LOGIN FAILED!


Any help would be great -

Thanks!
Last edited by vmwareguy on Thu Jul 13, 2017 8:41 am, edited 1 time in total.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by dwhitfield »

Those #s don't match up. Can you confirm you are upgrading from 5.2.9 to 5.3.1?

Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
vmwareguy
Posts: 69
Joined: Wed Mar 16, 2016 9:41 am

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by vmwareguy »

Screenshot of upgrade versions
You do not have the required permissions to view the files attached to this post.
vmwareguy
Posts: 69
Joined: Wed Mar 16, 2016 9:41 am

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by vmwareguy »

I've sent you a PM with my system profile - thanks for the help. Please confirm that you received my PM, it seems to be sitting in my outbox
dwhitfield wrote:Those #s don't match up. Can you confirm you are upgrading from 5.2.9 to 5.3.1?

Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by dwhitfield »

If you click the check for updates button, does the UI version change? It says it was updated 2017-07-13, but the Last Update Check was back in 2016.

I suspect a proxy issue of some sort: https://support.nagios.com/kb/article.php?id=147

UPDATE: PM received
vmwareguy
Posts: 69
Joined: Wed Mar 16, 2016 9:41 am

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by vmwareguy »

dwhitfield wrote:If you click the check for updates button, does the UI version change? It says it was updated 2017-07-13, but the Last Update Check was back in 2016.

I suspect a proxy issue of some sort: https://support.nagios.com/kb/article.php?id=147

UPDATE: PM received
Ran a new check update and the latest version did change - however I can't update from the web page.

I've done all the /etc/yum.conf and /etc/wgetrc but that didn't fix the problem. I haven't tried pear config-set http_proxy 'http://example.com:8080' - I'll give that a try and rerun the manual upgrade.
You do not have the required permissions to view the files attached to this post.
vmwareguy
Posts: 69
Joined: Wed Mar 16, 2016 9:41 am

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by vmwareguy »

I did get a different error this time

*** Main program, CGIs and HTML files installed ***

You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

make install-init
- This installs the init script in /etc/rc.d/init.d

make install-commandmode
- This installs and configures permissions on the
directory for holding the external command file

make install-config
- This installs sample config files in /usr/local/nagios/etc

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.2.4'
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
no crontab for nagios
Saving old crontab to /tmp/root.crontab.orig...
Removing XI cron jobs...
Copying over new XI directory...
Updating NagiosQL...
NAGIOSQL-POST
Patching NDOUtils...
NDOUtils already patched at level 103
Installing new PNP templates...
Updating init script...
Enabling large install tweaks...
Fixing config file permissions...
Fixing htpasswd permissions...
Checking group memberships...
Installing new XI templates...
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&backend=1&username=nagiosxi&password=n@gweb' -O nagiosql.loginwget: Unknown command âproxyâ
wget: Unknown command âproxyâ
--2017-07-13 12:13:05-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2017-07-13 12:13:06 ERROR 500: Internal Server Error.

NAGIOSQL LOGIN FAILED!
vmwareguy
Posts: 69
Joined: Wed Mar 16, 2016 9:41 am

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by vmwareguy »

tail /var/log/httpd/error_log
[Wed Jul 12 09:28:34 2017] [notice] Digest: done
[Wed Jul 12 09:28:36 2017] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
tar: Removing leading `/' from member names
[Thu Jul 13 12:02:39 2017] [notice] caught SIGTERM, shutting down
[Thu Jul 13 12:02:40 2017] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Thu Jul 13 12:02:40 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jul 13 12:02:40 2017] [notice] Digest: generating secret for digest authentication ...
[Thu Jul 13 12:02:40 2017] [notice] Digest: done
[Thu Jul 13 12:02:40 2017] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
[Thu Jul 13 12:13:06 2017] [error] [client 127.0.0.1] PHP Warning: require_once(/usr/local/nagiosxi/html/includes/phpmailer/PHPMailerAutoload.php): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils-email.inc.php on line 6
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by dwhitfield »

What's the output of sestatus?

Also, what are the permissions on /usr/local/nagiosxi/html/includes/phpmailer/PHPMailerAutoload.php and /usr/local/nagiosxi/html/includes/utils-email.inc.php?
vmwareguy
Posts: 69
Joined: Wed Mar 16, 2016 9:41 am

Re: nagiosql.loginNAGIOSQL LOGIN FAILED

Post by vmwareguy »

dwhitfield wrote:What's the output of sestatus?

Also, what are the permissions on /usr/local/nagiosxi/html/includes/phpmailer/PHPMailerAutoload.php and /usr/local/nagiosxi/html/includes/utils-email.inc.php?
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 24
Policy from config file: targeted


-rw-------. 1 nagios nagios 1688 Jul 13 12:13 PHPMailerAutoload.php
-rwxr-x---. 1 nagios nagios 6408 Jul 13 12:12 utils-email.inc.php
Locked