(RESOLVED) Issue updating from 1.62.1 to any newer version

Currently stuck on server version 1.62.1 as whenever I update to a newer version, i cannot get to the web interface immich logs:
Nest] 191 - 07/09/2023, 5:45:47 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
QueryFailedError: could not create unique index "UQ_4ed4f8052685ff5b1e7ca1058ba"
at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ImportAsset1686584273471.up (/app/immich/server/dist/infra/migrations/1686584273471-ImportAsset.js:10: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:260:35)
at async DataSource.initialize (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:148:17)
Nest] 191 - 07/09/2023, 5:45:47 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
QueryFailedError: could not create unique index "UQ_4ed4f8052685ff5b1e7ca1058ba"
at PostgresQueryRunner.query (/app/immich/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ImportAsset1686584273471.up (/app/immich/server/dist/infra/migrations/1686584273471-ImportAsset.js:10: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:260:35)
at async DataSource.initialize (/app/immich/server/node_modules/typeorm/data-source/DataSource.js:148:17)
my postgres server, I'm seeing this error:
2023-07-09 17:37:25.764 AEST [3607] ERROR: could not create unique index "UQ_4ed4f8052685ff5b1e7ca1058ba"
2023-07-09 17:37:25.764 AEST [3607] DETAIL: Key ("originalPath")=(/photos/library/.../2022/2022-11-26/photo.jpg) is duplicated.
2023-07-09 17:37:25.764 AEST [3607] STATEMENT: ALTER TABLE "assets" ADD CONSTRAINT "UQ_4ed4f8052685ff5b1e7ca1058ba" UNIQUE ("originalPath")
2023-07-09 17:37:25.764 AEST [3606] ERROR: could not create unique index "UQ_4ed4f8052685ff5b1e7ca1058ba"
2023-07-09 17:37:25.764 AEST [3606] DETAIL: Key ("originalPath")=(/photos/library/.../2022/2022-11-26/photo.jpg) is duplicated.
2023-07-09 17:37:25.764 AEST [3606] CONTEXT: parallel worker
2023-07-09 17:37:25.764 AEST [3606] STATEMENT: ALTER TABLE "assets" ADD CONSTRAINT "UQ_4ed4f8052685ff5b1e7ca1058ba" UNIQUE ("originalPath")
2023-07-09 17:37:25.768 AEST [1] LOG: background worker "parallel worker" (PID 3607) exited with exit code 1
2023-07-09 17:37:25.764 AEST [3607] ERROR: could not create unique index "UQ_4ed4f8052685ff5b1e7ca1058ba"
2023-07-09 17:37:25.764 AEST [3607] DETAIL: Key ("originalPath")=(/photos/library/.../2022/2022-11-26/photo.jpg) is duplicated.
2023-07-09 17:37:25.764 AEST [3607] STATEMENT: ALTER TABLE "assets" ADD CONSTRAINT "UQ_4ed4f8052685ff5b1e7ca1058ba" UNIQUE ("originalPath")
2023-07-09 17:37:25.764 AEST [3606] ERROR: could not create unique index "UQ_4ed4f8052685ff5b1e7ca1058ba"
2023-07-09 17:37:25.764 AEST [3606] DETAIL: Key ("originalPath")=(/photos/library/.../2022/2022-11-26/photo.jpg) is duplicated.
2023-07-09 17:37:25.764 AEST [3606] CONTEXT: parallel worker
2023-07-09 17:37:25.764 AEST [3606] STATEMENT: ALTER TABLE "assets" ADD CONSTRAINT "UQ_4ed4f8052685ff5b1e7ca1058ba" UNIQUE ("originalPath")
2023-07-09 17:37:25.768 AEST [1] LOG: background worker "parallel worker" (PID 3607) exited with exit code 1
2 Replies
bo0tzz
bo0tzz2y ago
GitHub
[BUG] Postgres database failed to start after 1.63.0 update · Issue...
The bug I updated my docker containers this morning to the latest versions and Immich fails to full start (get a 500 error). There are errors in the logs that it cannot connect to the database. So ...
MyNinja
MyNinjaOP2y ago
thanks. I'll have a look cheers, that worked!

Did you find this page helpful?