[BUG] error: database "immich" does not exist #1448

Closed
opened 2026-02-05 01:52:39 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @itangqiao on GitHub (Oct 12, 2023).

The bug

2023/10/13 04:50:36 stderr at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
2023/10/13 04:50:36 stderr at Readable.push (node:internal/streams/readable:234:10)
2023/10/13 04:50:36 stderr at readableAddChunk (node:internal/streams/readable:297:9)
2023/10/13 04:50:36 stderr at addChunk (node:internal/streams/readable:324:12)
2023/10/13 04:50:36 stderr at Socket.emit (node:events:514:28)
2023/10/13 04:50:36 stderr at Socket. (/app/immich/server/node_modules/pg-protocol/dist/index.js:11:42)
2023/10/13 04:50:36 stderr at Parser.parse (/app/immich/server/node_modules/pg-protocol/dist/parser.js:39:38)
2023/10/13 04:50:36 stderr at Parser.handlePacket (/app/immich/server/node_modules/pg-protocol/dist/parser.js:126:29)
2023/10/13 04:50:36 stderr at Parser.parseErrorMessage (/app/immich/server/node_modules/pg-protocol/dist/parser.js:287:98)
2023/10/13 04:50:36 stderr error: database "immich" does not exist
2023/10/13 04:50:36 stderr [Nest] 1828  - 10/13/2023, 4:50:36 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (7)...
2023/10/13 04:50:33 stderr at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
2023/10/13 04:50:33 stderr at Readable.push (node:internal/streams/readable:234:10)
2023/10/13 04:50:33 stderr at readableAddChunk (node:internal/streams/readable:297:9)
2023/10/13 04:50:33 stderr at addChunk (node:internal/streams/readable:324:12)
2023/10/13 04:50:33 stderr at Socket.emit (node:events:514:28)
2023/10/13 04:50:33 stderr at Socket. (/app/immich/server/node_modules/pg-protocol/dist/index.js:11:42)
2023/10/13 04:50:33 stderr at Parser.parse (/app/immich/server/node_modules/pg-protocol/dist/parser.js:39:38)
2023/10/13 04:50:33 stderr at Parser.handlePacket (/app/immich/server/node_modules/pg-protocol/dist/parser.js:126:29)
2023/10/13 04:50:33 stderr at Parser.parseErrorMessage (/app/immich/server/node_modules/pg-protocol/dist/parser.js:287:98)
2023/10/13 04:50:33 stderr error: database "immich" does not exist
image

The OS that Immich Server is running on

DSM 7.2

Version of Immich Server

lastest

Version of Immich Mobile App

lastest

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

---
version: "2.1"
services:
  immich:
    image: ghcr.io/imagegenius/immich:latest
    container_name: immich
    environment:
      - PUID=1026
      - PGID=101
      - TZ=Asia/Shanghai
      - DB_HOSTNAME=192.168.3.3
      - DB_USERNAME=postgres
      - DB_PASSWORD=postgres
      - DB_DATABASE_NAME=immich
      - REDIS_HOSTNAME=192.168.3.3
      - DISABLE_MACHINE_LEANRNING=false
      - DISABLE_TYPESENSE=false
      - DB_PORT=15432
      - REDIS_PORT=6379
      - REDIS_PASSWORD=
      - CUDA_ACCELERATION=false
    volumes:
      - /volume1/docker/immich/config:/config
      - /volume1/docker/immich/photos:/photos
      - /volume1/docker/immich/machine:/config/machine-learning
    ports:
      - 18080:8080
    restart: unless-stopped
  redis:
    image: redis
    ports:
      - 6379:6379
    container_name: redis
  postgres14:
    image: postgres:14
    ports:
      - 15432:5432
    container_name: postgres14
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: immich
    volumes:
      - /volume1/docker/immich/db:/var/lib/postgresql/data

Your .env content

none

Reproduction steps

I was unable to start the immich container, so I executed the command "rm /volume1/@docker/containers/5c73117eb63f18d5f42a226378dfc83182320b4642654e9cdb25791b1a795367/log.db", but it still didn't work. Later, I tried deleting the relevant containers and recreating them, but it still doesn't work properly.

Additional information

No response

