immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
52.37k stars 2.77k forks source link

V1.121.0 not starting as docker under unraid #14267

Closed canedje closed 1 day ago

canedje commented 1 day ago

The bug

Immich docker not starting up under unraid giving a "geodate places" error in the log

api worker exited with code 1 QueryFailedError: relation "geodata_places" does not exist at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async NaturalEarthCountriesIdentityColumn1732072134943.up (/app/immich/server/dist/migrations/1732072134943-NaturalEarthCountriesIdentityColumn.js:13:9) at async MigrationExecutor.executePendingMigrations (/app/immich/server/node_modules/typeorm/migration/MigrationExecutor.js:225:17) at async DataSource.runMigrations (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:265:35) at async DatabaseRepository.runMigrations (/app/immich/server/dist/repositories/database.repository.js:189:9) at async /app/immich/server/dist/services/database.service.js:96:17 at async /app/immich/server/dist/repositories/database.repository.js:197:23 { query: 'ALTER TABLE geodata_places DROP COLUMN "earthCoord"', parameters: undefined, driverError: error: relation "geodata_places" does not exist at /app/immich/server/node_modules/pg/lib/client.js:535:17 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25) at async NaturalEarthCountriesIdentityColumn1732072134943.up (/app/immich/server/dist/migrations/1732072134943-NaturalEarthCountriesIdentityColumn.js:13:9) at async MigrationExecutor.executePendingMigrations (/app/immich/server/node_modules/typeorm/migration/MigrationExecutor.js:225:17) at async DataSource.runMigrations (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:265:35) at async DatabaseRepository.runMigrations (/app/immich/server/dist/repositories/database.repository.js:189:9) at async /app/immich/server/dist/services/database.service.js:96:17 at async /app/immich/server/dist/repositories/database.repository.js:197:23 { length: 112, severity: 'ERROR', code: '42P01', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'namespace.c', line: '434', routine: 'RangeVarGetRelidExtended' }, length: 112, severity: 'ERROR', code: '42P01', detail: undefined, hint: undefined, position: undefined, internalPosition: undefined, internalQuery: undefined, where: undefined, schema: undefined, table: undefined, column: undefined, dataType: undefined, constraint: undefined, file: 'namespace.c', line: '434', routine: 'RangeVarGetRelidExtended' } api worker exited with code 1 Starting api worker [Nest] 419 - 11/20/2024, 9:14:52 PM LOG [Api:EventRepository] Initialized websocket server Migration "NaturalEarthCountriesIdentityColumn1732072134943" failed, error: relation "geodata_places" does not exist

The OS that Immich Server is running on

As a docker under Unraid

Version of Immich Server

v1.121.0

Version of Immich Mobile App

not used

Platform with the issue

Your docker-compose.yml content

docker run
  -d
  --name='immich'
  --net='ewhnet'
  --cpuset-cpus='2,4,6,8,10,3,5,7,9'
  --pids-limit 2048
  -e TZ="Europe/Berlin"
  -e HOST_OS="Unraid"
  -e HOST_HOSTNAME="Tower2"
  -e HOST_CONTAINERNAME="immich"
  -e 'DB_HOSTNAME'='192.168.2.240'
  -e 'DB_USERNAME'='xxxxxxxx'
  -e 'DB_PASSWORD'='xxxxxxxxx'
  -e 'DB_DATABASE_NAME'='xxxxxxx'
  -e 'REDIS_HOSTNAME'='192.168.2.240'
  -e 'DB_PORT'='5432'
  -e 'REDIS_PORT'='6379'
  -e 'REDIS_PASSWORD'='redis'
  -e 'MACHINE_LEARNING_WORKERS'='1'
  -e 'MACHINE_LEARNING_WORKER_TIMEOUT'='120'
  -e 'PUID'='99'
  -e 'PGID'='100'
  -e 'UMASK'='022'
  -l net.unraid.docker.managed=dockerman
  -l net.unraid.docker.webui='http://[IP]:[PORT:8080]'
  -l net.unraid.docker.icon='https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png'
  -p '8089:8080/tcp'
  -v '/mnt/remotes/NAS_NetwerkSchijf/Media/immich/photos/':'/photos':'rw,slave'
  -v '/mnt/remotes/NAS_NetwerkSchijf/Media/immich/import/':'/import':'ro,slave'
  -v '/mnt/user/appdata/immich':'/config':'rw' 'ghcr.io/imagegenius/immich:latest'
b69366b1f13c6f0511e298825dccff45f6b302e40bcf051484957a4d1811c894

The command finished successfully!

Your .env content

I do not know what this means

Reproduction steps

  1. just update
  2. ...

Relevant log output

