Re: nagiosxi SQL constraint error after upgrade to 5.3.1
Posted: Tue Nov 22, 2016 3:53 pm
Previous (locked) thread: https://support.nagios.com/forum/viewto ... 16&t=40934
Well, this issue returned with a vengeance. Below is the error I'm getting now while trying to deploy changes in Admin > Notification Management to two contact groups. I updated /usr/local/nagiosxi/tools/fix_postgres_sequences.sh as requested in the previous thread and ran it with the output below. It did not resolve the issue.
Upgrade.log below from one of the affected servers.
I've realized that the three affected servers all have one thing in common - some of their configs were copied over from the first Nagios server I built, which kind of acts like a master, and is not experiencing this issue. They've always been on the same version of Nagios when configs were copied. I emailed you guys previously for help finding a process that would copy users and their dashboards from one Nagios server to another. The process you provided is below. Is this related? What do?
Well, this issue returned with a vengeance. Below is the error I'm getting now while trying to deploy changes in Admin > Notification Management to two contact groups. I updated /usr/local/nagiosxi/tools/fix_postgres_sequences.sh as requested in the previous thread and ran it with the output below. It did not resolve the issue.
Code: Select all
Nagios XI Postgres Database Sequence Information
OLD VALUES
--------------
xi_commands_command_id_seq = 620
xi_events_event_id_seq = 32192
xi_meta_meta_id_seq = 32199
xi_options_option_id_seq = 165
xi_sysstat_sysstat_id_seq = 101
xi_usermeta_usermeta_id_seq = 1129
xi_users_user_id_seq = 52
NEW VALUES
--------------
xi_commands_command_id_seq = 620
xi_events_event_id_seq = 32192
xi_meta_meta_id_seq = 32199
xi_options_option_id_seq = 165
xi_sysstat_sysstat_id_seq = 101
xi_usermeta_usermeta_id_seq = 1129
xi_users_user_id_seq = 52Code: Select all
On source host
pg_dump -h 127.0.0.1 -U nagiosxi -c -t xi_users -t xi_usermeta > /tmp/pg_userdump.sql
Transfer file to new server
On destination host
psql nagiosxi nagiosxi < /tmp/pg_userdump.sql