Page 1 of 2

Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Mon Oct 10, 2016 4:57 am
by sib
Hi

Trying to upgrade to 5.3 but it fails with the following output

Code: Select all

NEW VALUES
--------------
xi_commands_command_id_seq = 848
xi_events_event_id_seq = 31697
xi_meta_meta_id_seq = 31701
xi_options_option_id_seq = 159
xi_sysstat_sysstat_id_seq = 101
xi_usermeta_usermeta_id_seq = 643
xi_users_user_id_seq = 54

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: https://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://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
When I manually run it while nagiosxi is running

Code: Select all

# /usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=n@gweb' -O nagiosql.login
--2016-10-10 11:52:26--  https://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:443... connected.
WARNING: cannot verify localhost’s certificate, issued by “/C=CH/ST=Basel/L=Basel/O=Bank For International Settlements/OU=IMS/CN=lbnss22/[email protected]”:
  Self-signed certificate encountered.
    WARNING: certificate common name “lbnss22” doesn't match requested host name “localhost”.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

    [   <=>                                                                                                              ] 36,629      23.6K/s   in 1.5s

2016-10-10 11:52:32 (23.6 KB/s) - “nagiosql.login” saved [36629]
You are searching for logout I guess

Code: Select all

# grep logout /home/ch002854/nagiosql.login
                Logged in as: nagiosxi <a href='index.php?cmd=logout'>Logout</a>            </div>
Reading from other posts. This is the output of show grants for the user nagiosql

Code: Select all

mysql> show grants for nagiosql@'localhost'
    -> ;
+-----------------------------------------------------------------------------------------------------------------+
| Grants for nagiosql@localhost                                                                                   |
+-----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'nagiosql'@'localhost' IDENTIFIED BY PASSWORD '*244733929909A95DDF1A7F78DD067589B4092EE7' |
| GRANT ALL PRIVILEGES ON `nagiosql`.* TO 'nagiosql'@'localhost' WITH GRANT OPTION                                |
+-----------------------------------------------------------------------------------------------------------------+
2 rows in set (0.01 sec)

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Mon Oct 10, 2016 10:27 am
by lmiltchev
Have you tried the solution posted here: https://support.nagios.com/forum/viewtopic.php?f=16&t=40524 ?

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Mon Oct 10, 2016 11:16 am
by sib
you mean this solution ?

https://support.nagios.com/forum/viewto ... 24#p198135

Will try it tomorrow.

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Mon Oct 10, 2016 11:47 am
by avandemore
sib,

Please let us know if that resolved your issue after you've had the time to test. Thanks for using the Nagios forums!

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Tue Oct 11, 2016 2:29 am
by sib
Hi

The solution said to change a line but it was already changed to that

Code: Select all

 # Update nagiosql database structure (session locking / negation)
    mysql -h $cfg__db_info__nagiosql__dbserver -u $cfg__db_info__nagiosql__user --password="$cfg__db_info__nagiosql__pwd" --database=$cfg__db_info__nagiosql__db < subcomponents/nagiosql/mods/schema_01.sql

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Tue Oct 11, 2016 2:53 am
by sib
Ok. I got a bit further. But now I am stuck with

Code: Select all

OUTPUT:
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
Error: Template 'use' specified in host definition could not be not found (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting on line 378)
   Error processing object config files!


***> One or more problems was encountered while processing the config files...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.
RET: 1
No log handling enabled - turning on stderr logging
This is the output of the hosttemplates.cfg

Code: Select all

###############################################################################
#
# Host template configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date:       2016-10-11 08:00:58
# Version:    Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
       name                                     BIS_corpsec
       alias                                    Default Host
       hostgroups                               corpsec
       check_command                            check-host-alive
       initial_state                            u
       max_check_attempts                       5
       check_interval                           1
       retry_interval                           1
       check_period                             24x7
       event_handler_enabled                    1
       flap_detection_enabled                   0
       process_perf_data                        1
       retain_status_information                1
       retain_nonstatus_information             1
       contacts                                 Linux Team E-Mail,Linux Team SMS
       notification_interval                    0
       notification_period                      24x7
       notification_options                     d,u,r,
       notifications_enabled                    1
       icon_image                               redhat.png
       statusmap_image                          redhat.png
       register                                 0

}

define host {
       name                                     BIS_dev_host
       alias                                    Default Host
       hostgroups                               devua
       check_command                            check-host-alive
       initial_state                            u
       max_check_attempts                       1
       check_interval                           5
       retry_interval                           1
       check_period                             24x7
       event_handler_enabled                    1
       flap_detection_enabled                   0
       process_perf_data                        1
       retain_status_information                1
       retain_nonstatus_information             1
       contacts                                 Linux Team E-Mail
       notification_interval                    0
       notification_period                      24x7
       notification_options                     d,u,r,
       notifications_enabled                    1
       icon_image                               redhat.png
       statusmap_image                          redhat.png
       register                                 0

}

define host {
       name                                     BIS_Package
       alias                                    Default Package
       hostgroups                               all
       check_command                            check-host-alive
       initial_state                            u
       max_check_attempts                       5
       check_interval                           1
       retry_interval                           1
       check_period                             24x7
       event_handler_enabled                    1
       flap_detection_enabled                   0
       process_perf_data                        1
       retain_status_information                1
       retain_nonstatus_information             1
       contacts                                 Linux Team E-Mail,Linux Team SMS
       notification_interval                    0
       notification_period                      24x7
       notification_options                     d,u,r,
       notifications_enabled                    1
       icon_image                               package.png
       statusmap_image                          package.png
       register                                 0

}

define host {
       name                                     BIS_prod_host
       alias                                    Default Host
       hostgroups                               prod
       check_command                            check-host-alive
       initial_state                            u
       max_check_attempts                       5
       check_interval                           1
       retry_interval                           1
       check_period                             24x7
       event_handler_enabled                    1
       flap_detection_enabled                   0
       process_perf_data                        1
       retain_status_information                1
       retain_nonstatus_information             1
       contacts                                 Linux Team E-Mail,Linux Team SMS
       notification_interval                    0
       notification_period                      24x7
       notification_options                     d,u,r,
       notifications_enabled                    1
       icon_image                               redhat.png
       statusmap_image                          redhat.png
       register                                 0

}

###############################################################################
#
# Check command configuration file
#
# END OF FILE
#
###############################################################################

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Tue Oct 11, 2016 10:29 am
by avandemore
Please zip up "/usr/local/nagios/etc/" directory and PM the zip file to myself or another Nagios support team member.

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Tue Oct 18, 2016 3:53 am
by sib
Hi

I uploaded the ZIP to you last week.

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Tue Oct 18, 2016 1:47 pm
by avandemore
In XI > Configure > CCM > Host Templates click on the Floppy Disk icon in any row. Please paste the block of code line 378 is in.

Re: Upgrade 5.2.9 to 5.3.0 fails with LOGIN FAILED

Posted: Wed Oct 19, 2016 2:28 am
by sib
Hi

There is no line 378. Maybe because I deactivated the xiwizard templates?