EnterpriseDB / barman

Barman - Backup and Recovery Manager for PostgreSQL
https://www.pgbarman.org/
GNU General Public License v3.0
2.13k stars 193 forks source link

Status: FATAL: the database system is in recovery mode #201

Closed fhbenatti closed 3 years ago

fhbenatti commented 5 years ago

I have two docker containers, both running postgres:10 image. The first container is my main PG server and the second i had installed barman 2.6 with WAL streaming and archive/ssh. The command "check" return everything ok and the backup works normally only in backup_method = postgres. But the result of barman diagnose give me an following connection error:

"status": {
                "archive_command": null, 
                "archive_mode": null, 
                "connection_error": "FATAL:  the database system is in recovery mode", 
                "current_xlog": null, 
                "data_directory": null, 
                "is_in_recovery": null, 
                "is_superuser": null, 
                "pg_basebackup_bwlimit": true, 
                "pg_basebackup_compatible": true, 
                "pg_basebackup_installed": true, 
                "pg_basebackup_path": "/usr/bin/pg_basebackup", 
                "pg_basebackup_tbls_mapping": true, 
                "pg_basebackup_version": "10.7-1.pgdg90+1)", 
                "pg_receivexlog_compatible": true, 
                "pg_receivexlog_installed": true, 
                "pg_receivexlog_path": "/usr/bin/pg_receivewal", 
                "pg_receivexlog_supports_slots": true, 
                "pg_receivexlog_synchronous": null, 
                "pg_receivexlog_version": "10.7-1.pgdg90+1)", 
                "pgespresso_installed": null, 
                "replication_slot": null, 
                "replication_slot_support": null, 
                "server_txt_version": null, 
                "streaming": null, 
                "streaming_supported": null, 
                "synchronous_standby_names": null, 
                "systemid": null, 
                "timeline": null, 
                "xlogpos": null
            }, 

When i shift to rsync method the backup doesn't work and the "check" command returns some errors about WAL streamming:

replication slot: FAILED (slot 'barman' not active: is 'receive-wal' running?)
receive-wal running: FAILED (See the Barman log file for more details)
EXCEPTION: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.

See log file for more details.

Any thoughts?

amenonsen commented 3 years ago

I think there must be some configuration error here. There's not enough information to diagnose (e.g., "See log file for more details"), and "the database system is in recovery mode" is an error from Postgres during crash recovery (or from a replica that does not have hot_standby=on). This is a very old issue, so I'm closing it now.