NagiosSQL login failed -- Nagios XI upgrade 5.2.2

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by raamardhani7 »

Hi Team,

I am facing below error while trying to upgrade Nagios XI to the latest version. I am using Linux.

Code: Select all

/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=n@gweb' -O 

nagiosql.login--2015-11-15 01:27:48--  http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.

Code: Select all

ls -l /usr/local/nagiosxi/html/includes/components/ccm/
total 140
-rw-r-----. 1 nagios nagios 10317 Nov 15 02:13 ajax.php
-rw-r-----. 1 nagios nagios 20085 Nov 15 02:13 ccm.inc.php
-rw-------  1 nagios nagios 22147 Nov 15 02:13 ccm-splash.inc.php
-rw-r-----. 1 nagios nagios 11495 Nov 15 02:13 CHANGES.txt
drwxr-x---. 2 nagios nagios  4096 Jul  1 05:48 classes
-rw-r-----. 1 nagios nagios  5180 Nov 15 02:13 command_test.php
-rw-r-----. 1 nagios nagios  1618 Nov 15 02:13 config.inc.php
drwxr-x---. 2 nagios nagios  4096 Jul  1 05:48 css
-rw-r-----. 1 nagios nagios  4130 Nov 15 02:13 download.php
drwxr-x---. 2 nagios nagios  4096 Nov 15 01:27 images
drwxr-x---. 2 nagios nagios  4096 Nov 15 01:27 includes
-rw-r-----. 1 nagios nagios  3848 Nov 15 02:13 index.php
drwxr-x---. 2 nagios nagios  4096 Jul  1 05:48 javascript
-rw-r-----. 1 nagios nagios  4128 Nov 15 02:13 LICENSE.txt
drwxr-x---. 2 nagios nagios  4096 Jul  1 05:48 page_templates
-rw-r-----. 1 nagios nagios  4577 Nov 15 02:13 sanity.sh
drwxr-x---. 3 nagios nagios  4096 Jul  1 05:48 templates
-rw-r-----. 1 nagios nagios  1871 Nov 15 02:13 xi-index.php

Code: Select all

tail -f /var/log/httpd/error_log
[Sun Nov 15 02:14:23 2015] [error] [client ::1] PHP Warning:  require_once(/usr/local/nagiosxi/html/includes/utils-reports-export.inc.php): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils.inc.php on line 38
[Sun Nov 15 02:14:26 2015] [error] [client 10.10.83.90] PHP Warning:  require_once(/usr/local/nagiosxi/html/includes/utils-reports-export.inc.php): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils.inc.php on line 38
[Sun Nov 15 02:14:44 2015] [error] [client ::1] PHP Warning:  require_once(/usr/local/nagiosxi/html/includes/utils-reports-export.inc.php): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils.inc.php on line 38
[Sun Nov 15 02:14:50 2015] [notice] caught SIGTERM, shutting down
[Sun Nov 15 02:14:51 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Nov 15 02:14:51 2015] [notice] Digest: generating secret for digest authentication ...
[Sun Nov 15 02:14:51 2015] [notice] Digest: done
[Sun Nov 15 02:14:51 2015] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Sun Nov 15 02:15:03 2015] [error] [client ::1] PHP Warning:  require_once(/usr/local/nagiosxi/html/includes/utils-reports-export.inc.php): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils.inc.php on line 38
[Sun Nov 15 02:15:05 2015] [error] [client ::1] PHP Warning:  require_once(/usr/local/nagiosxi/html/includes/utils-reports-export.inc.php): failed to open stream: Permission denied in /usr/local/nagiosxi/html/includes/utils.inc.php on line 38

Code: Select all

cat /etc/wgetrc
###
### Sample Wget initialization file .wgetrc
###

## You can use this file to change the default behaviour of wget or to
## avoid having to type many many command-line options. This file does
## not contain a comprehensive list of commands -- look at the manual
## to find out what you can put into this file.
##
## Wget initialization file can reside in /etc/wgetrc
## (global, for all users) or $HOME/.wgetrc (for a single user).
##
## To use the settings in this file, you will have to uncomment them,
## as well as change them, in most cases, as the values on the
## commented-out lines are the default values (e.g. "off").


