wraparound data loss in database "postgres"
Posted: Thu Mar 13, 2014 10:28 am
NagiosXI 2.9
centos 5.4 (final) VM (32 Bit)
1) Yesterday I was unable to login to the NagiosXI Web API..error "DB Connect Error [nagiosxi]: Database connection failed"
- I was able to login to nagios Core and see that the system was still monitoring correctly.
- reloading a VM snapshot taken the night before looked to have corrected the issue and accessing the NagiosXI web interface was again possible
2) Today im geting the same error again "DB Connect Error [nagiosxi]: Database connection failed"
-I tried running an upgrade (from 2.9 to 2.9) and see postgres is an issue
[root@nagiosxi tmp]# cd /tmp/nagiosxi
[root@nagiosxi nagiosxi]# ./upgrade
OLD VERSION: 320
Saving old crontab to /tmp/nagios.crontab.orig.1...
Removing XI cron jobs...
Saving old crontab to /tmp/root.crontab.orig.1...
Removing XI cron jobs...
Archive: sourceguardian/ixed4.lin.x86-32.zip
inflating: /usr/lib/php/modules/ixed.5.1.lin
Sourceguardian extension found for PHP version 5.1
Sourceguardian extension already in php.ini
Copying over new XI directory...
Building latest perms binary...
Updating NagiosQL...
NAGIOSQL-POST
Patching NDOUtils...
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres". in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
Updating sequences...
Nagios XI Postgres Database Sequence Information
OLD VALUES
--------------
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_commands_command_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_events_event_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_meta_meta_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_options_option_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_sysstat_sysstat_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_usermeta_usermeta_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_users_user_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
./nagiosxi/basedir/tools/fix_postgres_sequences.sh: line 17: [: -lt: unary operator expected
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
./nagiosxi/basedir/tools/fix_postgres_sequences.sh: line 25: [: -lt: unary operator expected
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
./nagiosxi/basedir/tools/fix_postgres_sequences.sh: line 33: [: -lt: unary operator expected
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
./nagiosxi/basedir/tools/fix_postgres_sequences.sh: line 41: [: -lt: unary operator expected
NEW VALUES
--------------
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_commands_command_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_events_event_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_meta_meta_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_options_option_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_sysstat_sysstat_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_usermeta_usermeta_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_users_user_id_seq =
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...
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres". in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
NAGIOSQL LOGIN FAILED!
[root@nagiosxi nagiosxi]#
-I tried re-installing postgresql and received the following message
[root@nagiosxi ~]# yum reinstall -y postgresql postgresql-devel
Loaded plugins: fastestmirror
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
* addons: mirrors.finalasp.com
* base: mirror.ash.fastserv.com
* epel: ftp.linux.ncsu.edu
* extras: centos.someimage.com
* updates: mirror.wiredtree.com
No package postgresql available.
* Maybe you meant: postgresql
No package postgresql-devel available.
* Maybe you meant: postgresql-devel
Nothing to do
[root@nagiosxi ~]#
- I tried vacuming the postgresql and get
[root@nagiosxi ~]# service postgresql stop
Stopping postgresql service: [ OK ]
[root@nagiosxi ~]# psql nagiosxi nagiosxi
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
[root@nagiosxi ~]#
Any other suggestions on how to proceed?
centos 5.4 (final) VM (32 Bit)
1) Yesterday I was unable to login to the NagiosXI Web API..error "DB Connect Error [nagiosxi]: Database connection failed"
- I was able to login to nagios Core and see that the system was still monitoring correctly.
- reloading a VM snapshot taken the night before looked to have corrected the issue and accessing the NagiosXI web interface was again possible
2) Today im geting the same error again "DB Connect Error [nagiosxi]: Database connection failed"
-I tried running an upgrade (from 2.9 to 2.9) and see postgres is an issue
[root@nagiosxi tmp]# cd /tmp/nagiosxi
[root@nagiosxi nagiosxi]# ./upgrade
OLD VERSION: 320
Saving old crontab to /tmp/nagios.crontab.orig.1...
Removing XI cron jobs...
Saving old crontab to /tmp/root.crontab.orig.1...
Removing XI cron jobs...
Archive: sourceguardian/ixed4.lin.x86-32.zip
inflating: /usr/lib/php/modules/ixed.5.1.lin
Sourceguardian extension found for PHP version 5.1
Sourceguardian extension already in php.ini
Copying over new XI directory...
Building latest perms binary...
Updating NagiosQL...
NAGIOSQL-POST
Patching NDOUtils...
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres". in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
Updating sequences...
Nagios XI Postgres Database Sequence Information
OLD VALUES
--------------
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_commands_command_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_events_event_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_meta_meta_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_options_option_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_sysstat_sysstat_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_usermeta_usermeta_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_users_user_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
./nagiosxi/basedir/tools/fix_postgres_sequences.sh: line 17: [: -lt: unary operator expected
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
./nagiosxi/basedir/tools/fix_postgres_sequences.sh: line 25: [: -lt: unary operator expected
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
./nagiosxi/basedir/tools/fix_postgres_sequences.sh: line 33: [: -lt: unary operator expected
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
./nagiosxi/basedir/tools/fix_postgres_sequences.sh: line 41: [: -lt: unary operator expected
NEW VALUES
--------------
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_commands_command_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_events_event_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_meta_meta_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_options_option_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_sysstat_sysstat_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_usermeta_usermeta_id_seq =
psql: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres".
xi_users_user_id_seq =
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...
PHP Warning: pg_pconnect(): Unable to connect to PostgreSQL server: FATAL: database is not accepting commands to avoid wraparound data loss in database "postgres"
HINT: Stop the postmaster and use a standalone backend to vacuum database "postgres". in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres64.inc.php on line 682
DB Connect Error [nagiosxi]: Database connection failed
ERROR CONNECTING TO DATABASES!
NAGIOSQL LOGIN FAILED!
[root@nagiosxi nagiosxi]#
-I tried re-installing postgresql and received the following message
[root@nagiosxi ~]# yum reinstall -y postgresql postgresql-devel
Loaded plugins: fastestmirror
Setting up Reinstall Process
Loading mirror speeds from cached hostfile
* addons: mirrors.finalasp.com
* base: mirror.ash.fastserv.com
* epel: ftp.linux.ncsu.edu
* extras: centos.someimage.com
* updates: mirror.wiredtree.com
No package postgresql available.
* Maybe you meant: postgresql
No package postgresql-devel available.
* Maybe you meant: postgresql-devel
Nothing to do
[root@nagiosxi ~]#
- I tried vacuming the postgresql and get
[root@nagiosxi ~]# service postgresql stop
Stopping postgresql service: [ OK ]
[root@nagiosxi ~]# psql nagiosxi nagiosxi
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
[root@nagiosxi ~]#
Any other suggestions on how to proceed?