Nagios upgrade problems from 2014R1.2 to 5.3.4
Posted: Tue Dec 20, 2016 9:54 am
Hi,
I have a 2014R1.2 version of nagios xi with nagios core 4.0.7. I've been testing the update without much success. First I though it was related to some bad configuration but ssax from the support team helped me fixed the configuration issues I had. I tried to run it again and as before it ends with the following DDBB errors:
I did saw that nagios core is the only think that gets update from 4.0.7 to 4.1.1.
I tried to run again the upgrade and got the following error:
I found the thread https://support.nagios.com/forum/viewto ... 16&t=40525 that seems similar.
I was looking to the upgrade script but it have been modified since that post because the lines mention have no reference to mysql, but I guess now are 828 to 847 so I tried commenting those and run it again. This time it finish at the following line
Using echo I narrowed it down to the flowing lines where it tries to update the sudoers
And inside the install-sudoers it fails at the first 2 lines
I running the update script as root so I don't know what might be the issue
Attached is the upgrade.log file with some of the updates. I didn't include the last upgrade with the last runs as I'm getting always the same now.
I have a 2014R1.2 version of nagios xi with nagios core 4.0.7. I've been testing the update without much success. First I though it was related to some bad configuration but ssax from the support team helped me fixed the configuration issues I had. I tried to run it again and as before it ends with the following DDBB errors:
Code: Select all
DASHLET NAME: rss_dashlet
CMD=grep register_dashlet /usr/local/nagiosxi/tmp/rqr24/rss_dashlet/rss_dashlet. inc.php | wc -l
1
OUT=1
Dashlet looks ok...
CMD: cp -rf /usr/local/nagiosxi/tmp/rqr24/rss_dashlet /usr/local/nagiosxi/html/i ncludes/dashlets/
CMD: rm -rf /usr/local/nagiosxi/tmp/rqr24
CMD: . /usr/local/nagiosxi/var/xi-sys.cfg && chown -R $nagiosuser /usr/local/nag iosxi/html/includes/dashlets/rss_dashlet
Done!
Dashlets installed/updated OK
ALTER TABLE
ALTER TABLE
UPDATE 59
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
CREATE SEQUENCE
CREATE TABLE
ERROR 1060 (42S21) at line 39: Duplicate column name 'exclude'I tried to run again the upgrade and got the following error:
Code: Select all
DASHLET NAME: rss_dashlet
CMD=grep register_dashlet /usr/local/nagiosxi/tmp/roin7/rss_dashlet/rss_dashlet.inc.php | wc -l
1
OUT=1
Dashlet looks ok...
CMD: cp -rf /usr/local/nagiosxi/tmp/roin7/rss_dashlet /usr/local/nagiosxi/html/includes/dashlets/
CMD: rm -rf /usr/local/nagiosxi/tmp/roin7
CMD: . /usr/local/nagiosxi/var/xi-sys.cfg && chown -R $nagiosuser /usr/local/nagiosxi/html/includes/dashlets/rss_dashlet
Done!
Dashlets installed/updated OK
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 59
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'I was looking to the upgrade script but it have been modified since that post because the lines mention have no reference to mysql, but I guess now are 828 to 847 so I tried commenting those and run it again. This time it finish at the following line
Code: Select all
Saving old init script to /tmp/nagios.init.orig.3...
Saving old crontab to /tmp/nagios.crontab.orig...
Removing XI cron jobs...
Saving old crontab to /tmp/root.crontab.orig...
Removing XI cron jobs...Code: Select all
937 echo "fail after crontab"
938 # Fix/update sudoers
939 if [ $UPDATE_SUDOERS -eq 1 ]; then
940 ./install-sudoers
941 fi
942 echo "Fail after sudoers"Code: Select all
# Remove old sudoers entries
grep -v NAGIOSXI /etc/sudoers > /etc/sudoers.new
mv -f /etc/sudoers.new /etc/sudoersAttached is the upgrade.log file with some of the updates. I didn't include the last upgrade with the last runs as I'm getting always the same now.