##
## Global settings (useful for setting up in /etc/wgetrc).
## Think well before you change them, since they may reduce wget's
## functionality, and make it behave contrary to the documentation:
##

# You can set retrieve quota for beginners by specifying a value
# optionally followed by 'K' (kilobytes) or 'M' (megabytes).  The
# default quota is unlimited.
#quota = inf

# You can lower (or raise) the default number of retries when
# downloading a file (default is 20).
#tries = 20

# Lowering the maximum depth of the recursive retrieval is handy to
# prevent newbies from going too "deep" when they unwittingly start
# the recursive retrieval.  The default is 5.
#reclevel = 5

# By default Wget uses "passive FTP" transfer where the client
# initiates the data connection to the server rather than the other
# way around.  That is required on systems behind NAT where the client
# computer cannot be easily reached from the Internet.  However, some
# firewalls software explicitly supports active FTP and in fact has
# problems supporting passive transfer.  If you are in such
# environment, use "passive_ftp = off" to revert to active FTP.
#passive_ftp = off

# The "wait" command below makes Wget wait between every connection.
# If, instead, you want Wget to wait only between retries of failed
# downloads, set waitretry to maximum number of seconds to wait (Wget
# will use "linear backoff", waiting 1 second after the first failure
# on a file, 2 seconds after the second failure, etc. up to this max).
#waitretry = 10


##
## Local settings (for a user to set in his $HOME/.wgetrc).  It is
## *highly* undesirable to put these settings in the global file, since
## they are potentially dangerous to "normal" users.
##
## Even when setting up your own ~/.wgetrc, you should know what you
## are doing before doing so.
##

# Set this to on to use timestamping by default:
#timestamping = off

# It is a good idea to make Wget send your email address in a `From:'
# header with your request (so that server administrators can contact
# you in case of errors).  Wget does *not* send `From:' by default.
#header = From: Your Name <[email protected]>

# You can set up other headers, like Accept-Language.  Accept-Language
# is *not* sent by default.
#header = Accept-Language: en

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/
no_proxy=localhost,127.0.0.0
# If you do not want to use proxy at all, set this to off.
#use_proxy = on

# You can customize the retrieval outlook.  Valid options are default,
# binary, mega and micro.
#dot_style = default

# Setting this to off makes Wget not download /robots.txt.  Be sure to
# know *exactly* what /robots.txt is and how it is used before changing
# the default!
#robots = on

# It can be useful to make Wget wait between connections.  Set this to
# the number of seconds you want Wget to wait.
#wait = 0

# You can force creating directory structure, even if a single is being
# retrieved, by setting this to on.
#dirstruct = off

# You can turn on recursive retrieving by default (don't do this if
# you are not sure you know what it means) by setting this to on.
#recursive = off

# To always back up file X as X.orig before converting its links (due
# to -k / --convert-links / convert_links = on having been specified),
# set this variable to on:
#backup_converted = off

# To have Wget follow FTP links from HTML files by default, set this
# to on:
#follow_ftp = off

# To try ipv6 addresses first:
#prefer-family = IPv6

# Set default IRI support state
#iri = off

# Force the default system encoding
#locale = UTF-8

# Force the default remote server encoding
#remoteencoding = UTF-8

Code: Select all

 ls -la /usr/local/nagiosxi/html/backend/includes/handler-config.inc.php
-rwxrwx---. 1 nagios nagios 458 Nov 15 02:18 /usr/local/nagiosxi/html/backend/includes/handler-config.inc.php

Code: Select all

yum list installed | grep pear
php-pear.noarch                    1:1.9.4-4.el6           @anaconda-RedHatEnterpriseLinux-201301301459.x86_64/6.4
php-pear-HTML-Template-IT.noarch   1.3.0-2.el5             @/php-pear-HTML-Template-IT-1.3.0-2.el5.noarch

