I
Immichโ€ข3y ago
SMAW

relation "IDX_sharedlink_albumId" already exists

Since a reboot I get this error : immich-server_1 | [Nest] 1 - 03/11/2023, 1:52:47 PM ERROR [ExceptionHandler] relation "IDX_sharedlink_albumId" already exists immich-server_1 | QueryFailedError: relation "IDX_sharedlink_albumId" already exists immich-server_1 | at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) immich-server_1 | at processTicksAndRejections (node:internal/process/task_queues:96:5) immich-server_1 | at async AddIndexForAlbumInSharedLinkTable1677535643119.up (/usr/src/app/dist/apps/immich/libs/infra/src/db/migrations/1677535643119-AddIndexForAlbumInSharedLinkTable.js:9:9) immich-server_1 | at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:223:17) immich-server_1 | at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:249:35) immich-server_1 | at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:137:17) Probably I need to fix something in the PostgresDB but since I've no knowledge about postgres, I hope there is somebody here that can help.... I'm running a default setup on the latest version
8 Replies
MicheI
MicheIโ€ข3y ago
With rebooting I assume it also updates Immich? Something has gone wrong applying the database migrations. Not sure why this happened, but you can restore the database from a backup or manually fix it by removing the IDX_sharedlink_albumId index from the database.
SMAW
SMAWOPโ€ข3y ago
ehm no there was no update ๐Ÿ˜ฆ , only rebooted the host.... ah can you tell me the query for removing that index?
MicheI
MicheIโ€ข3y ago
Could also try rebooting immich_server and see if the issue persists Otherwise you can run this query at your own risk DROP INDEX "public"."IDX_sharedlink_albumId";
SMAW
SMAWOPโ€ข3y ago
Thanks the site seems to work again, only errors i'm now getting is : immich-machine-learning_1 | /bin/sh: 0: cannot open ./entrypoint.sh: No such file I see thats an error in the dockercompose ๐Ÿ™‚
MicheI
MicheIโ€ข3y ago
There was a breaking change in v1.48.0 for machine-learning that requires an update to your docker-compose.yml file https://github.com/immich-app/immich/releases/tag/v1.48.0
GitHub
Release v1.48.0 ยท immich-app/immich
February 2023 (version V1.48.0) ๐Ÿ”ด Breaking Changes and Important Notes for this release ๐Ÿ”ด The server and the mobile app must be on the same version to function correctly. There are changes to the ...
SMAW
SMAWOPโ€ข3y ago
Yeah, well at least immich is working now , now solving the issue why I rebooted in the first place ๐Ÿ˜‰
SMAW
SMAWOPโ€ข3y ago
Ive still have the issue why I rebooted, when uploading from my mobile the whole Dockerhost/VM/Proxmox server will be unreachable, if I upload from webinterface I get an (see image) in the logs I see : immich_server | EntityNotFoundError: Could not find any entity of type "AssetEntity" matching: { immich_server | "where": { immich_server | "ownerId": "ccc50388-d257-468b-b6c7-6dac715d1259", immich_server | "checksum": { immich_server | "type": "Buffer", immich_server | "data": [ REDACTED immich_server | ] immich_server | } immich_server | }, immich_server | "relations": [ immich_server | "exifInfo" immich_server | ] immich_server | }
No description
SMAW
SMAWOPโ€ข3y ago
immich_server | at /usr/src/app/node_modules/typeorm/entity-manager/EntityManager.js:604:39 immich_server | at runMicrotasks (<anonymous>) immich_server | at processTicksAndRejections (node:internal/process/task_queues:96:5) immich_server | at async AssetService.uploadFile (/usr/src/app/dist/apps/immich/apps/immich/src/api-v1/asset/asset.service.js:74:35) immich_server | at async AssetController.uploadFile (/usr/src/app/dist/apps/immich/apps/immich/src/api-v1/asset/asset.controller.js:60:29) immich_server | [Nest] 1 - 03/11/2023, 5:20:48 PM ERROR [ExpressAdapter] Premature close immich_server | Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close immich_server | at new NodeError (node:internal/errors:372:5) immich_server | at ServerResponse.onclose (node:internal/streams/end-of-stream:142:30) immich_server | at ServerResponse.emit (node:events:539:35) immich_server | at Socket.onServerResponseClose (node:_http_server:236:23) immich_server | at Socket.emit (node:events:539:35) immich_server | at TCP.<anonymous> (node:net:709:12)

Did you find this page helpful?