Errors when loading config file are not properly logged #3262

Closed
opened 2026-02-05 08:07:26 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @ebolam on GitHub (May 24, 2024).

The bug

I am trying to launch immich on a small k8s cluster. I prefer to use basic yaml vs helm to better understand what is happening for my education.

When I try to launch the server I get the following error in the container's log:
ERROR [ImmichMicroservices] [DuplicateService] Unable to load configuration file: /usr/src/app/config/immich.json

However I can see that the file exists. The following was run in the container:

# cat /usr/src/app/config/immich.json
{
"ffmpeg": {
"crf": 23,
"threads": 0,
"preset": "ultrafast",
"targetVideoCodec": "h264",
"acceptedVideoCodecs": ["h264"],
"targetAudioCodec": "aac",
"acceptedAudioCodecs": ["aac", "mp3", "libopus"],
"targetResolution": "720",
"maxBitrate": "0",
"bframes": -1,
"refs": 0,
"gopSize": 0,
"npl": 0,
"temporalAQ": false,
"cqMode": "auto",
"twoPass": false,
"preferredHwDevice": "auto",
"transcode": "required",
"tonemap": "hable",
"accel": "disabled"
},
"job": {
"backgroundTask": {
"concurrency": 5
},
"smartSearch": {
"concurrency": 2
},
"metadataExtraction": {
"concurrency": 5
},
"faceDetection": {
"concurrency": 2
},
"search": {
"concurrency": 5
},
"sidecar": {
"concurrency": 5
},
"library": {
"concurrency": 5
},
"migration": {
"concurrency": 5
},
"thumbnailGeneration": {
"concurrency": 5
},
"videoConversion": {
"concurrency": 1
}
},
"logging": {
"enabled": true,
"level": "log"
},
"machineLearning": {
"enabled": true,
"url": "http://127.0.0.1:3003",
"clip": {
"enabled": true,
"modelName": "ViT-B-32__openai"
},
"duplicateDetection": {
"enabled": false,
"maxDistance": 0.03
},
"facialRecognition": {
"enabled": true,
"modelName": "buffalo_l",
"minScore": 0.7,
"maxDistance": 0.6,
"minFaces": 3
}
},
"map": {
"enabled": true,
"lightStyle": "",
"darkStyle": ""
},
"reverseGeocoding": {
"enabled": true
},
"oauth": {
"enabled": false,
"issuerUrl": "",
"clientId": "",
"clientSecret": "",
"scope": "openid email profile",
"signingAlgorithm": "RS256",
"storageLabelClaim": "preferred_username",
"storageQuotaClaim": "immich_quota",
"defaultStorageQuota": 0,
"buttonText": "Login with OAuth",
"autoRegister": true,
"autoLaunch": false,
"mobileOverrideEnabled": false,
"mobileRedirectUri": ""
},
"passwordLogin": {
"enabled": true
},
"storageTemplate": {
"enabled": false,
"hashVerificationEnabled": true,
"template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}"
},
"image": {
"thumbnailFormat": "webp",
"thumbnailSize": 250,
"previewFormat": "jpeg",
"previewSize": 1440,
"quality": 80,
"colorspace": "p3",
"extractEmbedded": false
},
"newVersionCheck": {
"enabled": true
},
"trash": {
"enabled": true,
"days": 30
},
"theme": {
"customCss": ""
},
"user": {
"deleteDelay": 7
},
"library": {
"scan": {
"enabled": true,
"cronExpression": "0 0 * * *"
},
"watch": {
"enabled": false,
"usePolling": false,
"interval": 10000
}
},
"server": {
"externalDomain": "",
"loginPageMessage": ""
},
"user": {
"deleteDelay": 7
}
}

The OS that Immich Server is running on

Ubuntu 22.04.4 LTS

Version of Immich Server

ghcr.io/immich-app/immich-server:main (pulled a 23-may-2024)

Version of Immich Mobile App

N/A (Never got that far)

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Using k8s yaml (similar)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: immich
  namespace: immich