Code: Select all

grep nag /etc/group
nagios:x:501:nagios,apache
nagcmd:x:502:nagios,apache

Code: Select all

ll -d /usr/local/nagiosxi/html
drwxr-xr-x. 19 nagios nagios 4096 Nov 15 01:27 /usr/local/nagiosxi/html

Code: Select all

ll /usr/local/nagiosxi/html
total 444
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 about
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 account
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 addons
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 admin
-rwxr-x---.  1 nagios nagios  26932 Nov 15 02:18 ajaxhelper.php
-rwxr-x---.  1 nagios nagios   1652 Nov 15 02:18 ajaxproxy.php
drwx------   4 nagios nagios   4096 Nov 15 01:27 api
drwxr-x---.  3 nagios nagios   4096 Jul  1 05:48 backend
drwxr-x---.  3 nagios nagios   4096 Nov 15 01:27 config
-rwx------   1 nagios nagios   8801 Nov 15 02:18 config.inc.dist
-rwxr-x---.  1 nagios nagios   8801 Nov 15 02:18 config.inc.php
-rwx------   1 nagios nagios   8801 Nov 15 02:18 config.inc.saved
drwxr-x---.  2 nagios nagios   4096 Nov 15 01:27 dashboards
drwxr-x---.  4 nagios nagios   4096 Jul  1 05:48 db
drwxr-x---.  3 nagios nagios   4096 Jul  1 05:48 downloads
drwxr-x---.  2 nagios nagios   4096 Nov 15 01:27 help
drwxr-x---.  4 nagios nagios  12288 Nov 15 01:27 images
drwxr-x---. 12 nagios nagios   4096 Nov 15 01:27 includes
-rwxr-x---.  1 nagios nagios    884 Nov 15 02:18 index.php
-rwxr-x---.  1 nagios nagios  10086 Nov 15 02:18 install.php
-rwxr-x---.  1 nagios nagios 236960 Nov 15 02:18 login.php
-rw-------   1 nagios nagios   2303 Nov 15 02:18 loginsplash.inc.dist
-rw-r-----.  1 nagios nagios   2399 Nov 15 02:18 loginsplash.inc.php
-rw-------   1 nagios nagios   2399 Nov 15 02:18 loginsplash.inc.saved
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 perfgraphs
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 reports
-rw-r-----.  1 nagios nagios  20509 Nov 15 02:18 rr.php
-rwxr-x---.  1 nagios nagios  12206 Nov 15 02:18 suggest.php
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 tools
-rwxr-x---.  1 nagios nagios   2010 Nov 15 02:18 upgrade.php
drwxr-x---.  2 nagios nagios   4096 Nov 15 01:27 views
Output of upgrade

Code: Select all

more upgrade.txt
Archive:  sourceguardian/ixed4.lin.x86-64.zip
  inflating: /usr/lib64/php/modules/ixed.5.3.lin
Sourceguardian extension found for PHP version 5.3
Sourceguardian extension already in php.ini
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Checking required prereqs...
Please wait...

OLD VERSION: 513
Loaded plugins: changelog, product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Package automake-1.11.1-4.el6.noarch already installed and latest version
Package autoconf-2.63-5.1.el6.noarch already installed and latest version
Package perl-Test-Simple-0.92-141.el6.x86_64 already installed and latest version
Package perl-Class-Accessor-0.31-6.1.el6.noarch already installed and latest version
Package perl-Params-Validate-0.92-3.el6.x86_64 already installed and latest version
Package perl-Config-Tiny-2.12-7.1.el6.noarch already installed and latest version
Package perl-Math-Calc-Units-1.07-6.el6.noarch already installed and latest version
Package perl-Number-Format-1.73-3.el6.noarch already installed and latest version
Package php-mbstring-5.3.3-46.el6_6.x86_64 already installed and latest version
Package 2:nmap-6.47-1.x86_64 already installed and latest version
Package subversion-1.6.11-15.el6_7.x86_64 already installed and latest version
Nothing to do
Loaded plugins: changelog, product-id, rhnplugin, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Package php-pecl-ssh2-0.11.0-7.el6.x86_64 already installed and latest version
Nothing to do
Copying over new XI directory...
Updating NagiosQL...
NAGIOSQL-POST
Patching NDOUtils...
NDOUtils already patched at level 103
Updating sequences...
Nagios XI Postgres Database Sequence Information

