NagiosSQL login failed -- Nagios XI upgrade 5.2.2
Posted: Sun Nov 15, 2015 3:25 am
Hi Team,
I am facing below error while trying to upgrade Nagios XI to the latest version. I am using Linux.
Output of upgrade
Now I am unable to login to the portal after I ran the upgrade script, please help me with this.
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
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!