spec:
  selector:
    matchLabels:
      app: immich
  replicas: 1
  template:
    metadata:
      labels:
        app: immich
    spec:
      containers:
        - name: immich
          image: ghcr.io/immich-app/immich-server:main
          env:
          - name: DB_HOSTNAME
            value: 127.0.0.1
          - name: DB_USERNAME
            value: immich
          - name: DB_PASSWORD
            value: "PASSWORD GOES HERE"
          - name: DB_DATABASE_NAME
            value: immich
          - name: IMMICH_PORT
            value: "3001"
          - name: IMMICH_CONFIG_FILE
            value: "/usr/src/app/config/immich.json"
          - name: REDIS_HOSTNAME
            value: 127.0.0.1
          volumeMounts:
            - name: timezone
              mountPath: "/etc/localtime"
            - name: uploads
              mountPath: /usr/src/app/upload
            - name: config
              mountPath: /usr/src/app/config
        - name: immich-machine-learning
          image: ghcr.io/immich-app/immich-machine-learning:main-cuda
          env:
          - name: DB_HOSTNAME
            value: 127.0.0.1
          - name: DB_USERNAME
            value: immich
          - name: DB_PASSWORD
            value: "PASSWORD GOES HERE"
          - name: DB_DATABASE_NAME
            value: immich
          - name: IMMICH_PORT
            value: "3003"
          resources:
            limits:
              nvidia.com/gpu: 1
          volumeMounts:
            - name: model-cache
              mountPath: /cache
        - name: redis
          image: docker.io/redis:6.2-alpine@sha256:c0634a08e74a4bb576d02d1ee993dc05dba10e8b7b9492dfa28a7af100d46c01
        - name: postgres
          image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
          env:
          - name: POSTGRES_PASSWORD
            value: "PASSWORD GOES HERE"
          - name: POSTGRES_USER
            value: immich
          - name: POSTGRES_DB
            value: immich
          - name: POSTGRES_INITDB_ARGS
            value: "--data-checksums"
          volumeMounts:
            - name: db
              mountPath: /var/lib/postgresql/data

Your .env content

Environment variables are above

Reproduction steps

Copy json file from description into directory as immich.json.
Map above directory to container as well as blank directories for the rest of the volumnes
Start deployment
check output logs of the immich container (immich-server)

Relevant log output

Starting api worker
Starting microservices worker
[Nest] 14  - 05/24/2024, 7:08:20 PM     LOG [ImmichMicroservices] [EventRepository] Initialized websocket server
[Nest] 14  - 05/24/2024, 7:08:20 PM     LOG [ImmichServer] [EventRepository] Initialized websocket server
[Nest] 14  - 05/24/2024, 7:08:20 PM   ERROR [ImmichMicroservices] [DuplicateService] Unable to load configuration file: /usr/src/app/config/immich.json
[Nest] 14  - 05/24/2024, 7:08:20 PM   ERROR [ImmichServer] [DuplicateService] Unable to load configuration file: /usr/src/app/config/immich.json

Additional information

No response