OLD VALUES
--------------
xi_commands_command_id_seq = 975
xi_events_event_id_seq = 2143374
xi_meta_meta_id_seq = 2143319
xi_options_option_id_seq = 135
xi_sysstat_sysstat_id_seq = 101
xi_usermeta_usermeta_id_seq = 719
xi_users_user_id_seq = 57

NEW VALUES
--------------
xi_commands_command_id_seq = 975
xi_events_event_id_seq = 2143374
xi_meta_meta_id_seq = 2143319
xi_options_option_id_seq = 135
xi_sysstat_sysstat_id_seq = 101
xi_usermeta_usermeta_id_seq = 719
xi_users_user_id_seq = 57

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&username=nagiosxi&password=n@gweb' -O nagiosql.loginNAGIOSQL LOGIN FAILED!
Now I am unable to login to the portal after I ran the upgrade script, please help me with this.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by Box293 »

Can you please upload the file:
/etc/sudoers
Also, any files in /etc/sudoers.d/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by raamardhani7 »

Box293 wrote:Can you please upload the file:
/etc/sudoers
Also, any files in /etc/sudoers.d/
Output from sudoers file for Nagios

Code: Select all

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 *
And there are no files in the /etc/sudoers.d path.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by tgriep »

Can you run the following on the XI system and post the output?

Code: Select all

ls -l /usr/local/nagiosxi/html/includes/
Thanks
Be sure to check out our Knowledgebase for helpful articles and solutions!
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by raamardhani7 »

tgriep wrote:Can you run the following on the XI system and post the output?

Code: Select all

ls -l /usr/local/nagiosxi/html/includes/
Thanks
Hi Tom,

Please find the output asked for:

Code: Select all

 ls -l /usr/local/nagiosxi/html/includes/
