I
Immich2mo ago
sebi

Immich Server wont start Portainer

I'm running it on Portainer , all db is up and running immich machine learining aswell but immich server fails Starting microservices worker [Nest] 7 - 03/28/2025, 1:28:02 PM LOG [Microservices:EventRepository] Initialized websocket server [Nest] 17 - 03/28/2025, 1:28:02 PM LOG [Api:EventRepository] Initialized websocket server /usr/src/app/node_modules/postgres/cjs/src/connection.js:389 stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug }, ^ TypeError: Cannot read properties of undefined (reading 'replace') at queryError (/usr/src/app/node_modules/postgres/cjs/src/connection.js:389:48) at errored (/usr/src/app/node_modules/postgres/cjs/src/connection.js:384:17) at Socket.error (/usr/src/app/node_modules/postgres/cjs/src/connection.js:376:5) at Socket.emit (node:events:518:28) at emitErrorNT (node:internal/streams/destroy:170:8) at emitErrorCloseNT (node:internal/streams/destroy:129:3) at process.processTicksAndRejections (node:internal/process/task_queues:90:21) Node.js v22.14.0 microservices worker error: TypeError: Cannot read properties of undefined (reading 'replace'), stack: TypeError: Cannot read properties of undefined (reading 'replace') at queryError (/usr/src/app/node_modules/postgres/cjs/src/connection.js:389:48) at errored (/usr/src/app/node_modules/postgres/cjs/src/connection.js:384:17) at Socket.error (/usr/src/app/node_modules/postgres/cjs/src/connection.js:376:5) at Socket.emit (node:events:518:28) at emitErrorNT (node:internal/streams/destroy:170:8) at emitErrorCloseNT (node:internal/streams/destroy:129:3) at process.processTicksAndRejections (node:internal/process/task_queues:90:21) api worker exited with code 1 Initializing Immich v1.130.3 Detected CPU Cores: 6 Starting api worker Starting microservices worker
8 Replies
Immich
Immich2mo ago
:wave: Hey @sebi, 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. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy). 6. :blue_square: uploaded the relevant information (see below). 7. :blue_square: 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.
schuhbacca
schuhbacca2mo ago
Please post your postgres log
sebi
sebiOP2mo ago
services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} labels: - traefik.enable=true - traefik.http.routers.immich.rule=Host(immich.$DOMAIN_NAME) - traefik.http.routers.immich.tls=true - traefik.http.routers.immich.tls.certresolver=letsEncrypt #- traefik.http.routers.immich.middlewares=authelia@docker env_file: - stack.env volumes: - ${DATA_DIR}/media/Photos/immich:/usr/src/app/upload - ${DATA_DIR}/media/Photos/external:/usr/src/app/external - /etc/localtime:/etc/localtime:ro ports: - "2283:2283" networks: - web restart: unless-stopped immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:release env_file: - stack.env volumes: - ${APP_DIR}/immich/model-cache:/cache networks: - web restart: unless-stopped networks: web: external: true Postgres Logs: PostgreSQL Database directory appears to contain a database; Skipping initialization 2025-03-28 11:13:29.438 UTC [1] LOG: redirecting log output to logging collector process 2025-03-28 11:13:29.438 UTC [1] HINT: Future log output will appear in directory "log".
schuhbacca
schuhbacca2mo ago
Where is postgres in your compose?
sebi
sebiOP2mo ago
yes
schuhbacca
schuhbacca2mo ago
That didn't really answer the question. Also please use code formatting using backticks. Your postgres container is not in your compose file you posted. When I have seen this error before, it's the server not able to connect to postgres I beleive.
sebi
sebiOP2mo ago
2025-03-28 11:13:29.438 UTC [1] LOG: listening on IPv6 address "::", port 5432 2025-03-28 11:13:29.444 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2025-03-28 11:13:29.453 UTC [28] LOG: database system was shut down at 2025-03-28 11:13:25 UTC 2025-03-28 11:13:29.466 UTC [1] LOG: database system is ready to accept connections 2025-03-28 15:34:24.935 UTC [317] FATAL: role "postgres" does not exist 2025-03-28 15:34:34.945 UTC [319] FATAL: role "postgres" does not exist 2025-03-28 15:34:39.776 UTC [321] FATAL: role "postgres" does not exist 2025-03-28 15:34:43.169 UTC [324] FATAL: role "postgres" does not exist 2025-03-28 15:35:07.532 UTC [327] FATAL: role "root" does not exist 2025-03-28 15:35:29.569 UTC [329] FATAL: role "postgres" does not exist can these be the reason ??
schuhbacca
schuhbacca2mo ago
Probably yes

Did you find this page helpful?