I
Immich3w ago
Xargon

Microservices fail to run

Greetings, I'm trying to set up Immich as a docker compose on my server, In the next posts I will post the contents of my docker compose and env file. Do you know how to solve? Thanks in advance,
44 Replies
Immich
Immich3w ago
:wave: Hey @Xargon, 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. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: 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.
Xargon
XargonOP3w ago
Container logs:
redacted@redacted:/redacted/redacted-deployment$ sudo docker compose -f docker-compose-immich.yml --env-file .env-immich up -d
[+] Running 5/5
✔ Network immich_default Created 0.1s
✔ Container immich_redis Started 0.2s
✔ Container immich_postgres Started 0.2s
✔ Container immich_machine_learning Started 0.2s
✔ Container immich_server Started 0.1s
redacted@redacted:/redacted/redacted-deployment$ sudo docker logs -f immich_server
Initializing Immich v1.131.3
Detected CPU Cores: 8
Starting api worker
Starting microservices worker
[Nest] 7 - 04/08/2025, 4:34:57 PM LOG [Microservices:EventRepository] Initialized websocket server
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.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:318:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
microservices worker exited with code 1
Killing api process
Initializing Immich v1.131.3
Detected CPU Cores: 8
Starting api worker
Starting microservices worker
redacted@redacted:/redacted/redacted-deployment$ sudo docker compose -f docker-compose-immich.yml --env-file .env-immich up -d
[+] Running 5/5
✔ Network immich_default Created 0.1s
✔ Container immich_redis Started 0.2s
✔ Container immich_postgres Started 0.2s
✔ Container immich_machine_learning Started 0.2s
✔ Container immich_server Started 0.1s
redacted@redacted:/redacted/redacted-deployment$ sudo docker logs -f immich_server
Initializing Immich v1.131.3
Detected CPU Cores: 8
Starting api worker
Starting microservices worker
[Nest] 7 - 04/08/2025, 4:34:57 PM LOG [Microservices:EventRepository] Initialized websocket server
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.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:318:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
microservices worker exited with code 1
Killing api process
Initializing Immich v1.131.3
Detected CPU Cores: 8
Starting api worker
Starting microservices worker
[Nest] 7 - 04/08/2025, 4:35:04 PM LOG [Microservices:EventRepository] Initialized websocket server
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.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:318:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
microservices worker exited with code 1
Killing api process
[Nest] 7 - 04/08/2025, 4:35:04 PM LOG [Microservices:EventRepository] Initialized websocket server
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.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:318:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
microservices worker exited with code 1
Killing api process
docker-compose-immich.yml
#
# WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose
#
# Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.

name: immich

services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env-immich file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /redacted/InstantUpload:/foto/nextcloud/redacted
- /etc/localtime:/etc/localtime:ro
env_file:
- .env-immich
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false

immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- model-cache:/cache
env_file:
- .env-immich
restart: always
healthcheck:
disable: false
#
# WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose
#
# Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.

name: immich

services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env-immich file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /redacted/InstantUpload:/foto/nextcloud/redacted
- /etc/localtime:/etc/localtime:ro
env_file:
- .env-immich
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false

immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- model-cache:/cache
env_file:
- .env-immich
restart: always
healthcheck:
disable: false
redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
healthcheck:
test: redis-cli ping || exit 1
restart: always

database:
container_name: immich_postgres
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
env_file:
- .env-immich
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env-immich file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
healthcheck:
test: >-
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
interval: 5m
start_interval: 30s
start_period: 5m
command: >-
postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on
restart: always

volumes:
model-cache:
redis:
container_name: immich_redis
image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
healthcheck:
test: redis-cli ping || exit 1
restart: always

database:
container_name: immich_postgres
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
env_file:
- .env-immich
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env-immich file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
healthcheck:
test: >-
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
interval: 5m
start_interval: 30s
start_period: 5m
command: >-
postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on
restart: always

volumes:
model-cache:
.env-immich
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=redacted/foto/immich
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=redacted

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

# Mine
TZ=redacted
PUID=1000
PGID=1000
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=redacted/foto/immich
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=redacted

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

