Oopsie: errors with metadata service when flip flopping from 1.132.1 back to 1.131.3 #5912

Closed
opened 2026-02-05 11:51:03 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Janczykkkko on GitHub (Apr 27, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

Getting postgres error after downgrading for a moment back to 1.131.3 from 1.132.1 and going back to 1.132.1 - I know my bad, was trying to get oauth working.
Would be grateful if sb has any pointers on how to fix init.
Now thumbnails are not generating :(

The OS that Immich Server is running on

docker synology

Version of Immich Server

1.132.1

Version of Immich Mobile App

1.132.1

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3"
services:
  immich:
    image: harbor.lalala.eu/ghcr.io/imagegenius/immich:v1.132.0-ig388
    container_name: immich
    logging:
      driver: loki
      options:
        loki-url: http://localhost:3100/loki/api/v1/push
    environment:
      - PUID=0
      - PGID=0
      - TZ=Europe/Warsaw
      - DB_HOSTNAME=immich-postgres
      - DB_USERNAME=lalala
      - DB_PASSWORD=lalala
      - DB_DATABASE_NAME=lalala
      - REDIS_HOSTNAME=immich-redis
      - DISABLE_MACHINE_LEARNING=false
      - DISABLE_TYPESENSE=false
      - DB_PORT=5432
      - S6_VERBOSITY=2
      - REDIS_PORT=6379
    volumes:
      - /volume1/docker/data/immich/config:/config
      - /volume2/photos-new/encoded-video:/photos/encoded-video
      - /volume2/photos-new/library:/photos/library
      - /volume2/photos-new/profile:/photos/profile
      - /volume2/photos-new/upload:/photos/upload
      - /volume2/photos-new/backups:/photos/backups
      - /volume2/photos-new/thumbs:/photos/thumbs
      - /volume1/docker/data/immich/ML:/config/machine-learning #optional
      - /volume1/docker/data/immich/run:/etc/s6-overlay/s6-rc.d/init-config-immich/run
    expose:
      - 8080
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.immich.rule=Host(`photos.lalala.eu`)
      - traefik.http.routers.immich.entrypoints=websecure
      - traefik.http.services.immich.loadbalancer.server.port=8080
      - traefik.http.routers.immich.tls=true
      - traefik.http.routers.immich.priority=10
  immich-redis:
    image: harbor.lalala.eu/dockerhub/redis
    restart: always
    environment:
      - TZ=Europe/Warsaw
    expose:
      - 6379
    container_name: immich-redis
    volumes:
      - /volume1/docker/data/immich-redis:/data
  immich-postgres:
    image: harbor.lalala.eu/dockerhub/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    expose:
      - 5432
    container_name: immich-postgres
    logging:
      driver: loki
      options:
        loki-url: http://localhost:3100/loki/api/v1/push
    restart: always
    environment:
      POSTGRES_USER: lalala
      POSTGRES_PASSWORD: lalala
      POSTGRES_DB: lalala
      TZ: Europe/Warsaw
    volumes:
      - /volume1/docker/data/immich-postgres:/var/lib/postgresql/data
networks:
  default:
    name: root
    external: true

Your .env content

compose

Reproduction steps

...

Relevant log output

04/27/2025 6:29:20 PM
[Nest] 1776  - 04/27/2025, 6:29:20 PM     LOG [Microservices:EventRepository] Initialized websocket server
04/27/2025 6:29:20 PM
[Nest] 1776  - 04/27/2025, 6:29:20 PM     LOG [Microservices:DatabaseRepository] Running migrations, this may take a while
04/27/2025 6:29:21 PM
[Nest] 1776  - 04/27/2025, 6:29:21 PM     LOG [Microservices:MetadataService] Bootstrapping metadata service
04/27/2025 6:29:21 PM
[Nest] 1776  - 04/27/2025, 6:29:21 PM     LOG [Microservices:MetadataService] Initializing metadata service
04/27/2025 6:29:21 PM
[Nest] 1776  - 04/27/2025, 6:29:21 PM     LOG [Microservices:MapRepository] Initializing metadata repository
04/27/2025 6:29:21 PM
Query failed : {
04/27/2025 6:29:21 PM
  durationMs: 4.446374999999534,
04/27/2025 6:29:21 PM
  error: PostgresError: relation "geodata_places_tmp" already exists
04/27/2025 6:29:21 PM
      at ErrorResponse (/app/immich/server/node_modules/postgres/cjs/src/connection.js:790:26)
04/27/2025 6:29:21 PM
      at handle (/app/immich/server/node_modules/postgres/cjs/src/connection.js:476:6)
04/27/2025 6:29:21 PM
      at Socket.data (/app/immich/server/node_modules/postgres/cjs/src/connection.js:315:9)
04/27/2025 6:29:21 PM
      at Socket.emit (node:events:518:28)
04/27/2025 6:29:21 PM
      at addChunk (node:internal/streams/readable:561:12)
04/27/2025 6:29:21 PM
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
04/27/2025 6:29:21 PM
      at Readable.push (node:internal/streams/readable:392:5)
04/27/2025 6:29:21 PM
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23) {
04/27/2025 6:29:21 PM
    severity_local: 'ERROR',
04/27/2025 6:29:21 PM
    severity: 'ERROR',
04/27/2025 6:29:21 PM
    code: '42P07',
04/27/2025 6:29:21 PM
    file: 'heap.c',
04/27/2025 6:29:21 PM
    line: '1198',
04/27/2025 6:29:21 PM
    routine: 'heap_create_with_catalog'
04/27/2025 6:29:21 PM
  },
04/27/2025 6:29:21 PM
  sql: 'CREATE TABLE geodata_places_tmp\n' +
04/27/2025 6:29:21 PM
    '                (\n' +
04/27/2025 6:29:21 PM
    '                  LIKE geodata_places INCLUDING ALL EXCLUDING INDEXES\n' +
04/27/2025 6:29:21 PM
    '                )',
04/27/2025 6:29:21 PM
  params: []
04/27/2025 6:29:21 PM
}
04/27/2025 6:29:21 PM
[Nest] 1776  - 04/27/2025, 6:29:21 PM   ERROR [Microservices:MetadataService] Unable to initialize reverse geocoding: PostgresError: relation "geodata_places_tmp" already exists
04/27/2025 6:29:21 PM
PostgresError: relation "geodata_places_tmp" already exists
04/27/2025 6:29:21 PM
    at ErrorResponse (/app/immich/server/node_modules/postgres/cjs/src/connection.js:790:26)
04/27/2025 6:29:21 PM
    at handle (/app/immich/server/node_modules/postgres/cjs/src/connection.js:476:6)
04/27/2025 6:29:21 PM
    at Socket.data (/app/immich/server/node_modules/postgres/cjs/src/connection.js:315:9)
04/27/2025 6:29:21 PM
    at Socket.emit (node:events:518:28)
04/27/2025 6:29:21 PM
    at addChunk (node:internal/streams/readable:561:12)
04/27/2025 6:29:21 PM
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
04/27/2025 6:29:21 PM
    at Readable.push (node:internal/streams/readable:392:5)
04/27/2025 6:29:21 PM
    at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
04/27/2025 6:29:21 PM
Error: Metadata service init failed
04/27/2025 6:29:21 PM
    at MetadataService.init (/app/immich/server/dist/services/metadata.service.js:95:19)
04/27/2025 6:29:21 PM
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
04/27/2025 6:29:21 PM
    at async MetadataService.onBootstrap (/app/immich/server/dist/services/metadata.service.js:74:9)
04/27/2025 6:29:21 PM
    at async EventRepository.onEvent (/app/immich/server/dist/repositories/event.repository.js:126:13)
04/27/2025 6:29:21 PM
    at async MicroservicesModule.onModuleInit (/app/immich/server/dist/app.module.js:83:9)
04/27/2025 6:29:21 PM
    at async callModuleInitHook (/app/immich/server/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9)
04/27/2025 6:29:21 PM
    at async NestApplication.callInitHook (/app/immich/server/node_modules/@nestjs/core/nest-application-context.js:242:13)
04/27/2025 6:29:21 PM
    at async NestApplication.init (/app/immich/server/node_modules/@nestjs/core/nest-application.js:100:9)
04/27/2025 6:29:21 PM
    at async NestApplication.listen (/app/immich/server/node_modules/@nestjs/core/nest-application.js:170:13)
04/27/2025 6:29:21 PM
    at async bootstrap (/app/immich/server/dist/workers/microservices.js:25:5)
04/27/2025 6:29:21 PM
microservices worker error: Error: Metadata service init failed, stack: Error: Metadata service init failed
04/27/2025 6:29:21 PM
    at MetadataService.init (/app/immich/server/dist/services/metadata.service.js:95:19)
04/27/2025 6:29:21 PM
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
04/27/2025 6:29:21 PM
    at async MetadataService.onBootstrap (/app/immich/server/dist/services/metadata.service.js:74:9)
04/27/2025 6:29:21 PM
    at async EventRepository.onEvent (/app/immich/server/dist/repositories/event.repository.js:126:13)
04/27/2025 6:29:21 PM
    at async MicroservicesModule.onModuleInit (/app/immich/server/dist/app.module.js:83:9)
04/27/2025 6:29:21 PM
    at async callModuleInitHook (/app/immich/server/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9)
04/27/2025 6:29:21 PM
    at async NestApplication.callInitHook (/app/immich/server/node_modules/@nestjs/core/nest-application-context.js:242:13)
04/27/2025 6:29:21 PM
    at async NestApplication.init (/app/immich/server/node_modules/@nestjs/core/nest-application.js:100:9)
04/27/2025 6:29:21 PM
    at async NestApplication.listen (/app/immich/server/node_modules/@nestjs/core/nest-application.js:170:13)
04/27/2025 6:29:21 PM
    at async bootstrap (/app/immich/server/dist/workers/microservices.js:25:5)
04/27/2025 6:29:21 PM
microservices worker exited with code 1
04/27/2025 6:29:22 PM
Detected CPU Cores: 8
04/27/2025 6:29:25 PM
Starting microservices worker
04/27/2025 6:29:29 PM
[Nest] 1797  - 04/27/2025, 6:29:29 PM     LOG [Microservices:EventRepository] Initialized websocket server
04/27/2025 6:29:29 PM
[Nest] 1797  - 04/27/2025, 6:29:29 PM     LOG [Microservices:DatabaseRepository] Running migrations, this may take a while
04/27/2025 6:29:29 PM
[Nest] 1797  - 04/27/2025, 6:29:29 PM     LOG [Microservices:MetadataService] Bootstrapping metadata service
04/27/2025 6:29:29 PM
[Nest] 1797  - 04/27/2025, 6:29:29 PM     LOG [Microservices:MetadataService] Initializing metadata service
04/27/2025 6:29:29 PM
[Nest] 1797  - 04/27/2025, 6:29:29 PM     LOG [Microservices:MapRepository] Initializing metadata repository

Additional information

No response

Originally created by @Janczykkkko on GitHub (Apr 27, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug Getting postgres error after downgrading for a moment back to 1.131.3 from 1.132.1 and going back to 1.132.1 - **I know my bad,** was trying to get oauth working. Would be grateful if sb has any pointers on how to fix init. Now thumbnails are not generating :( ### The OS that Immich Server is running on docker synology ### Version of Immich Server 1.132.1 ### Version of Immich Mobile App 1.132.1 ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML version: "3" services: immich: image: harbor.lalala.eu/ghcr.io/imagegenius/immich:v1.132.0-ig388 container_name: immich logging: driver: loki options: loki-url: http://localhost:3100/loki/api/v1/push environment: - PUID=0 - PGID=0 - TZ=Europe/Warsaw - DB_HOSTNAME=immich-postgres - DB_USERNAME=lalala - DB_PASSWORD=lalala - DB_DATABASE_NAME=lalala - REDIS_HOSTNAME=immich-redis - DISABLE_MACHINE_LEARNING=false - DISABLE_TYPESENSE=false - DB_PORT=5432 - S6_VERBOSITY=2 - REDIS_PORT=6379 volumes: - /volume1/docker/data/immich/config:/config - /volume2/photos-new/encoded-video:/photos/encoded-video - /volume2/photos-new/library:/photos/library - /volume2/photos-new/profile:/photos/profile - /volume2/photos-new/upload:/photos/upload - /volume2/photos-new/backups:/photos/backups - /volume2/photos-new/thumbs:/photos/thumbs - /volume1/docker/data/immich/ML:/config/machine-learning #optional - /volume1/docker/data/immich/run:/etc/s6-overlay/s6-rc.d/init-config-immich/run expose: - 8080 restart: always labels: - traefik.enable=true - traefik.http.routers.immich.rule=Host(`photos.lalala.eu`) - traefik.http.routers.immich.entrypoints=websecure - traefik.http.services.immich.loadbalancer.server.port=8080 - traefik.http.routers.immich.tls=true - traefik.http.routers.immich.priority=10 immich-redis: image: harbor.lalala.eu/dockerhub/redis restart: always environment: - TZ=Europe/Warsaw expose: - 6379 container_name: immich-redis volumes: - /volume1/docker/data/immich-redis:/data immich-postgres: image: harbor.lalala.eu/dockerhub/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 expose: - 5432 container_name: immich-postgres logging: driver: loki options: loki-url: http://localhost:3100/loki/api/v1/push restart: always environment: POSTGRES_USER: lalala POSTGRES_PASSWORD: lalala POSTGRES_DB: lalala TZ: Europe/Warsaw volumes: - /volume1/docker/data/immich-postgres:/var/lib/postgresql/data networks: default: name: root external: true ``` ### Your .env content ```Shell compose ``` ### Reproduction steps 1. 2. 3. ... ### Relevant log output ```shell 04/27/2025 6:29:20 PM [Nest] 1776 - 04/27/2025, 6:29:20 PM LOG [Microservices:EventRepository] Initialized websocket server 04/27/2025 6:29:20 PM [Nest] 1776 - 04/27/2025, 6:29:20 PM LOG [Microservices:DatabaseRepository] Running migrations, this may take a while 04/27/2025 6:29:21 PM [Nest] 1776 - 04/27/2025, 6:29:21 PM LOG [Microservices:MetadataService] Bootstrapping metadata service 04/27/2025 6:29:21 PM [Nest] 1776 - 04/27/2025, 6:29:21 PM LOG [Microservices:MetadataService] Initializing metadata service 04/27/2025 6:29:21 PM [Nest] 1776 - 04/27/2025, 6:29:21 PM LOG [Microservices:MapRepository] Initializing metadata repository 04/27/2025 6:29:21 PM Query failed : { 04/27/2025 6:29:21 PM durationMs: 4.446374999999534, 04/27/2025 6:29:21 PM error: PostgresError: relation "geodata_places_tmp" already exists 04/27/2025 6:29:21 PM at ErrorResponse (/app/immich/server/node_modules/postgres/cjs/src/connection.js:790:26) 04/27/2025 6:29:21 PM at handle (/app/immich/server/node_modules/postgres/cjs/src/connection.js:476:6) 04/27/2025 6:29:21 PM at Socket.data (/app/immich/server/node_modules/postgres/cjs/src/connection.js:315:9) 04/27/2025 6:29:21 PM at Socket.emit (node:events:518:28) 04/27/2025 6:29:21 PM at addChunk (node:internal/streams/readable:561:12) 04/27/2025 6:29:21 PM at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) 04/27/2025 6:29:21 PM at Readable.push (node:internal/streams/readable:392:5) 04/27/2025 6:29:21 PM at TCP.onStreamRead (node:internal/stream_base_commons:189:23) { 04/27/2025 6:29:21 PM severity_local: 'ERROR', 04/27/2025 6:29:21 PM severity: 'ERROR', 04/27/2025 6:29:21 PM code: '42P07', 04/27/2025 6:29:21 PM file: 'heap.c', 04/27/2025 6:29:21 PM line: '1198', 04/27/2025 6:29:21 PM routine: 'heap_create_with_catalog' 04/27/2025 6:29:21 PM }, 04/27/2025 6:29:21 PM sql: 'CREATE TABLE geodata_places_tmp\n' + 04/27/2025 6:29:21 PM ' (\n' + 04/27/2025 6:29:21 PM ' LIKE geodata_places INCLUDING ALL EXCLUDING INDEXES\n' + 04/27/2025 6:29:21 PM ' )', 04/27/2025 6:29:21 PM params: [] 04/27/2025 6:29:21 PM } 04/27/2025 6:29:21 PM [Nest] 1776 - 04/27/2025, 6:29:21 PM ERROR [Microservices:MetadataService] Unable to initialize reverse geocoding: PostgresError: relation "geodata_places_tmp" already exists 04/27/2025 6:29:21 PM PostgresError: relation "geodata_places_tmp" already exists 04/27/2025 6:29:21 PM at ErrorResponse (/app/immich/server/node_modules/postgres/cjs/src/connection.js:790:26) 04/27/2025 6:29:21 PM at handle (/app/immich/server/node_modules/postgres/cjs/src/connection.js:476:6) 04/27/2025 6:29:21 PM at Socket.data (/app/immich/server/node_modules/postgres/cjs/src/connection.js:315:9) 04/27/2025 6:29:21 PM at Socket.emit (node:events:518:28) 04/27/2025 6:29:21 PM at addChunk (node:internal/streams/readable:561:12) 04/27/2025 6:29:21 PM at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) 04/27/2025 6:29:21 PM at Readable.push (node:internal/streams/readable:392:5) 04/27/2025 6:29:21 PM at TCP.onStreamRead (node:internal/stream_base_commons:189:23) 04/27/2025 6:29:21 PM Error: Metadata service init failed 04/27/2025 6:29:21 PM at MetadataService.init (/app/immich/server/dist/services/metadata.service.js:95:19) 04/27/2025 6:29:21 PM at process.processTicksAndRejections (node:internal/process/task_queues:105:5) 04/27/2025 6:29:21 PM at async MetadataService.onBootstrap (/app/immich/server/dist/services/metadata.service.js:74:9) 04/27/2025 6:29:21 PM at async EventRepository.onEvent (/app/immich/server/dist/repositories/event.repository.js:126:13) 04/27/2025 6:29:21 PM at async MicroservicesModule.onModuleInit (/app/immich/server/dist/app.module.js:83:9) 04/27/2025 6:29:21 PM at async callModuleInitHook (/app/immich/server/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9) 04/27/2025 6:29:21 PM at async NestApplication.callInitHook (/app/immich/server/node_modules/@nestjs/core/nest-application-context.js:242:13) 04/27/2025 6:29:21 PM at async NestApplication.init (/app/immich/server/node_modules/@nestjs/core/nest-application.js:100:9) 04/27/2025 6:29:21 PM at async NestApplication.listen (/app/immich/server/node_modules/@nestjs/core/nest-application.js:170:13) 04/27/2025 6:29:21 PM at async bootstrap (/app/immich/server/dist/workers/microservices.js:25:5) 04/27/2025 6:29:21 PM microservices worker error: Error: Metadata service init failed, stack: Error: Metadata service init failed 04/27/2025 6:29:21 PM at MetadataService.init (/app/immich/server/dist/services/metadata.service.js:95:19) 04/27/2025 6:29:21 PM at process.processTicksAndRejections (node:internal/process/task_queues:105:5) 04/27/2025 6:29:21 PM at async MetadataService.onBootstrap (/app/immich/server/dist/services/metadata.service.js:74:9) 04/27/2025 6:29:21 PM at async EventRepository.onEvent (/app/immich/server/dist/repositories/event.repository.js:126:13) 04/27/2025 6:29:21 PM at async MicroservicesModule.onModuleInit (/app/immich/server/dist/app.module.js:83:9) 04/27/2025 6:29:21 PM at async callModuleInitHook (/app/immich/server/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9) 04/27/2025 6:29:21 PM at async NestApplication.callInitHook (/app/immich/server/node_modules/@nestjs/core/nest-application-context.js:242:13) 04/27/2025 6:29:21 PM at async NestApplication.init (/app/immich/server/node_modules/@nestjs/core/nest-application.js:100:9) 04/27/2025 6:29:21 PM at async NestApplication.listen (/app/immich/server/node_modules/@nestjs/core/nest-application.js:170:13) 04/27/2025 6:29:21 PM at async bootstrap (/app/immich/server/dist/workers/microservices.js:25:5) 04/27/2025 6:29:21 PM microservices worker exited with code 1 04/27/2025 6:29:22 PM Detected CPU Cores: 8 04/27/2025 6:29:25 PM Starting microservices worker 04/27/2025 6:29:29 PM [Nest] 1797 - 04/27/2025, 6:29:29 PM LOG [Microservices:EventRepository] Initialized websocket server 04/27/2025 6:29:29 PM [Nest] 1797 - 04/27/2025, 6:29:29 PM LOG [Microservices:DatabaseRepository] Running migrations, this may take a while 04/27/2025 6:29:29 PM [Nest] 1797 - 04/27/2025, 6:29:29 PM LOG [Microservices:MetadataService] Bootstrapping metadata service 04/27/2025 6:29:29 PM [Nest] 1797 - 04/27/2025, 6:29:29 PM LOG [Microservices:MetadataService] Initializing metadata service 04/27/2025 6:29:29 PM [Nest] 1797 - 04/27/2025, 6:29:29 PM LOG [Microservices:MapRepository] Initializing metadata repository ``` ### Additional information _No response_
Author
Owner

@Janczykkkko commented on GitHub (Apr 27, 2025):

Image

@Janczykkkko commented on GitHub (Apr 27, 2025): ![Image](https://github.com/user-attachments/assets/9d18914e-9ea3-42f2-a44c-de186d61b659)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#5912