Originally created by @ebolam on GitHub (May 24, 2024). ### The bug I am trying to launch immich on a small k8s cluster. I prefer to use basic yaml vs helm to better understand what is happening for my education. When I try to launch the server I get the following error in the container's log: `ERROR [ImmichMicroservices] [DuplicateService] Unable to load configuration file: /usr/src/app/config/immich.json` However I can see that the file exists. The following was run in the container: > `# cat /usr/src/app/config/immich.json` > { > "ffmpeg": { > "crf": 23, > "threads": 0, > "preset": "ultrafast", > "targetVideoCodec": "h264", > "acceptedVideoCodecs": ["h264"], > "targetAudioCodec": "aac", > "acceptedAudioCodecs": ["aac", "mp3", "libopus"], > "targetResolution": "720", > "maxBitrate": "0", > "bframes": -1, > "refs": 0, > "gopSize": 0, > "npl": 0, > "temporalAQ": false, > "cqMode": "auto", > "twoPass": false, > "preferredHwDevice": "auto", > "transcode": "required", > "tonemap": "hable", > "accel": "disabled" > }, > "job": { > "backgroundTask": { > "concurrency": 5 > }, > "smartSearch": { > "concurrency": 2 > }, > "metadataExtraction": { > "concurrency": 5 > }, > "faceDetection": { > "concurrency": 2 > }, > "search": { > "concurrency": 5 > }, > "sidecar": { > "concurrency": 5 > }, > "library": { > "concurrency": 5 > }, > "migration": { > "concurrency": 5 > }, > "thumbnailGeneration": { > "concurrency": 5 > }, > "videoConversion": { > "concurrency": 1 > } > }, > "logging": { > "enabled": true, > "level": "log" > }, > "machineLearning": { > "enabled": true, > "url": "http://127.0.0.1:3003", > "clip": { > "enabled": true, > "modelName": "ViT-B-32__openai" > }, > "duplicateDetection": { > "enabled": false, > "maxDistance": 0.03 > }, > "facialRecognition": { > "enabled": true, > "modelName": "buffalo_l", > "minScore": 0.7, > "maxDistance": 0.6, > "minFaces": 3 > } > }, > "map": { > "enabled": true, > "lightStyle": "", > "darkStyle": "" > }, > "reverseGeocoding": { > "enabled": true > }, > "oauth": { > "enabled": false, > "issuerUrl": "", > "clientId": "", > "clientSecret": "", > "scope": "openid email profile", > "signingAlgorithm": "RS256", > "storageLabelClaim": "preferred_username", > "storageQuotaClaim": "immich_quota", > "defaultStorageQuota": 0, > "buttonText": "Login with OAuth", > "autoRegister": true, > "autoLaunch": false, > "mobileOverrideEnabled": false, > "mobileRedirectUri": "" > }, > "passwordLogin": { > "enabled": true > }, > "storageTemplate": { > "enabled": false, > "hashVerificationEnabled": true, > "template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}" > }, > "image": { > "thumbnailFormat": "webp", > "thumbnailSize": 250, > "previewFormat": "jpeg", > "previewSize": 1440, > "quality": 80, > "colorspace": "p3", > "extractEmbedded": false > }, > "newVersionCheck": { > "enabled": true > }, > "trash": { > "enabled": true, > "days": 30 > }, > "theme": { > "customCss": "" > }, > "user": { > "deleteDelay": 7 > }, > "library": { > "scan": { > "enabled": true, > "cronExpression": "0 0 * * *" > }, > "watch": { > "enabled": false, > "usePolling": false, > "interval": 10000 > } > }, > "server": { > "externalDomain": "", > "loginPageMessage": "" > }, > "user": { > "deleteDelay": 7 > } > } ### The OS that Immich Server is running on Ubuntu 22.04.4 LTS ### Version of Immich Server ghcr.io/immich-app/immich-server:main (pulled a 23-may-2024) ### Version of Immich Mobile App N/A (Never got that far) ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML Using k8s yaml (similar) apiVersion: apps/v1 kind: Deployment metadata: name: immich namespace: immich spec: selector: matchLabels: app: immich replicas: 1 template: metadata: labels: app: immich spec: containers: - name: immich image: ghcr.io/immich-app/immich-server:main env: - name: DB_HOSTNAME value: 127.0.0.1 - name: DB_USERNAME value: immich - name: DB_PASSWORD value: "PASSWORD GOES HERE" - name: DB_DATABASE_NAME value: immich - name: IMMICH_PORT value: "3001" - name: IMMICH_CONFIG_FILE value: "/usr/src/app/config/immich.json" - name: REDIS_HOSTNAME value: 127.0.0.1 volumeMounts: - name: timezone mountPath: "/etc/localtime" - name: uploads mountPath: /usr/src/app/upload - name: config mountPath: /usr/src/app/config - name: immich-machine-learning image: ghcr.io/immich-app/immich-machine-learning:main-cuda env: - name: DB_HOSTNAME value: 127.0.0.1 - name: DB_USERNAME value: immich - name: DB_PASSWORD value: "PASSWORD GOES HERE" - name: DB_DATABASE_NAME value: immich - name: IMMICH_PORT value: "3003" resources: limits: nvidia.com/gpu: 1 volumeMounts: - name: model-cache mountPath: /cache - name: redis image: docker.io/redis:6.2-alpine@sha256:c0634a08e74a4bb576d02d1ee993dc05dba10e8b7b9492dfa28a7af100d46c01 - name: postgres image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 env: - name: POSTGRES_PASSWORD value: "PASSWORD GOES HERE" - name: POSTGRES_USER value: immich - name: POSTGRES_DB value: immich - name: POSTGRES_INITDB_ARGS value: "--data-checksums" volumeMounts: - name: db mountPath: /var/lib/postgresql/data ``` ### Your .env content ```Shell Environment variables are above ``` ### Reproduction steps ```bash Copy json file from description into directory as immich.json. Map above directory to container as well as blank directories for the rest of the volumnes Start deployment check output logs of the immich container (immich-server) ``` ### Relevant log output ```shell Starting api worker Starting microservices worker [Nest] 14 - 05/24/2024, 7:08:20 PM LOG [ImmichMicroservices] [EventRepository] Initialized websocket server [Nest] 14 - 05/24/2024, 7:08:20 PM LOG [ImmichServer] [EventRepository] Initialized websocket server [Nest] 14 - 05/24/2024, 7:08:20 PM ERROR [ImmichMicroservices] [DuplicateService] Unable to load configuration file: /usr/src/app/config/immich.json [Nest] 14 - 05/24/2024, 7:08:20 PM ERROR [ImmichServer] [DuplicateService] Unable to load configuration file: /usr/src/app/config/immich.json ``` ### Additional information _No response_
OVERLORD added the 🗄️servergood first issue labels 2026-02-05 08:07:26 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#3262