I
Immich2w ago
Elite

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
Immich
Immich2w ago
: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.
NoMachine
NoMachine2w ago
did you update your postgres or only the server? for the later, are you using the official charts?
Elite
EliteOP2w ago
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
NoMachine
NoMachine2w ago
I'll leave it to @bo0tzz since he made the k8s charts (sorry 😬 )
Elite
EliteOP2w ago
no problem 🙂 thanks
bo0tzz
bo0tzz2w ago
Please post more detail. Logs, helm values, etc
Elite
EliteOP2w ago
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
bo0tzz
bo0tzz2w ago
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
Elite
EliteOP2w ago
Ok let me send you everything later on Thank you 👍 Sorry for the delay, Postgres logs :
Using SSD storage

PostgreSQL Database directory appears to contain a database; Skipping initialization

2025-05-23 07:46:49.030 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.conf"
2025-05-23 07:46:49.030 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf"
2025-05-23 07:46:49.030 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.conf"
2025-05-23 07:46:49.030 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf"
2025-05-23 07:46:51.142 GMT [1] LOG: starting PostgreSQL 14.17 (Debian 14.17-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-05-23 07:46:51.142 GMT [1] LOG: listening on IPv6 address "::1", port 5432
2025-05-23 07:46:51.142 GMT [1] LOG: listening on IPv4 address "127.0.0.1", port 5432
2025-05-23 07:46:51.149 GMT [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-05-23 07:46:51.172 GMT [28] LOG: database system was shut down at 2025-05-23 07:46:46 GMT
[2025-05-23T07:46:51Z INFO service::utils::clean] Find directory "pg_vectors/indexes/308169".
[2025-05-23T07:46:51Z INFO service::utils::clean] Find directory "pg_vectors/indexes/93919".
[2025-05-23T07:46:51Z INFO service::utils::clean] Find directory "pg_vectors/indexes/308169/segments/c3ea712a-d333-462b-bb36-1e8156609d24".
[2025-05-23T07:46:51Z INFO service::utils::clean] Find directory "pg_vectors/indexes/93919/segments/dc90805b-5994-4f76-98ee-69d52f35411f".
2025-05-23 07:46:51.217 GMT [1] LOG: database system is ready to accept connections
Using SSD storage

PostgreSQL Database directory appears to contain a database; Skipping initialization

2025-05-23 07:46:49.030 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.conf"
2025-05-23 07:46:49.030 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf"
2025-05-23 07:46:49.030 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.conf"
2025-05-23 07:46:49.030 GMT [1] LOG: skipping missing configuration file "/var/lib/postgresql/data/postgresql.override.conf"
2025-05-23 07:46:51.142 GMT [1] LOG: starting PostgreSQL 14.17 (Debian 14.17-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2025-05-23 07:46:51.142 GMT [1] LOG: listening on IPv6 address "::1", port 5432
2025-05-23 07:46:51.142 GMT [1] LOG: listening on IPv4 address "127.0.0.1", port 5432
2025-05-23 07:46:51.149 GMT [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-05-23 07:46:51.172 GMT [28] LOG: database system was shut down at 2025-05-23 07:46:46 GMT
[2025-05-23T07:46:51Z INFO service::utils::clean] Find directory "pg_vectors/indexes/308169".
[2025-05-23T07:46:51Z INFO service::utils::clean] Find directory "pg_vectors/indexes/93919".
[2025-05-23T07:46:51Z INFO service::utils::clean] Find directory "pg_vectors/indexes/308169/segments/c3ea712a-d333-462b-bb36-1e8156609d24".
[2025-05-23T07:46:51Z INFO service::utils::clean] Find directory "pg_vectors/indexes/93919/segments/dc90805b-5994-4f76-98ee-69d52f35411f".
2025-05-23 07:46:51.217 GMT [1] LOG: database system is ready to accept connections
immich server logs :
Initializing Immich v1.133.0
Detected CPU Cores: 8
Starting api worker
Starting microservices worker
[Nest] 7 - 05/23/2025, 7:47:58 AM 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
Initializing Immich v1.133.0
Detected CPU Cores: 8
Starting api worker
Starting microservices worker
[Nest] 7 - 05/23/2025, 7:47:58 AM 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
regarding machine learning logs, nothings seems wrong
bo0tzz
bo0tzz2w ago
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
Elite
EliteOP2w ago
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)
Elite
EliteOP2w ago
bo0tzz
bo0tzz2w ago
You should be moving away from the included postgres chart fwiw But I have no idea why it's not working
Elite
EliteOP2w ago
Hmm ok I see, what are the alternative for that ?
Elite
EliteOP2w ago
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 🙂
bo0tzz
bo0tzz2w ago
Depends on which postgres major version you're using I won't be doing anything postgres in the chart
Elite
EliteOP2w ago
ok got it so I can remove postgres from the chart it perfectly worked, thank you 🙂

Did you find this page helpful?