# Mine
TZ=redacted
PUID=1000
PGID=1000
Mraedis
Mraedis3w ago
Probably the permissions on the photo folder aren't accepting of changes
bo0tzz
bo0tzz3w ago
This is a database issue, it can't reach postgres
Xargon
XargonOP3w ago
So how can I solve or troubleshoot it? I tried to enter in the immich container to check if they can see eachothers but there is no ping nor nc. As you can see the docker compose is almost vanilla without big modifications so I wonder why is not reachable.
bo0tzz
bo0tzz3w ago
Check the database logs to start
NoMachine
NoMachine3w ago
you can install iputils-ping inside the container. also, inspect the server container and verify the env is correctly set
Xargon
XargonOP3w ago
also the server keep restarting, hard to troubleshoot I tried to touch a file in with user (non root) and I can write in it, also I got space on the disk
sudo docker logs -f immich_postgres

PostgreSQL Database directory appears to contain a database; Skipping initialization

2025-04-09 00:40:03.983 UTC [1] LOG: redirecting log output to logging collector process
2025-04-09 00:40:03.983 UTC [1] HINT: Future log output will appear in directory "log".
sudo docker logs -f immich_postgres

PostgreSQL Database directory appears to contain a database; Skipping initialization

2025-04-09 00:40:03.983 UTC [1] LOG: redirecting log output to logging collector process
2025-04-09 00:40:03.983 UTC [1] HINT: Future log output will appear in directory "log".
bo0tzz
bo0tzz3w ago
Like it says, the logs are on disk
NoMachine
NoMachine3w ago
set entrypoint to sh and tty: true
immich-server:
entrypoint: /bin/sh
tty: true
....
immich-server:
entrypoint: /bin/sh
tty: true
....
Xargon
XargonOP3w ago
-rw-r--r-- 1 root root 6.2K Feb 25 11:30 alternatives.log
drwxr-xr-x 1 root root 4.0K Feb 25 18:09 apt
-rw-rw---- 1 root utmp 0 Feb 24 09:00 btmp
-rw-r--r-- 1 root root 36K Feb 25 18:09 dpkg.log
-rw-r--r-- 1 root root 0 Feb 24 09:00 faillog
-rw-rw-r-- 1 root utmp 0 Feb 24 09:00 lastlog
drwxrwxr-t 2 root postgres 4.0K Feb 20 19:52 postgresql
-rw-rw-r-- 1 root utmp 0 Feb 24 09:00 wtmp
-rw-r--r-- 1 root root 6.2K Feb 25 11:30 alternatives.log
drwxr-xr-x 1 root root 4.0K Feb 25 18:09 apt
-rw-rw---- 1 root utmp 0 Feb 24 09:00 btmp
-rw-r--r-- 1 root root 36K Feb 25 18:09 dpkg.log
-rw-r--r-- 1 root root 0 Feb 24 09:00 faillog
-rw-rw-r-- 1 root utmp 0 Feb 24 09:00 lastlog
drwxrwxr-t 2 root postgres 4.0K Feb 20 19:52 postgresql
-rw-rw-r-- 1 root utmp 0 Feb 24 09:00 wtmp
Which one is useful? most are empty
# apt install iputils-ping
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package iputils-ping
# apt search ping
Sorting... Done
Full Text Search... Done
init-system-helpers/now 1.65.2 all [installed,local]
helper tools for all init systems

libgraphite2-3/now 1.3.14-1 amd64 [installed,local]
Font rendering engine for Complex Scripts -- library

libharfbuzz0b/now 6.0.0+dfsg-3 amd64 [installed,local]
OpenType text shaping engine (shared library)

libsemanage2/now 3.4-1+b5 amd64 [installed,local]
SELinux policy management library

libxcb-dri2-0/now 1.15-1 amd64 [installed,local]
X C Binding, dri2 extension

libxcb-dri3-0/now 1.15-1 amd64 [installed,local]
X C Binding, dri3 extension

libxcb-glx0/now 1.15-1 amd64 [installed,local]
X C Binding, glx extension

libxcb-present0/now 1.15-1 amd64 [installed,local]
X C Binding, present extension

libxcb-randr0/now 1.15-1 amd64 [installed,local]
X C Binding, randr extension

libxcb-render0/now 1.15-1 amd64 [installed,local]
X C Binding, render extension

libxcb-shm0/now 1.15-1 amd64 [installed,local]
X C Binding, shm extension

libxcb-sync1/now 1.15-1 amd64 [installed,local]
X C Binding, sync extension