api worker exited with code 1
Starting api worker
[Nest] 825  - 11/20/2024, 9:21:21 PM     LOG [Api:EventRepository] Initialized websocket server
Migration "NaturalEarthCountriesIdentityColumn1732072134943" failed, error: relation "geodata_places" does not exist
Starting api worker
[Nest] 854  - 11/20/2024, 9:21:24 PM     LOG [Api:EventRepository] Initialized websocket server
Migration "NaturalEarthCountriesIdentityColumn1732072134943" failed, error: relation "geodata_places" does not exist
QueryFailedError: relation "geodata_places" does not exist
    at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NaturalEarthCountriesIdentityColumn1732072134943.up (/app/immich/server/dist/migrations/1732072134943-NaturalEarthCountriesIdentityColumn.js:13:9)
    at async MigrationExecutor.executePendingMigrations (/app/immich/server/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
    at async DataSource.runMigrations (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:265:35)
    at async DatabaseRepository.runMigrations (/app/immich/server/dist/repositories/database.repository.js:189:9)
    at async /app/immich/server/dist/services/database.service.js:96:17
    at async /app/immich/server/dist/repositories/database.repository.js:197:23 {
  query: 'ALTER TABLE geodata_places DROP COLUMN "earthCoord"',
  parameters: undefined,
  driverError: error: relation "geodata_places" does not exist
      at /app/immich/server/node_modules/pg/lib/client.js:535:17
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25)
      at async NaturalEarthCountriesIdentityColumn1732072134943.up (/app/immich/server/dist/migrations/1732072134943-NaturalEarthCountriesIdentityColumn.js:13:9)
      at async MigrationExecutor.executePendingMigrations (/app/immich/server/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
      at async DataSource.runMigrations (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:265:35)
      at async DatabaseRepository.runMigrations (/app/immich/server/dist/repositories/database.repository.js:189:9)
      at async /app/immich/server/dist/services/database.service.js:96:17
      at async /app/immich/server/dist/repositories/database.repository.js:197:23 {
    length: 112,
    severity: 'ERROR',
    code: '42P01',
    detail: undefined,
    hint: undefined,
    position: undefined,
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'namespace.c',
    line: '434',
    routine: 'RangeVarGetRelidExtended'
  },
  length: 112,
  severity: 'ERROR',
  code: '42P01',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'namespace.c',
  line: '434',
  routine: 'RangeVarGetRelidExtended'
}
api worker exited with code 1
Starting api worker
[Nest] 883  - 11/20/2024, 9:21:27 PM     LOG [Api:EventRepository] Initialized websocket server
Migration "NaturalEarthCountriesIdentityColumn1732072134943" failed, error: relation "geodata_places" does not exist
QueryFailedError: relation "geodata_places" does not exist
    at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NaturalEarthCountriesIdentityColumn1732072134943.up (/app/immich/server/dist/migrations/1732072134943-NaturalEarthCountriesIdentityColumn.js:13:9)
    at async MigrationExecutor.executePendingMigrations (/app/immich/server/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
    at async DataSource.runMigrations (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:265:35)
    at async DatabaseRepository.runMigrations (/app/immich/server/dist/repositories/database.repository.js:189:9)
    at async /app/immich/server/dist/services/database.service.js:96:17
    at async /app/immich/server/dist/repositories/database.repository.js:197:23 {
  query: 'ALTER TABLE geodata_places DROP COLUMN "earthCoord"',
  parameters: undefined,
  driverError: error: relation "geodata_places" does not exist
      at /app/immich/server/node_modules/pg/lib/client.js:535:17
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:184:25)
      at async NaturalEarthCountriesIdentityColumn1732072134943.up (/app/immich/server/dist/migrations/1732072134943-NaturalEarthCountriesIdentityColumn.js:13:9)
      at async MigrationExecutor.executePendingMigrations (/app/immich/server/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
      at async DataSource.runMigrations (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:265:35)
      at async DatabaseRepository.runMigrations (/app/immich/server/dist/repositories/database.repository.js:189:9)
      at async /app/immich/server/dist/services/database.service.js:96:17
      at async /app/immich/server/dist/repositories/database.repository.js:197:23 {
    length: 112,
    severity: 'ERROR',
    code: '42P01',
    detail: undefined,
    hint: undefined,
    position: undefined,
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'namespace.c',
    line: '434',
    routine: 'RangeVarGetRelidExtended'
  },
  length: 112,
  severity: 'ERROR',
  code: '42P01',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'namespace.c',
  line: '434',
  routine: 'RangeVarGetRelidExtended'
}

Under v1.20.2 There ia also some warning about geodata places, but stil starting as normal: image image

Additional information

No response