ECONNREFUSED : Immich Server
Hello, I followed the different migration steps
Database is starting properly but immich server container is restarting because of the following failure :
[Nest] 7 - 05/21/2025, 10:54:33 PM LOG [Microservices:EventRepository] Initialized websocket server
microservices worker error: Error: connect ECONNREFUSED 10.102.127.122:5432, stack: Error: connect ECONNREFUSED 10.102.127.122:5432
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16)
microservices worker exited with code 1
Killing api process
I have deployed immich on kubernetes, and I have no issue with network
Rollback to 1.132.3 worked successfully
Thanks
18 Replies
:wave: Hey @Elite,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.did you update your postgres or only the server? for the later, are you using the official charts?
thanks for your quick answer
i update the postgres running also as container in my kubernetes cluster (image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0)
postgres is working properly and ready to accept connections (i can easily browse table)
I am using the official immich chart yes, which is onboarding the postgres one
I'll leave it to @bo0tzz since he made the k8s charts (sorry 😬 )
no problem 🙂 thanks
Please post more detail. Logs, helm values, etc
Logs you have everyting in my initial message (i don't have so much more)
Helm value (postgres only):
postgresql:
enabled: true
image:
registry: ghcr.io
repository: immich-app/postgres
tag: 14-vectorchord0.3.0-pgvectors0.2.0
global:
postgresql:
auth:
existingSecret: immich-postgres-secret
username: immich
database: immich
primary:
containerSecurityContext:
runAsUser: 0
runAsNonRoot: false
readOnlyRootFilesystem: false
allowPrivilegeEscalation: true
privileged: true
initdb:
scripts:
create-extensions.sql: |
CREATE EXTENSION cube;
CREATE EXTENSION earthdistance;
CREATE EXTENSION vectors;
regarding server : i have nothing custom than specified in the initial config
Logs you have everyting in my initial message (i don't have so much more)It's only a snippet from the server contaienr, and nothing from for example postgres
Ok let me send you everything later on
Thank you 👍
Sorry for the delay,
Postgres logs :
immich server logs :
regarding machine learning logs, nothings seems wrong
And your full helm values etc?
Using an IP inside kube is pretty odd, are you sure that address is correct?
Usually you'd use the service name w/ DNS
Yes address is correct, i'm not using ip adress this is resolved inside the container
My postgres database is available through the service and only
immich-postgres:5432 (same namespace)
You should be moving away from the included postgres chart fwiw
But I have no idea why it's not working
Hmm ok I see, what are the alternative for that ?
alright thanks I will try and come back to you
Migrate from my postgres (immich chart) to cloud native, it is specify in the issue that i should this image : ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.5-v0.3.0@sha256:be3f025d79aa1b747817f478e07e71be43236e14d00d8a9eb3914146245035ba
but in the migration guide : ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0
Should I change safely ?
Will you provider a new version of helm chart with a clean of postgres ?
Thanks a lot 🙂
Depends on which postgres major version you're using
I won't be doing anything postgres in the chart
ok got it
so I can remove postgres from the chart
it perfectly worked, thank you 🙂