MuckRock / squarelet

MuckRock User Service
GNU Affero General Public License v3.0
11 stars 10 forks source link

PostgreSQL container boot is failing #76

Closed palewire closed 2 years ago

palewire commented 2 years ago

This error is coming up when I run docker-compose up. It occurs on one of my laptops, but not on a desktop computer where the code was running fine yesterday. I wonder if some underlying PostgreSQL or Docker configuration is the issue.

squarelet_postgres_1      | 2022-06-03 18:25:00.792 UTC [108] FATAL:  password authentication failed for user "rhS1jV8Xxs18HtcOL8ysoA4gNypqVm"
squarelet_postgres_1      | 2022-06-03 18:25:00.792 UTC [108] DETAIL:  Role "rhS1jV8Xxs18HtcOL8ysoA4gNypqVm" does not exist.
squarelet_postgres_1      |     Connection matched pg_hba.conf line 95: "host all all all md5"
palewire commented 2 years ago

This appears to be some issue with role creation after the first initialization of the container. If I recreate the python env file and reboot the image, the new random role doesn't seem to be created. That makes me think is likely caused by some user error on my part, where I don't fully understand how to reinitialize a postgres container after the first boot.

palewire commented 2 years ago

Dropping and recreating my postgresql docker volume did the trick. You should do the same if you encounter this problem.