connect ECONNREFUSED 172.19.0.6:3001 - ECONNREFUSED
I keep having problems when setting up immich where the database user doesn't seem to accept any credentials from the server container
20 Replies
here are the logs
postgres:
2023-02-13 02:57:07.203 UTC [399] FATAL: password authentication failed for user "immich"
2023-02-13 02:57:07.203 UTC [399] DETAIL: Role "immich" does not exist.
Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"
server:
[Nest] 1 - 02/13/2023, 2:58:32 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (7)...
error: password authentication failed for user "immich"
at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/usr/src/app/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket.<anonymous> (/usr/src/app/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (node:events:527:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
I tried setting both the username and password for the user as just immich in both the .env and the docker-compose but it didn't change anything
Can you help posting your setup?
Sometimes we received this error due to the weird state in Docker itself, can you try to bring down the whole stack and then bring them up again?
I've tried restarting, redeploying, and deleting and redoing the whole thing it doesn't seem to do anything
Can you post your docker-compose and your .env?
yes one second
Hmm your setup is pretty much the default, right?
yes
Are you deploying on bare metal? what is your deployment environment?
I'm using a hetzner vps, so it's virtualized
🤔 I don't see anything wrong with your setup
when you redeploying the stack, did you remove the pg_data volume?
trying bring down all container
then perform
docker container prune
and then docker volume prune
then bring them up againthat seemed to work
i'm not very good at docker, probably didn't delete it the right way the first few times
thanks
No problem
Specifically the postgres password stuff is configured the first time it starts up, so that may have happened. Only way to fix it is to delete the volume.
if you just bring down the container, all the data is persisted
I thought deleting the data folder would delete it
I still don't know why this happened once in a while
i didn't realise there was a volume
but that makes sense
thanks
Yup, postgres data is stored in PG data volume
Did you by chance change the .env file password after running compose up?
yeah, that's what was messin with it