Upgrade to 5.3 failing

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Upgrade to 5.3 failing

Post by bosecorp »

I installed the latest version on my dev server. worked fine

on my production here is the error......

my db is offloaded

Done!
Installing 'dashlets/rss_dashlet.zip'
TMPNAME: 46ask
Archive: /tmp/nagiosxi/subcomponents/xidashlets/dashlets/rss_dashlet.zip
206627671d4768b80169bfd215dc1206afa2277c
creating: rss_dashlet/
creating: rss_dashlet/magpierss/
inflating: rss_dashlet/magpierss/AUTHORS
inflating: rss_dashlet/magpierss/CHANGES
inflating: rss_dashlet/magpierss/ChangeLog
inflating: rss_dashlet/magpierss/INSTALL
inflating: rss_dashlet/magpierss/NEWS
inflating: rss_dashlet/magpierss/README
inflating: rss_dashlet/magpierss/TROUBLESHOOTING
inflating: rss_dashlet/magpierss/cookbook
creating: rss_dashlet/magpierss/extlib/
inflating: rss_dashlet/magpierss/extlib/Snoopy.class.inc
creating: rss_dashlet/magpierss/htdocs/
inflating: rss_dashlet/magpierss/htdocs/cookbook.html
inflating: rss_dashlet/magpierss/htdocs/index.html
inflating: rss_dashlet/magpierss/rss_cache.inc
inflating: rss_dashlet/magpierss/rss_fetch.inc
inflating: rss_dashlet/magpierss/rss_parse.inc
inflating: rss_dashlet/magpierss/rss_utils.inc
creating: rss_dashlet/magpierss/scripts/
inflating: rss_dashlet/magpierss/scripts/README
inflating: rss_dashlet/magpierss/scripts/magpie_debug.php
inflating: rss_dashlet/magpierss/scripts/magpie_simple.php
inflating: rss_dashlet/magpierss/scripts/magpie_slashbox.php
inflating: rss_dashlet/magpierss/scripts/simple_smarty.php
creating: rss_dashlet/magpierss/scripts/smarty_plugin/
inflating: rss_dashlet/magpierss/scripts/smarty_plugin/modifier.rss_date_parse.php
creating: rss_dashlet/magpierss/scripts/templates/
inflating: rss_dashlet/magpierss/scripts/templates/simple.smarty
inflating: rss_dashlet/rss.jpg
inflating: rss_dashlet/rss_dashlet.css
inflating: rss_dashlet/rss_dashlet.inc.php
rss_dashlet
DASHLET NAME: rss_dashlet
CMD=grep register_dashlet /usr/local/nagiosxi/tmp/46ask/rss_dashlet/rss_dashlet.inc.php | wc -l
1
OUT=1
Dashlet looks ok...
CMD: cp -rf /usr/local/nagiosxi/tmp/46ask/rss_dashlet /usr/local/nagiosxi/html/includes/dashlets/
CMD: rm -rf /usr/local/nagiosxi/tmp/46ask
CMD: . /usr/local/nagiosxi/var/xi-sys.cfg && chown -R $nagiosuser /usr/local/nagiosxi/html/includes/dashlets/rss_dashlet


Done!
Dashlets installed/updated OK
ALTER TABLE
ALTER TABLE
UPDATE 108
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
CREATE SEQUENCE
CREATE TABLE
ERROR 1045 (28000): Access denied for user 'nagiosql'@'myservername' (using password: YES)
You have new mail in /var/spool/mail/root
Last edited by dwhitfield on Mon Oct 10, 2016 9:24 am, edited 1 time in total.
Reason: marking with green check mark
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade to 5.3 failing

Post by lmiltchev »

Did you follow ALL of the steps, outlined in the Nagios XI – Offloading MySQL to Remote Server document?
> GRANT ALL ON nagiosql.* TO nagiosql@'<IP_OF_NAGIOS_XI_SERVER>' IDENTIFIED BY 'nagiosql';
Log in mysql on the offloaded mysql server, run the following command, and show the output:

Code: Select all

echo "show grants for 'nagiosql'@'<nagios xi ip address>';"
Be sure to check out our Knowledgebase for helpful articles and solutions!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Upgrade to 5.3 failing

Post by bosecorp »

Yes, I did


