I upgraded Discourse to latest stable version with complete rebuild yesterday. I’ve got this strange error this morning:
[2018-10-27 04:21:44] 'netpositive' has started the backup!
[2018-10-27 04:21:44] Marking backup as running...
[2018-10-27 04:21:44] Making sure '/var/www/discourse/tmp/backups/default/2018-10-27-042144' exists...
[2018-10-27 04:21:44] Making sure '/var/www/discourse/public/backups/default' exists...
[2018-10-27 04:21:44] Pausing sidekiq...
[2018-10-27 04:21:44] Waiting for sidekiq to finish running jobs...
[2018-10-27 04:21:44] Dumping the public schema of the database...
[2018-10-27 04:21:44] pg_dump: [archiver (db)] connection to database "discourse" failed: could not connect to server: Connection refused
[2018-10-27 04:21:44] Is the server running on host "172.17.0.1" and accepting
[2018-10-27 04:21:44] TCP/IP connections on port 5432?
[2018-10-27 04:21:44] EXCEPTION: pg_dump failed
[2018-10-27 04:21:44]
/var/www/discourse/lib/backup_restore/backuper.rb:172:in `dump_public_schema'
/var/www/discourse/lib/backup_restore/backuper.rb:37:in `run'
/var/www/discourse/lib/backup_restore/backup_restore.rb:167:in `block in start!'
/var/www/discourse/lib/backup_restore/backup_restore.rb:164:in `fork'
/var/www/discourse/lib/backup_restore/backup_restore.rb:164:in `start!'
/var/www/discourse/lib/backup_restore/backup_restore.rb:18:in `backup!'
/var/www/discourse/app/controllers/admin/backups_controller.rb:32:in `create'
[2018-10-27 04:21:44] Notifying 'netpositive' of the end of the backup...
[2018-10-27 04:21:53] Removing old backups...
The postgresql 9.6 server is running outside the container and it’s accessible on port 5433. If I manually run the pg_dump command inside the container then it works flawlessly and I haven’t detected any other DB related issue in Discourse.
Any idea why does it take wrong config settings?
Thanks a lot!