I
Immich•3y ago
ayoungjoey

Error: no pg_hba.conf entry for host "172.19.0.4", user "postgres", database "immich", no encryption

Hi, I am trying to setup immich through portainer and received this error on the logs. I was following the official immich guide for portainer. I used the exact docker-compose.yml and .env files from the github except I changed all of the ".env" to "stack.env" on the .yml file, and I changed the backup location to a location on my machine. When I try to visit the webpage where the server is supposed to have the login page, it says 500 | connect ECONNREFUSED 172.19.0.5:3001. immich_microservices is on 172.19.0.4 if that helps. Thanks
34 Replies
Alex Tran
Alex Tran•3y ago
try to bring down the stack and then bring them back up again
jrasm91
jrasm91•3y ago
And/or send us the immich server container logs
ayoungjoey
ayoungjoeyOP•3y ago
Ok, thanks Ok, bringing it down and back up again didn't work. I'll send the logs now
Alex Tran
Alex Tran•3y ago
this means the typesense container is still bringing itself up, indexing the assets and it doesn't relate to database error message afaik
ayoungjoey
ayoungjoeyOP•3y ago
oh okay It seems to keep running through this though It says retrying but then fails
Alex Tran
Alex Tran•3y ago
yeah it might take a few retry
ayoungjoey
ayoungjoeyOP•3y ago
According to portainer immich_typesense has been running for 8 minutes So I would think that it should have indexed by now?
Alex Tran
Alex Tran•3y ago
it should, is the server still restarting? How many assets do you have?
ayoungjoey
ayoungjoeyOP•3y ago
No, everything is running
Alex Tran
Alex Tran•3y ago
I have about 20K of assets and it takes about 20 seconds to complete start up
ayoungjoey
ayoungjoeyOP•3y ago
Nothing is backed up yet. Is that what you mean?
Alex Tran
Alex Tran•3y ago
yep Can you try accessing the web now?
ayoungjoey
ayoungjoeyOP•3y ago
I'm still getting the same errors
Alex Tran
Alex Tran•3y ago
Can you take a screenshot of your setup?
ayoungjoey
ayoungjoeyOP•3y ago
If it makes a difference I'm running this locally
Alex Tran
Alex Tran•3y ago
just to double check on things
ayoungjoey
ayoungjoeyOP•3y ago
Yes Which part do you want a screenshot of?
Alex Tran
Alex Tran•3y ago
gotta run now, will cycle back and take a look later docker-compose and .env
ayoungjoey
ayoungjoeyOP•3y ago
Ok will do
ayoungjoey
ayoungjoeyOP•3y ago
No description
jrasm91
jrasm91•3y ago
I believe this error is a TypeOrmModule error, and it is related to being unable to connect to the database.
ayoungjoey
ayoungjoeyOP•3y ago
Do you have any advice on how to troubleshoot this?
jrasm91
jrasm91•3y ago
This is a brand new installation?
ayoungjoey
ayoungjoeyOP•3y ago
Yes
jrasm91
jrasm91•3y ago
I would try to stop and remove the database container, then delete the database volume, then start the stack again. I would just stop/remove the stack, then make sure the volume pgdata is deleted, then start the stack again.
ayoungjoey
ayoungjoeyOP•3y ago
Ok I'll try that
jrasm91
jrasm91•3y ago
You normally don't want to delete pgdata as that is your database and all your metadata about your photos, but since it is a new install it should be fine to clear it and try again. Don't normally do that to try to "fix" something though 😄
ayoungjoey
ayoungjoeyOP•3y ago
Ok haha When you say remote the database container, are you referring to immich_server?
jrasm91
jrasm91•3y ago
The postgres one
ayoungjoey
ayoungjoeyOP•3y ago
Ah okay
jrasm91
jrasm91•3y ago
"server" -> "immich_server" "microservices" -> "immich_microservices" "database" -> "immich_postgres"
ayoungjoey
ayoungjoeyOP•3y ago
Ok, that makes sense. Thanks That worked. Thank you so much

Did you find this page helpful?