Originally created by @itangqiao on GitHub (Oct 12, 2023). ### The bug 2023/10/13 04:50:36 | stderr | at TCP.onStreamRead (node:internal/stream_base_commons:190:23) -- | -- | -- 2023/10/13 04:50:36 | stderr | at Readable.push (node:internal/streams/readable:234:10) 2023/10/13 04:50:36 | stderr | at readableAddChunk (node:internal/streams/readable:297:9) 2023/10/13 04:50:36 | stderr | at addChunk (node:internal/streams/readable:324:12) 2023/10/13 04:50:36 | stderr | at Socket.emit (node:events:514:28) 2023/10/13 04:50:36 | stderr | at Socket.<anonymous> (/app/immich/server/node_modules/pg-protocol/dist/index.js:11:42) 2023/10/13 04:50:36 | stderr | at Parser.parse (/app/immich/server/node_modules/pg-protocol/dist/parser.js:39:38) 2023/10/13 04:50:36 | stderr | at Parser.handlePacket (/app/immich/server/node_modules/pg-protocol/dist/parser.js:126:29) 2023/10/13 04:50:36 | stderr | at Parser.parseErrorMessage (/app/immich/server/node_modules/pg-protocol/dist/parser.js:287:98) 2023/10/13 04:50:36 | stderr | error: database "immich" does not exist 2023/10/13 04:50:36 | stderr | [Nest] 1828  - 10/13/2023, 4:50:36 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (7)... 2023/10/13 04:50:33 | stderr | at TCP.onStreamRead (node:internal/stream_base_commons:190:23) 2023/10/13 04:50:33 | stderr | at Readable.push (node:internal/streams/readable:234:10) 2023/10/13 04:50:33 | stderr | at readableAddChunk (node:internal/streams/readable:297:9) 2023/10/13 04:50:33 | stderr | at addChunk (node:internal/streams/readable:324:12) 2023/10/13 04:50:33 | stderr | at Socket.emit (node:events:514:28) 2023/10/13 04:50:33 | stderr | at Socket.<anonymous> (/app/immich/server/node_modules/pg-protocol/dist/index.js:11:42) 2023/10/13 04:50:33 | stderr | at Parser.parse (/app/immich/server/node_modules/pg-protocol/dist/parser.js:39:38) 2023/10/13 04:50:33 | stderr | at Parser.handlePacket (/app/immich/server/node_modules/pg-protocol/dist/parser.js:126:29) 2023/10/13 04:50:33 | stderr | at Parser.parseErrorMessage (/app/immich/server/node_modules/pg-protocol/dist/parser.js:287:98) 2023/10/13 04:50:33 | stderr | error: database "immich" does not exist <img width="875" alt="image" src="https://github.com/immich-app/immich/assets/44393379/bd63f748-ac71-4e46-b1b1-bf270e5f51d0"> ### The OS that Immich Server is running on DSM 7.2 ### Version of Immich Server lastest ### Version of Immich Mobile App lastest ### Platform with the issue - [ ] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML --- version: "2.1" services: immich: image: ghcr.io/imagegenius/immich:latest container_name: immich environment: - PUID=1026 - PGID=101 - TZ=Asia/Shanghai - DB_HOSTNAME=192.168.3.3 - DB_USERNAME=postgres - DB_PASSWORD=postgres - DB_DATABASE_NAME=immich - REDIS_HOSTNAME=192.168.3.3 - DISABLE_MACHINE_LEANRNING=false - DISABLE_TYPESENSE=false - DB_PORT=15432 - REDIS_PORT=6379 - REDIS_PASSWORD= - CUDA_ACCELERATION=false volumes: - /volume1/docker/immich/config:/config - /volume1/docker/immich/photos:/photos - /volume1/docker/immich/machine:/config/machine-learning ports: - 18080:8080 restart: unless-stopped redis: image: redis ports: - 6379:6379 container_name: redis postgres14: image: postgres:14 ports: - 15432:5432 container_name: postgres14 environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: immich volumes: - /volume1/docker/immich/db:/var/lib/postgresql/data ``` ### Your .env content ```Shell none ``` ### Reproduction steps ```bash I was unable to start the immich container, so I executed the command "rm /volume1/@docker/containers/5c73117eb63f18d5f42a226378dfc83182320b4642654e9cdb25791b1a795367/log.db", but it still didn't work. Later, I tried deleting the relevant containers and recreating them, but it still doesn't work properly. ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Oct 13, 2023):

Can you help open an issue in imagegenius repository for this?

@alextran1502 commented on GitHub (Oct 13, 2023): Can you help open an issue in imagegenius repository for this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1448