total 2488
-rwxr-x---.  1 nagios nagios   5998 Nov 15 03:30 auth.inc.php
-rwxr-x---.  1 nagios nagios    807 Nov 15 03:30 common.inc.php
drwxr-x---. 60 nagios nagios   4096 Nov 15 01:27 components
-rwxr-x---.  1 nagios nagios   1014 Nov 15 03:30 components.inc.php
drwxr-x---. 65 nagios nagios   4096 Nov 15 01:27 configwizards
-rwxr-x---.  1 nagios nagios    619 Nov 15 03:30 configwizards.inc.php
-rwxr-x---.  1 nagios nagios  20923 Nov 15 03:30 constants.inc.php
-rwxr-x---.  1 nagios nagios  24962 Nov 15 03:30 constants-nagioscore.inc.php
drwxr-x---.  4 nagios nagios   4096 Nov 15 01:27 css
drwxr-x---. 12 nagios nagios   4096 Nov 15 01:27 dashlets
-rwxr-x---.  1 nagios nagios    680 Nov 15 03:30 dashlets.inc.php
-rwxr-x---.  1 nagios nagios 245164 Nov 15 03:30 dbauth.inc.php
-rwxr-x---.  1 nagios nagios  16172 Nov 15 03:30 db.inc.php
-rwxr-x---.  1 nagios nagios 105876 Nov 15 03:30 dbl.inc.php
-rwxr-x---.  1 nagios nagios    789 Nov 15 03:30 errors.inc.php
drwxr-x---.  2 nagios nagios   4096 Nov 15 01:27 fonts
-rwxr-x---.  1 nagios nagios     56 Nov 15 03:30 footer-child.inc.php
-rwxr-x---.  1 nagios nagios   6874 Nov 15 03:30 footer.inc.php
drwxr-x---.  5 nagios nagios   4096 Jul  1 05:48 fpdf
-rwxr-x---.  1 nagios nagios    578 Nov 15 03:30 header-child.inc.php
-rwxr-x---.  1 nagios nagios  20452 Nov 15 03:30 header.inc.php
drwxr-x---.  6 nagios nagios   4096 Nov 15 01:27 js
drwxr-x---.  3 nagios nagios   4096 Jul  1 05:48 lang
-rwxr-x---.  1 nagios nagios    163 Nov 15 03:30 notificationmethods.inc.php
-rw-r-----.  1 nagios nagios  17461 Nov 15 03:30 page-default-splash.php
-rwxr-x---.  1 nagios nagios   2383 Nov 15 03:30 page-home-main.php
-rwxr-x---.  1 nagios nagios    789 Nov 15 03:30 page-home.php
-rwxr-x---.  1 nagios nagios    667 Nov 15 03:30 page-missing.php
-rwxr-x---.  1 nagios nagios  21237 Nov 15 03:30 pageparts.inc.php
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 phpmailer
drwxr-x---.  2 nagios nagios   4096 Jul  1 05:48 themes
-rwxr-x---.  1 nagios nagios   4054 Nov 15 03:30 utils-auditlog.inc.php
-rwxr-x---.  1 nagios nagios  38420 Nov 15 03:30 utils-backend.inc.php
-rwxr-x---.  1 nagios nagios   9283 Nov 15 03:30 utils-ccm.inc.php
-rwxr-x---.  1 nagios nagios  31584 Nov 15 03:30 utils-commands.inc.php
-rwxr-x---.  1 nagios nagios   3392 Nov 15 03:30 utils-components.inc.php
-rwxr-x---.  1 nagios nagios  12064 Nov 15 03:30 utils-configwizards.inc.php
-rwxr-x---.  1 nagios nagios 137024 Nov 15 03:30 utils-dashboards.inc.php
-rwxr-x---.  1 nagios nagios 108076 Nov 15 03:30 utils-dashlets.inc.php
-rwxr-x---.  1 nagios nagios   5792 Nov 15 03:30 utils-email.inc.php
-rwxr-x---.  1 nagios nagios  20628 Nov 15 03:30 utils-events.inc.php
-rwxr-x---.  1 nagios nagios   2036 Nov 15 03:30 utils-graphtemplates.inc.php
-rwxrwx---.  1 nagios nagios  30890 Nov 15 03:30 utils.inc.php
-rwxr-x---.  1 nagios nagios 618092 Nov 15 03:30 utilsl.inc.php
-rwxr-x---.  1 nagios nagios   9298 Nov 15 03:30 utils-links.inc.php
-rwxr-x---.  1 nagios nagios  74450 Nov 15 03:30 utils-menu.inc.php
-rwxr-x---.  1 nagios nagios  27031 Nov 15 03:30 utils-metrics.inc.php
-rwxr-x---.  1 nagios nagios   1998 Nov 15 03:30 utils-mibs.inc.php
-rwxr-x---.  1 nagios nagios 227764 Nov 15 03:30 utils-nagioscore.inc.php
-rwxr-x---.  1 nagios nagios   2080 Nov 15 03:30 utils-notificationmethods.inc.php
-rwxr-x---.  1 nagios nagios 115796 Nov 15 03:30 utils-notifications.inc.php
-rwxr-x---.  1 nagios nagios  38981 Nov 15 03:30 utils-objects.inc.php
-rwxr-x---.  1 nagios nagios   2442 Nov 15 03:30 utils-perms.inc.php
-rw-------   1 nagios nagios   3751 Nov 15 03:30 utils-reports-export.inc.php
-rwxr-x---.  1 nagios nagios  42415 Nov 15 03:30 utils-reports.inc.php
-rw-r-----.  1 nagios nagios   1392 Nov 15 03:30 utils-rss.inc.php
-rwxr-x---.  1 nagios nagios   5624 Nov 15 03:30 utils-status.inc.php
-rwxr-x---.  1 nagios nagios   2379 Nov 15 03:30 utils-systat.inc.php
-rwxr-x---.  1 nagios nagios  14541 Nov 15 03:30 utils-tables.inc.php
-rwxr-x---.  1 nagios nagios    726 Nov 15 03:30 utils-themes.inc.php
-rw-r-----.  1 nagios nagios   7751 Nov 15 03:30 utils-timezones.inc.php
-rwxr-x---.  1 nagios nagios   3910 Nov 15 03:30 utils-tools.inc.php
-rwxr-x---.  1 nagios nagios   3738 Nov 15 03:30 utils-updatecheck.inc.php
-rwxr-x---.  1 nagios nagios  19467 Nov 15 03:30 utils-users.inc.php
-rwxr-x---.  1 nagios nagios  38100 Nov 15 03:30 utils-views.inc.php
-rwxr-x---.  1 nagios nagios   6705 Nov 15 03:30 utils-wizards.inc.php
-rwxr-x---.  1 nagios nagios  18640 Nov 15 03:30 utilsx.inc.php
-rwxr-x---.  1 nagios nagios  34326 Nov 15 03:30 utilsx-json.php
-rwxr-x---.  1 nagios nagios   4364 Nov 15 03:30 utils-xmlauditlog.inc.php
-rwxr-x---.  1 nagios nagios  37029 Nov 15 03:30 utils-xmlobjects.inc.php
-rwxr-x---.  1 nagios nagios  33689 Nov 15 03:30 utils-xmlreports.inc.php
-rwxr-x---.  1 nagios nagios  62346 Nov 15 03:30 utils-xmlstatus.inc.php
-rwxr-x---.  1 nagios nagios   7753 Nov 15 03:30 utils-xmlsysstat.inc.php
-rwxr-x---.  1 nagios nagios   1909 Nov 15 03:30 utils-xmlusers.inc.php
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by tgriep »

