Page 1 of 1

upgrading nagiosxi with certificate issue

Posted: Mon Jan 18, 2016 9:54 pm
by amit.ahuja
i'm upgrading nagiosxi to 5.2.2 but failed at the last part regarding certificate. Can anyone help on this?

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=-O nagiosql.login--2016-01-18 21:51:19-- https://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:443... connected.
WARNING: cannot verify localhost’s certificate, issued by “/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=MA100DLVMON813/emailAddress=root@MA100DLVMON813”:
Self-signed certificate encountered.
WARNING: certificate common name “MA100DLVMON813” doesn't match requested host name “localhost”.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

Re: upgrading nagiosxi with certificate issue

Posted: Mon Jan 18, 2016 10:59 pm
by Box293
Can you please upload the file:
/etc/sudoers
Also, any files in /etc/sudoers.d/

How are you trying to run the upgrade? From the Nagios GUI or are you logged in to the server in a console while trying the manual upgrade procedure?
If you ran the upgrade from the GUI, it will create a upgrade.log file located in this folder.
/usr/local/nagiosxi/tmp/upgrade.log

If you ran the upgrade from manually from the console, it will create a upgrade.log file located in this folder.
/tmp/nagiosxi/tmp/upgrade.log

Please post the upgrade file for us to look at.

Re: upgrading nagiosxi with certificate issue

Posted: Tue Jan 19, 2016 9:31 am
by haile711
Here is the output of the sudoers file.

Code: Select all

ALL ALL=!SUDOSUDO
#
# End NA sudoers standard template Ver 8.1NA Date 2014-07-09 * Master * Refer NA14211028 End #






root    ALL=(ALL)       ALL
nagios    ALL=(ALL)       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 *

Code: Select all

ls -lrt /usr/local/nagiosxi/tmp/
total 0
-rw-r--r-- 1 apache nagios 0 Jan 18 10:44 http:__library.nagios.com_library_products_nagiosxi_documentation?format=feed&type=rss.xml
-rw-r--r-- 1 apache nagios 0 Jan 18 10:44 http:__labs.nagios.com_feed.xml
-rw-r--r-- 1 apache nagios 0 Jan 18 10:44 http:__api.nagios.com_feeds_xipromo_.xml

Re: upgrading nagiosxi with certificate issue

Posted: Tue Jan 19, 2016 11:52 am
by rkennedy
The lines I see related are here -

Code: Select all

NEW VALUES
--------------
xi_commands_command_id_seq = 380
xi_events_event_id_seq = 47839
xi_meta_meta_id_seq = 47834
xi_options_option_id_seq = 136
xi_sysstat_sysstat_id_seq = 101
xi_usermeta_usermeta_id_seq = 479
xi_users_user_id_seq = 50

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!
Are you using a proxy in your environment at all?

Re: upgrading nagiosxi with certificate issue

Posted: Tue Jan 19, 2016 12:18 pm
by amit.ahuja
no proxy, it's working for our current version right now Nagios XI 2014R2.7 . Could it be password? we haven't any password for nagiosql either, been using default. Again, only see this issue when upgrading from 2014R2.7 to 5.2.2. OS on the box is Redhat 6.6

Re: upgrading nagiosxi with certificate issue

Posted: Tue Jan 19, 2016 2:55 pm
by hsmith
Are both of your threads for the same server?

Re: upgrading nagiosxi with certificate issue

Posted: Tue Jan 19, 2016 3:16 pm
by haile711
2 different servers and 2 different issues.

Re: upgrading nagiosxi with certificate issue

Posted: Tue Jan 19, 2016 3:20 pm
by hsmith
Was the password for the nagiosxi MySQL user changed? That's what it's looking like.

Re: upgrading nagiosxi with certificate issue

Posted: Tue Jan 19, 2016 4:46 pm
by amit.ahuja
we're able to get this work. thanks

Re: upgrading nagiosxi with certificate issue

Posted: Tue Jan 19, 2016 4:53 pm
by bwallace
Thanks for that update, we'll lock this thread now and feel free to open another should you require assistance with anything else.