I
Immich•3y ago
Bean Man

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
Bean Man
Bean ManOP•3y ago
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
Alex Tran
Alex Tran•3y ago
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?
Bean Man
Bean ManOP•3y ago
I've tried restarting, redeploying, and deleting and redoing the whole thing it doesn't seem to do anything
Alex Tran
Alex Tran•3y ago
Can you post your docker-compose and your .env?
Bean Man
Bean ManOP•3y ago
yes one second
Alex Tran
Alex Tran•3y ago
Hmm your setup is pretty much the default, right?
Bean Man
Bean ManOP•3y ago
yes
Alex Tran
Alex Tran•3y ago
Are you deploying on bare metal? what is your deployment environment?
Bean Man
Bean ManOP•3y ago
I'm using a hetzner vps, so it's virtualized
Alex Tran
Alex Tran•3y ago
🤔 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 again
Bean Man
Bean ManOP•3y ago
that seemed to work i'm not very good at docker, probably didn't delete it the right way the first few times thanks
Alex Tran
Alex Tran•3y ago
No problem
jrasm91
jrasm91•3y ago
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.
Alex Tran
Alex Tran•3y ago
if you just bring down the container, all the data is persisted
Bean Man
Bean ManOP•3y ago
I thought deleting the data folder would delete it
Alex Tran
Alex Tran•3y ago
I still don't know why this happened once in a while
Bean Man
Bean ManOP•3y ago
i didn't realise there was a volume but that makes sense thanks
jrasm91
jrasm91•3y ago
Yup, postgres data is stored in PG data volume Did you by chance change the .env file password after running compose up?
Bean Man
Bean ManOP•3y ago
yeah, that's what was messin with it

Did you find this page helpful?