libxcb-xfixes0/now 1.15-1 amd64 [installed,local]
X C Binding, xfixes extension

libxcb1/now 1.15-1 amd64 [installed,local]
X C Binding

libzvbi-common/now 0.2.41-1 all [installed,local]
Vertical Blanking Interval decoder (VBI) - common files

libzvbi0/now 0.2.41-1 amd64 [installed,local]
Vertical Blanking Interval decoder (VBI) - runtime files

mawk/now 1.3.4.20200120-3.1 amd64 [installed,local]
Pattern scanning and text processing language

netbase/now 6.4 all [installed,local]
Basic TCP/IP networking system

perl/now 5.40.1-2 amd64 [installed,local]
Larry Wall's Practical Extraction and Report Language

tini/now 0.19.0-1 amd64 [installed,local]
tiny but valid init for containers
# apt install iputils-ping
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package iputils-ping
# apt search ping
Sorting... Done
Full Text Search... Done
init-system-helpers/now 1.65.2 all [installed,local]
helper tools for all init systems

libgraphite2-3/now 1.3.14-1 amd64 [installed,local]
Font rendering engine for Complex Scripts -- library

libharfbuzz0b/now 6.0.0+dfsg-3 amd64 [installed,local]
OpenType text shaping engine (shared library)

libsemanage2/now 3.4-1+b5 amd64 [installed,local]
SELinux policy management library

libxcb-dri2-0/now 1.15-1 amd64 [installed,local]
X C Binding, dri2 extension

libxcb-dri3-0/now 1.15-1 amd64 [installed,local]
X C Binding, dri3 extension

libxcb-glx0/now 1.15-1 amd64 [installed,local]
X C Binding, glx extension

libxcb-present0/now 1.15-1 amd64 [installed,local]
X C Binding, present extension

libxcb-randr0/now 1.15-1 amd64 [installed,local]
X C Binding, randr extension

libxcb-render0/now 1.15-1 amd64 [installed,local]
X C Binding, render extension

libxcb-shm0/now 1.15-1 amd64 [installed,local]
X C Binding, shm extension

libxcb-sync1/now 1.15-1 amd64 [installed,local]
X C Binding, sync extension

libxcb-xfixes0/now 1.15-1 amd64 [installed,local]
X C Binding, xfixes extension

libxcb1/now 1.15-1 amd64 [installed,local]
X C Binding

libzvbi-common/now 0.2.41-1 all [installed,local]
Vertical Blanking Interval decoder (VBI) - common files

libzvbi0/now 0.2.41-1 amd64 [installed,local]
Vertical Blanking Interval decoder (VBI) - runtime files

mawk/now 1.3.4.20200120-3.1 amd64 [installed,local]
Pattern scanning and text processing language

netbase/now 6.4 all [installed,local]
Basic TCP/IP networking system

perl/now 5.40.1-2 amd64 [installed,local]
Larry Wall's Practical Extraction and Report Language