Run this as root to fix the permissions error from the Apache error log.

Code: Select all

chmod g+r /usr/local/nagiosxi/html/includes/utils-reports-export.inc.php
Then edit your /etc/sudoers file and under this line in that file

Code: Select all

#includedir /etc/sudoers.d
You need to add these 2 lines.

Code: Select all

Defaults:nagios !requiretty
Defaults:apache !requiretty
Save the file out and try the upgrade again.

If it fails, try running the manual upgrade procedure at this link.
https://assets.nagios.com/downloads/nag ... nstall.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by raamardhani7 »

tgriep wrote:Run this as root to fix the permissions error from the Apache error log.

Code: Select all

chmod g+r /usr/local/nagiosxi/html/includes/utils-reports-export.inc.php
Then edit your /etc/sudoers file and under this line in that file

Code: Select all

#includedir /etc/sudoers.d
You need to add these 2 lines.

Code: Select all

Defaults:nagios !requiretty
Defaults:apache !requiretty
Save the file out and try the upgrade again.

If it fails, try running the manual upgrade procedure at this link.
https://assets.nagios.com/downloads/nag ... nstall.pdf
Hi Tom,
Thanks for your inputs.. Yesterday I had a discussion with Sean Sax and he found the issue to be the permissions and we fixed that with his help and I upgraded Nagios XI for 3 instances and I am working on our Prod one :)

Below are the steps followed, that can help if someone is facing similar issue like me.

Code: Select all

cd /usr/local/nagiosxi/html
find . -type f -exec chmod 640 {} \;
find . -type d -exec chmod 750 {} \;
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by rkennedy »

Glad to see @ssax was able to help! Thanks for posting the reference that fixed your issue.

As this has been resolved, do you mind if I close this thread up?
Former Nagios Employee
raamardhani7
Posts: 459
Joined: Tue Jun 02, 2015 12:36 am

Re: NagiosSQL login failed -- Nagios XI upgrade 5.2.2

Post by raamardhani7 »

rkennedy wrote:Glad to see @ssax was able to help! Thanks for posting the reference that fixed your issue.

As this has been resolved, do you mind if I close this thread up?
Sure close this thread and thanks for the prompt responses :)
Locked