mysql> show grants for 'nagiosql'@'10.100.30.111';
+---------------------------------------------------------------------------------------------------------------------+
| Grants for [email protected] |
+---------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'nagiosql'@'10.100.30.111' IDENTIFIED BY PASSWORD '*FAA8329A4686D5A4F44ECEA789A1BF7B76373F5E' |
| GRANT ALL PRIVILEGES ON `nagiosql`.* TO 'nagiosql'@'10.100.30.111' |
+---------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Upgrade to 5.3 failing

Post by jomann »

Can you edit the upgrade file, can you replace line 828 (which should look similar to the one below) with:

Code: Select all

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
Or you can just look for where it says "cfg__db_info__nagioxi__pwd" in that line, and change it to "cfg__db_info__nagiosql__pwd" - there's a hotfix in place now if you re-download the tarball but it looks like the upgrade script did not have the correct variable name for upgrading the nagiosql database.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Upgrade to 5.3 failing

Post by bosecorp »

I get this error now

downloaded again the tar file

psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:2: ERROR: column "api_key" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:3: ERROR: column "api_enabled" of relation "xi_users" already exists
UPDATE 108
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:8: ERROR: column "login_attempts" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:9: ERROR: column "last_attempt" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:10: ERROR: column "last_password_change" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:13: ERROR: column "last_login" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:14: ERROR: column "last_edited" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:15: ERROR: column "last_edited_by" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:16: ERROR: column "created_by" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:17: ERROR: column "created_time" of relation "xi_users" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:24: ERROR: relation "xi_eventqueue_eventqueue_id_seq" already exists
psql:nagiosxi/nagiosxi-db/mods/pgsql/schema_01.sql:33: ERROR: relation "xi_eventqueue" already exists
ERROR 1060 (42S21) at line 39: Duplicate column name 'exclude'
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Upgrade to 5.3 failing

Post by jomann »

This error at the end:

Code: Select all

ERROR 1060 (42S21) at line 39: Duplicate column name 'exclude'
Basically means that you're hitting the nagiosql portion of it, and the alterations that it is trying to make already exists. Can you edit your upgrade script and comment out lines 820-828 with #'s and try running it again? Once you get the full upgrade installed you can run these MySQL commands on the nagiosql table to make sure that your nagiosql was completely updated. Most (if not all) of the below SQL commands will fail, but it's just to make sure you can use the exclude function in the CCM once you've finished upgrading.

Code: Select all

ALTER TABLE nagiosql.tbl_lnkServiceToHost ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkServiceToHostgroup ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkServicetemplateToHost ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkServicetemplateToHostgroup ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkServiceescalationToHost ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkServiceescalationToHostgroup ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkHostescalationToHost ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkHostescalationToHostgroup ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkHostgroupToHost ADD COLUMN exclude boolean NOT NULL;
ALTER TABLE nagiosql.tbl_lnkHostgroupToHostgroup ADD COLUMN exclude boolean NOT NULL;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Upgrade to 5.3 failing

Post by bosecorp »

get this error now

Done!
Dashlets installed/updated OK
Attempting to read global hard/soft nofile limits failed. Check /etc/security/limits.conf and try again!
You have mail in /var/spool/mail/root
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Upgrade to 5.3 failing

Post by jomann »

This is due to the upgrade script trying to automatically set higher file limits for MRTG.
You can also comment out line 834 which will cause the upgrade not to increase the file limits or you can configure the /etc/security/limits.conf to allow it to actually read and set the new file limits depending on what you'd like to do. While you don't necessarily need the file limit changes to run XI, it will help increase the performance on large systems.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Upgrade to 5.3 failing

Post by bosecorp »

made progress, but the in another part of the process is trying to do the same

for x in ./images/*.gif ./images/*.png; do \
/usr/bin/install -c -m 644 $x /usr/share/mrtg2/icons; done
/bin/sh ./mkinstalldirs /usr/share/doc/mrtg2
(cd .; for x in COPYING COPYRIGHT README CHANGES THANKS doc/*.pod doc/*.txt doc/*.png; do \
/usr/bin/install -c -m 644 $x /usr/share/doc/mrtg2; done)
/bin/sh ./mkinstalldirs /usr/share/man/man1
for x in ./doc/*.1; do \
/usr/bin/install -c -m 644 $x /usr/share/man/man1; done
MRTG-POST
Attempting to read global hard/soft nofile limits failed. Check /etc/security/limits.conf and try again!
bosecorp
Posts: 929
Joined: Thu Jun 26, 2014 1:00 pm

Re: Upgrade to 5.3 failing

Post by bosecorp »

Nevermind worked.

I am going to the the mysql part you asked me..
Locked