tini/now 0.19.0-1 amd64 [installed,local]
tiny but valid init for containers
And yes, env is correct
NoMachine
NoMachine3w ago
did you run update first ?
Xargon
XargonOP3w ago
at least, the things that I defined are defined ok, they seems to be rachable:
# ping database
PING database (172.24.0.3) 56(84) bytes of data.
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=1 ttl=64 time=0.106 ms
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=2 ttl=64 time=0.080 ms
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=3 ttl=64 time=0.050 ms
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=4 ttl=64 time=0.053 ms
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=5 ttl=64 time=0.045 ms
^C
--- database ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4094ms
rtt min/avg/max/mdev = 0.045/0.066/0.106/0.023 ms
# ping redis
PING redis (172.24.0.2) 56(84) bytes of data.
64 bytes from immich_redis.immich_default (172.24.0.2): icmp_seq=1 ttl=64 time=0.112 ms
64 bytes from immich_redis.immich_default (172.24.0.2): icmp_seq=2 ttl=64 time=0.043 ms
64 bytes from immich_redis.immich_default (172.24.0.2): icmp_seq=3 ttl=64 time=0.044 ms
64 bytes from immich_redis.immich_default (172.24.0.2): icmp_seq=4 ttl=64 time=0.044 ms
^C
--- redis ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3086ms
rtt min/avg/max/mdev = 0.043/0.060/0.112/0.029 ms
# ping database
PING database (172.24.0.3) 56(84) bytes of data.
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=1 ttl=64 time=0.106 ms
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=2 ttl=64 time=0.080 ms
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=3 ttl=64 time=0.050 ms
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=4 ttl=64 time=0.053 ms
64 bytes from immich_postgres.immich_default (172.24.0.3): icmp_seq=5 ttl=64 time=0.045 ms
^C
--- database ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4094ms
rtt min/avg/max/mdev = 0.045/0.066/0.106/0.023 ms
# ping redis
PING redis (172.24.0.2) 56(84) bytes of data.
64 bytes from immich_redis.immich_default (172.24.0.2): icmp_seq=1 ttl=64 time=0.112 ms
64 bytes from immich_redis.immich_default (172.24.0.2): icmp_seq=2 ttl=64 time=0.043 ms
64 bytes from immich_redis.immich_default (172.24.0.2): icmp_seq=3 ttl=64 time=0.044 ms
64 bytes from immich_redis.immich_default (172.24.0.2): icmp_seq=4 ttl=64 time=0.044 ms
^C
--- redis ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3086ms
rtt min/avg/max/mdev = 0.043/0.060/0.112/0.029 ms
NoMachine
NoMachine3w ago
docker exec immich_postgres psql -c "SELECT * FROM pg_catalog.pg_tables;" postgres://postgres:<YOURDBPASSWORD>@localhost:5432/immich
docker exec immich_postgres psql -c "SELECT * FROM pg_catalog.pg_tables;" postgres://postgres:<YOURDBPASSWORD>@localhost:5432/immich
try this to check if the DB is working but to me it looks something is miss configured on the server side
Xargon
XargonOP3w ago
Yes, the query returned a schema
NoMachine
NoMachine3w ago
try setting the env
IMMICH_LOG_LEVEL=verbose
IMMICH_LOG_LEVEL=verbose
not sure if it will be useful tho, I don't know how much is logged on startup
Xargon
XargonOP3w ago
Hmm not very useful, yeah:
Initializing Immich v1.131.3
DEBUG: cgroup v2 detected.
DEBUG: No CPU limits set.
Detected CPU Cores: 8
Starting api worker
Starting microservices worker
[Nest] 7 - 04/09/2025, 10:37:16 AM LOG [Microservices:EventRepository] Initialized websocket server
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.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:318:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
microservices worker exited with code 1
Killing api process
Initializing Immich v1.131.3
DEBUG: cgroup v2 detected.
DEBUG: No CPU limits set.
Detected CPU Cores: 8
Starting api worker
Starting microservices worker
[Nest] 7 - 04/09/2025, 10:37:16 AM LOG [Microservices:EventRepository] Initialized websocket server
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.data (/usr/src/app/node_modules/postgres/cjs/src/connection.js:318:9)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
microservices worker exited with code 1
Killing api process
Alex Tran
Alex Tran3w ago
can you go to the postgres folder and run ls -a? Should be in here DB_DATA_LOCATION=./postgres
Alex Tran
Alex Tran3w ago
it should have something like this
No description
Alex Tran
Alex Tran3w ago
then in the log directory, you should see this
No description
Xargon
XargonOP3w ago
My /mnt folder is empty in me immich_server container
bo0tzz
bo0tzz3w ago
That isn't in the server container
Alex Tran
Alex Tran3w ago
Can you locate where the docker-compose.yml file is at? there should be a postgres folder there as well
Xargon
XargonOP3w ago
Ah ok sorry now I understood: I missed that there was a ./postgres mount point in the env, ok yes, I found the folder and I got data inside, 27 items @bo0tzz @Alex
2025-04-10 10:25:11.140 JST [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-04-10 10:25:11.141 JST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-04-10 10:25:11.141 JST [1] LOG: listening on IPv6 address "::", port 5432
2025-04-10 10:25:11.151 JST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-04-10 10:25:11.166 JST [68] LOG: database system was shut down at 2025-04-10 10:25:11 JST
2025-04-10 10:25:11.182 JST [1] LOG: database system is ready to accept connections
2025-04-10 10:25:11.140 JST [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-04-10 10:25:11.141 JST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2025-04-10 10:25:11.141 JST [1] LOG: listening on IPv6 address "::", port 5432
2025-04-10 10:25:11.151 JST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-04-10 10:25:11.166 JST [68] LOG: database system was shut down at 2025-04-10 10:25:11 JST
2025-04-10 10:25:11.182 JST [1] LOG: database system is ready to accept connections
Alex Tran
Alex Tran3w ago
Can you get the content of the two latest log?
Xargon
XargonOP3w ago
previous:
2025-04-10 10:25:09.368 JST [48] 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-04-10 10:25:09.374 JST [48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-04-10 10:25:09.462 JST [50] LOG: database system was shut down at 2025-04-10 10:25:05 JST
2025-04-10 10:25:09.476 JST [48] LOG: database system is ready to accept connections
2025-04-10 10:25:10.966 JST [48] LOG: received fast shutdown request
2025-04-10 10:25:10.973 JST [48] LOG: aborting any active transactions
2025-04-10 10:25:10.975 JST [48] LOG: background worker "logical replication launcher" (PID 57) exited with exit code 1
2025-04-10 10:25:10.977 JST [52] LOG: shutting down
2025-04-10 10:25:11.036 JST [48] LOG: database system is shut down
2025-04-10 10:25:09.368 JST [48] 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-04-10 10:25:09.374 JST [48] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2025-04-10 10:25:09.462 JST [50] LOG: database system was shut down at 2025-04-10 10:25:05 JST
2025-04-10 10:25:09.476 JST [48] LOG: database system is ready to accept connections
2025-04-10 10:25:10.966 JST [48] LOG: received fast shutdown request
2025-04-10 10:25:10.973 JST [48] LOG: aborting any active transactions
2025-04-10 10:25:10.975 JST [48] LOG: background worker "logical replication launcher" (PID 57) exited with exit code 1
2025-04-10 10:25:10.977 JST [52] LOG: shutting down
2025-04-10 10:25:11.036 JST [48] LOG: database system is shut down
I run docker with sudo (because old configs on my server, when I will migrate I will fix it) and the posgtres folder is now a+wrx however not yet running
Alex Tran
Alex Tran3w ago
Looks good, I don’t see any error in the logs
Xargon
XargonOP3w ago
immich_server is not producing logs
Alex Tran
Alex Tran3w ago
Could it be PUID and PGID issue Or have you changed password of the database recently?
Xargon
XargonOP3w ago
Well technically yes as it's a new deploy (first time) and I changed it, but probably postgres came up with the default password once I don't care deleting all the data as I never reached the Immich screen yet (just not the mounted picture folder)
Alex Tran
Alex Tran3w ago
I am leaning toward permission issue with group and user ID
Xargon
XargonOP3w ago
can I add it to the env?
Alex Tran
Alex Tran3w ago
You have it in your env By default we run the database as root
Xargon
XargonOP3w ago
Ah yes I try YES! I can see the webpage now, thanks a lot, was definitely that
Alex Tran
Alex Tran3w ago
Nice!
Xargon
XargonOP3w ago
Thanks for your support, really 🙂
Alex Tran
Alex Tran3w ago
I thought we made changes so that the log was more useful @bwees do you know if the correct changes to the database log is in the latest release?
bwees
bwees3w ago
it should have, unless our post install patching step isnt working on the release. I will look tomorrow morning and see. I think our check might be always returning false (and causing the script to not run). Should be able to remedy this by backing out of the server directory before installing the immich cli on the image build It still ran on my machine after we fixed the POSIX issue but maybe somethign weird is happening in the build
Alex Tran
Alex Tran3w ago
Sounds good! Thanks Brandon
bo0tzz
bo0tzz3w ago
There is still a broken thing, I messaged in #dev about it, let me dig that back up
bwees
bwees3w ago
Yeah I know that when the patch gets applied successfully that it does fix this issue. I think our dockerfile and the check to see if we should run post install step is preventing that step from being run. I will make a pr today to change the way Immich cli gets installed
bo0tzz
bo0tzz3w ago
did you see the message I referenced? It seems like there's another case of a field missing, that isn't covered by the patch
bwees
bwees3w ago
ah i understand now, ok I will also look at that and add a check to safeguard if any of the fields are missing and if so, fall back to a normal throw
meox_
meox_3w ago
im getting this too on a truenas nfs mount fresh install of only .env and docker_compose.yml, running sudo docker compose up spams this error... just waiting somehow fixes it? idk

Did you find this page helpful?