I had to restart our EC2 instance as it was running out of space, All I did at first was to increase the volume size.
After The instance had restarted I noted that the public Ip had changed, and I could no longer access the UI.
I did check the status of all the containers, and it seem like Postgres did not properly start I then tried to force rebuild all the containers and I could see this error:
redash_postgres_1 exited with code 1
$ docker ps:
08700e4a5325 postgres:9.6-alpine "docker-entrypoint.s…" 3 hours ago Restarting (1) 14 seconds ago redash_postgres_1`
$ sudo docker-compose up --force-recreate --build -d
redash_postgres_1 docker-entrypoint.sh postgres Restarting
postgres_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1 |
postgres_1 | LOG: database system was shut down at 2021-11-23 12:28:52 UTC
postgres_1 | LOG: invalid record length at 6/17E95520: wanted 24, got 0
postgres_1 | LOG: invalid primary checkpoint record
postgres_1 | LOG: invalid resource manager ID in secondary checkpoint record
postgres_1 | PANIC: could not locate a valid checkpoint record
postgres_1 | LOG: startup process (PID 22) was terminated by signal 6: Aborted
postgres_1 | LOG: aborting startup due to startup process failure
postgres_1 | LOG: database system is shut down`
When trying to access the database I get this:
psql: could not translate host name “postgres” to address: Try again