immich-app / immich

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

[BUG] Don't work immich (1.91.0(include this version) next version) #5813

Closed paijjang closed 9 months ago

paijjang commented 10 months ago

The bug

i work immich on docker with synology DS1815+ i did worked until 1.90.2. but, update 1.91.0 over(1.91.0 ~ 1.91.3), i didnt work my immich. (and, i did tried all remove and new install by 1.91.3)

logs of immich_postgres... repeat this error code..

QueryFailedError: called Result::unwrap() on an Err value: Os { code: 38, kind: Unsupported, message: "Function not implemented" } at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) at async AddCLIPEmbeddingIndex1700713994428.up (/usr/src/app/dist/infra/migrations/1700713994428-AddCLIPEmbeddingIndex.js:9:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)

and, logs of immich_serverm, repeat this error [Nest] 9 - 12/18/2023, 4:32:00 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (6)... QueryFailedError: called Result::unwrap() on an Err value: Os { code: 38, kind: Unsupported, message: "Function not implemented" } at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async AddCLIPEmbeddingIndex1700713994428.up (/usr/src/app/dist/infra/migrations/1700713994428-AddCLIPEmbeddingIndex.js:9:9) at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17) at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35) at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17) plz, help me...TT

The OS that Immich Server is running on

Synology 7.1.1-42962 update 6.(uname -a result : Linux RANSER-NAS-BOX 3.10.108 #42962 SMP Mon May 29 14:36:28 CST 2023 x86_64 GNU/Linux synology_avoton_1815+)

Version of Immich Server

v1.91.3

Version of Immich Mobile App

v1.91.3

Platform with the issue

Your docker-compose.yml content

version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: tmimmich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - ${RAWDATA_LOCATION}:/usr/src/app/upload/library
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_LOCATION}:/mnt/media/old_photo
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always
    networks:
      TMBRIDGE:
        ipv4_address: 172.18.1.101

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - ${RAWDATA_LOCATION}:/usr/src/app/upload/library
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_LOCATION}:/mnt/media/old_photo
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always
    networks:
      TMBRIDGE:
        ipv4_address: 172.18.1.102

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    restart: always
    networks:
      TMBRIDGE:
        ipv4_address: 172.18.1.103

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:80cc8518800438c684a53ed829c621c94afd1087aaeb59b0d4343ed3e7bcf6c5
    volumes:
      - /etc/localtime:/etc/localtime:ro
    restart: always
    networks:
      TMBRIDGE:
        ipv4_address: 172.18.1.105

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro
    restart: always
    networks:
      TMBRIDGE:
        ipv4_address: 172.18.1.106

volumes:
  pgdata:
  model-cache:

networks:
  TMBRIDGE:
    external: true

Your .env content

You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./data
RAWDATA_LOCATION=/volume2/TMPHOTO/immich-photofile
EXTERNAL_LOCATION=/volume2/homes/TM/newphotos

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
DB_PASSWORD=REMOVE

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. docker-compose down 
2. docker-compose up -d
...

Additional information

on immich_postgres log file PostgreSQL Database directory appears to contain a database; Skipping initialization 2023-12-18 13:58:08.898 KST [1] LOG: starting PostgreSQL 14.10 (Debian 14.10-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit 2023-12-18 13:58:08.899 KST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2023-12-18 13:58:08.899 KST [1] LOG: listening on IPv6 address "::", port 5432 2023-12-18 13:58:08.914 KST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2023-12-18 13:58:08.932 KST [27] LOG: database system was shut down at 2023-12-18 13:57:29 KST 2023-12-18 13:58:08.956 KST [1] LOG: database system is ready to accept connections 2023-12-18 13:58:23.451 KST [37] ERROR: called Result::unwrap() on an Err value: Os { code: 38, kind: Unsupported, message: "Function not implemented" } 2023-12-18 13:58:23.451 KST [37] STATEMENT:
CREATE INDEX IF NOT EXISTS clip_index ON smart_search USING vectors (embedding cosine_ops) WITH (options = $$ [indexing.hnsw] m = 16 ef_construction = 300 $$); 2023-12-18 13:58:24.580 KST [38] ERROR: called Result::unwrap() on an Err value: Os { code: 38, kind: Unsupported, message: "Function not implemented" } 2023-12-18 13:58:24.580 KST [38] STATEMENT:
CREATE INDEX IF NOT EXISTS clip_index ON smart_search USING vectors (embedding cosine_ops) WITH (options = $$ [indexing.hnsw] m = 16 ef_construction = 300 $$);

No response

alextran1502 commented 10 months ago

if you try to create a new instance, does it work on your Synology?

paijjang commented 10 months ago

if you try to create a new instance, does it work on your Synology?

i did migration with docker on synology( from 1.90.2 to 1.91.3)...result failed(error code same...) i did new create with docker on synology(1.91.3)(after delete old volume, and old image)......result failed(error code same...)

migration or new create....contatiner create did. but, work....didnt work...

dp20eic commented 10 months ago

Good Morning,

I have the same problem, the last working Version is 1.88.0. If I migrate to the new Version, I get the same entries in the Log file.

If I create a new container, the Database is not created has only two tables, last night tested with actual Version. I will try today again and send later log information, yesterday I delete my try's.

VG Bernd

Edit So I install it new with this Compose YAML

version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: new_immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - 32283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: new_immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: new_immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always

  redis:
    container_name: new_immich_redis
    image: redis:6.2-alpine@sha256:b6124ab2e45cc332e16398022a411d7e37181f21ff7874835e0180f56a09e82a
    restart: always

  database:
    container_name: new_immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

and this .env

UPLOAD_LOCATION=/volume1/docker/my_new_immich/upload
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_HOSTNAME=new_immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=new_immich_redis

The error from postgres is

PostgreSQL Database directory appears to contain a database; Skipping initialization
2023-12-18 13:34:51.198 UTC [1] LOG:  starting PostgreSQL 14.10 (Debian 14.10-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2023-12-18 13:34:51.241 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-12-18 13:34:51.241 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2023-12-18 13:34:51.359 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-12-18 13:34:51.561 UTC [28] LOG:  database system was shut down at 2023-12-17 18:57:34 UTC
2023-12-18 13:34:51.755 UTC [1] LOG:  database system is ready to accept connections
2023-12-18 13:35:57.345 UTC [40] ERROR:  called `Result::unwrap()` on an `Err` value: Os { code: 38, kind: Unsupported, message: "Function not implemented" }
2023-12-18 13:35:57.345 UTC [40] STATEMENT:  
          CREATE INDEX IF NOT EXISTS clip_index ON smart_search
          USING vectors (embedding cosine_ops) WITH (options = $$
          [indexing.hnsw]
          m = 16
          ef_construction = 300
          $$);
2023-12-18 13:36:17.879 UTC [39] ERROR:  called `Result::unwrap()` on an `Err` value: Os { code: 38, kind: Unsupported, message: "Function not implemented" }
2023-12-18 13:36:17.879 UTC [39] STATEMENT:  
          CREATE INDEX IF NOT EXISTS clip_index ON smart_search
          USING vectors (embedding cosine_ops) WITH (options = $$
          [indexing.hnsw]
          m = 16
          ef_construction = 300
          $$);
2023-12-18 13:36:37.705 UTC [48] ERROR:  called `Result::unwrap()` on an `Err` value: Os { code: 38, kind: Unsupported, message: "Function not implemented" }
2023-12-18 13:36:37.705 UTC [48] STATEMENT:  
          CREATE INDEX IF NOT EXISTS clip_index ON smart_search
          USING vectors (embedding cosine_ops) WITH (options = $$
          [indexing.hnsw]
          m = 16
          ef_construction = 300
          $$);
...

The error message from immich-server

[Nest] 7  - 12/18/2023, 1:39:51 PM     LOG [NestFactory] Starting Nest application...
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] TypeOrmModule dependencies initialized +144ms
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] BullModule dependencies initialized +1ms
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] DiscoveryModule dependencies initialized +0ms
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] ScheduleModule dependencies initialized +0ms
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] ConfigModule dependencies initialized +1ms
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] BullModule dependencies initialized +0ms
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] ScheduleModule dependencies initialized +1ms
[Nest] 7  - 12/18/2023, 1:39:52 PM     LOG [InstanceLoader] BullModule dependencies initialized +1ms
[Nest] 7  - 12/18/2023, 1:39:52 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
QueryFailedError: called `Result::unwrap()` on an `Err` value: Os { code: 38, kind: Unsupported, message: "Function not implemented" }
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AddCLIPEmbeddingIndex1700713994428.up (/usr/src/app/dist/infra/migrations/1700713994428-AddCLIPEmbeddingIndex.js:9:9)
    at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
    at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
    at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
[Nest] 7  - 12/18/2023, 1:39:52 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)...
QueryFailedError: called `Result::unwrap()` on an `Err` value: Os { code: 38, kind: Unsupported, message: "Function not implemented" }
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AddCLIPEmbeddingIndex1700713994428.up (/usr/src/app/dist/infra/migrations/1700713994428-AddCLIPEmbeddingIndex.js:9:9)
    at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
    at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
    at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
[Nest] 7  - 12/18/2023, 1:39:52 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (3)...
QueryFailedError: called `Result::unwrap()` on an `Err` value: Os { code: 38, kind: Unsupported, message: "Function not implemented" }
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AddCLIPEmbeddingIndex1700713994428.up (/usr/src/app/dist/infra/migrations/1700713994428-AddCLIPEmbeddingIndex.js:9:9)
    at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
    at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
    at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
[Nest] 7  - 12/18/2023, 1:39:52 PM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (4)...
QueryFailedError: called `Result::unwrap()` on an `Err` value: Os { code: 38, kind: Unsupported, message: "Function not implemented" }
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AddCLIPEmbeddingIndex1700713994428.up (/usr/src/app/dist/infra/migrations/1700713994428-AddCLIPEmbeddingIndex.js:9:9)
    at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
    at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
    at async DataSource.initialize (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:148:17)
...

The database immich

root@1a131f7a619b:/# su - postgres
postgres@1a131f7a619b:~$ psql -d immich
psql (14.10 (Debian 14.10-1.pgdg120+1))
Type "help" for help.

immich=# \dt
              List of relations
 Schema |       Name       | Type  |  Owner   
--------+------------------+-------+----------
 public | migrations       | table | postgres
 public | typeorm_metadata | table | postgres
(2 rows)

immich=#

If you need more information, just ask.

VG Bernd

mertalev commented 10 months ago

Sorry, Synology doesn't seem to be supported by the pgvecto.rs extension. My only suggestion is to make an issue there to add support for DSM. But whether they accept it is up to them.

paijjang commented 10 months ago

i search about this error.. and, i found it from tensorchord/pgvecto.rs he said that because mininal Linux version..(over 3.17. but Synology is 3.10) so, he'll work that extension to work on 3.10 later... then...i'm waiting about that...after lunch fix version, i'll test that https://github.com/tensorchord/pgvecto.rs/issues/202

VoVAllen commented 10 months ago

We plan to release a new version this week and fix this issue. However user may need to manually delete previous indexes and reindex them.

Sinisan1972 commented 10 months ago

Hello. Some news about that ? Thank you.

VoVAllen commented 10 months ago

@Sinisan1972 Hi, the functions are working as expected. However, we have noticed that the vbase performance is not meeting our expectations under tight conditions with a selectivity of 0.01. We are currently investigating whether this issue is due to an algorithm problem or our implementation problem.

The https://github.com/tensorchord/pgvecto.rs/releases/tag/v0.1.14-alpha already fixed this issue. So you can try it if needed. However, the user must manually delete the indexes at this time following https://github.com/tensorchord/pgvecto.rs/blob/main/docs/upgrade.md.

We are also preparing stable version 0.2.0, which will be released in January. Please stay tuned!

DavidFederX commented 9 months ago

Hello, Has anyone succeeded? I've tried with : immich-db: image: tensorchord/pgvecto-rs:pg15-v0.1.14-beta

logs : Immich-DB: ` 2024-01-17 16:14:25.369 CET [66] ERROR: duplicate key value violates unique constraint "pg_extension_name_index"

2024-01-17 16:14:25.369 CET [66] DETAIL: Key (extname)=(vectors) already exists.

2024-01-17 16:14:25.369 CET [66] STATEMENT: CREATE EXTENSION IF NOT EXISTS vectors `

Immich-MICROSERVICES: `Error:

    The pgvecto.rs extension version is 0.1.14 instead of 0.1.11.

    Please run 'DROP EXTENSION IF EXISTS vectors' and switch to 0.1.11, such as with the docker image 'tensorchord/pgvecto-rs:pg15-v0.1.11'.

at DatabaseService.assertVectors (/usr/src/app/dist/domain/database/database.service.js:47:19)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

at async DatabaseService.init (/usr/src/app/dist/domain/database/database.service.js:32:9)

at async AppService.init (/usr/src/app/dist/microservices/app.service.js:32:9)

at async MicroservicesModule.onModuleInit (/usr/src/app/dist/microservices/microservices.module.js:22:9)

at async callModuleInitHook (/usr/src/app/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9)

at async NestApplication.callInitHook (/usr/src/app/node_modules/@nestjs/core/nest-application-context.js:223:13)

at async NestApplication.init (/usr/src/app/node_modules/@nestjs/core/nest-application.js:100:9)

at async NestApplication.listen (/usr/src/app/node_modules/@nestjs/core/nest-application.js:169:33)

at async bootstrap (/usr/src/app/dist/microservices/main.js:15:5)

Node.js v20.10.0

/usr/src/app/dist/domain/database/database.service.js:47

        throw new Error(`

              ^`

Immich-SERVER: `Node.js v20.10.0

/usr/src/app/dist/domain/database/database.service.js:47

        throw new Error(`

              ^

Error:

    The pgvecto.rs extension version is 0.1.14 instead of 0.1.11.

    Please run 'DROP EXTENSION IF EXISTS vectors' and switch to 0.1.11, such as with the docker image 'tensorchord/pgvecto-rs:pg15-v0.1.11'.

at DatabaseService.assertVectors (/usr/src/app/dist/domain/database/database.service.js:47:19)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

at async DatabaseService.init (/usr/src/app/dist/domain/database/database.service.js:32:9)

at async AppService.init (/usr/src/app/dist/immich/app.service.js:56:9)

at async AppModule.onModuleInit (/usr/src/app/dist/immich/app.module.js:32:9)

at async callModuleInitHook (/usr/src/app/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9)

at async NestApplication.callInitHook (/usr/src/app/node_modules/@nestjs/core/nest-application-context.js:223:13)

at async NestApplication.init (/usr/src/app/node_modules/@nestjs/core/nest-application.js:100:9)

at async NestApplication.listen (/usr/src/app/node_modules/@nestjs/core/nest-application.js:169:33)

at async bootstrap (/usr/src/app/dist/immich/main.js:34:20)`

Do you have an idea on how to get it working?

DavidFederX commented 9 months ago

Really mich immich ;)

alextran1502 commented 9 months ago

@DavidFederX you should use 0.1.11 instead of 0.1.14

DavidFederX commented 9 months ago

Thanks @alextran1502 I've changed to 0.1.11 but still get this in the logs: `Error:

    The pgvecto.rs extension version is 0.1.14 instead of 0.1.11.

    Please run 'DROP EXTENSION IF EXISTS vectors' and switch to 0.1.11, such as with the docker image 'tensorchord/pgvecto-rs:pg15-v0.1.11'.`

I don't know how to proceed to drop existing extension and replace with the older version :/ Could you help with that?

alextran1502 commented 9 months ago

@DavidFederX Did you pull the new images with docker compose pull?

dwr-studio commented 9 months ago

Hi, I'm having the same problem on Synology DSM 6.2-23739 using the tensorchord/pgvecto-rs:pg14-v0.1.11. After upgrading to the tensorchord/pgvecto-rs:pg14-v0.1.14-beta and enabling the extension with:

DROP EXTENSION IF EXISTS vectors;
CREATE EXTENSION vectors;

I see this error:

ERROR:  could not find function "vector_typmod_in_wrapper" in file "/usr/lib/postgresql/14/lib/vectors.so"
STATEMENT:  
            ALTER TABLE asset_faces 
            ALTER COLUMN embedding SET NOT NULL,
            ALTER COLUMN embedding TYPE vector(512)

This is the log from immich_microservices container:

Node.js v20.10.0
/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211
            throw new QueryFailedError_1.QueryFailedError(query, parameters, err);
                  ^
QueryFailedError: could not find function "vector_typmod_in_wrapper" in file "/usr/lib/postgresql/14/lib/vectors.so"
    at PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:211:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async UsePgVectors1700713871511.up (/usr/src/app/dist/infra/migrations/1700713871511-UsePgVectors.js:19:9)
    at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
    at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
    at async DatabaseRepository.runMigrations (/usr/src/app/dist/infra/repositories/database.repository.js:42:9)
    at async DatabaseService.init (/usr/src/app/dist/domain/database/database.service.js:33:9)
    at async AppService.init (/usr/src/app/dist/microservices/app.service.js:32:9)
    at async MicroservicesModule.onModuleInit (/usr/src/app/dist/microservices/microservices.module.js:22:9)
    at async callModuleInitHook (/usr/src/app/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:9) {
  query: '\n' +
    '        ALTER TABLE asset_faces \n' +
    '        ALTER COLUMN embedding SET NOT NULL,\n' +
    '        ALTER COLUMN embedding TYPE vector(512)',
  parameters: undefined,
  driverError: error: could not find function "vector_typmod_in_wrapper" in file "/usr/lib/postgresql/14/lib/vectors.so"
      at /usr/src/app/node_modules/pg/lib/client.js:526:17
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async PostgresQueryRunner.query (/usr/src/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:178:25)
      at async UsePgVectors1700713871511.up (/usr/src/app/dist/infra/migrations/1700713871511-UsePgVectors.js:19:9)
      at async MigrationExecutor.executePendingMigrations (/usr/src/app/node_modules/typeorm/migration/MigrationExecutor.js:225:17)
      at async DataSource.runMigrations (/usr/src/app/node_modules/typeorm/data-source/DataSource.js:260:35)
      at async DatabaseRepository.runMigrations (/usr/src/app/dist/infra/repositories/database.repository.js:42:9)
      at async DatabaseService.init (/usr/src/app/dist/domain/database/database.service.js:33:9)
      at async AppService.init (/usr/src/app/dist/microservices/app.service.js:32:9)
      at async MicroservicesModule.onModuleInit (/usr/src/app/dist/microservices/microservices.module.js:22:9) {
    length: 164,
    severity: 'ERROR',
    code: '42883',
    detail: undefined,
    hint: undefined,
    position: undefined,
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'dfmgr.c',
    line: '129',
    routine: 'load_external_function'
  },
  length: 164,
  severity: 'ERROR',
  code: '42883',
  detail: undefined,
  hint: undefined,
  position: undefined,
  internalPosition: undefined,
  internalQuery: undefined,
  where: undefined,
  schema: undefined,
  table: undefined,
  column: undefined,
  dataType: undefined,
  constraint: undefined,
  file: 'dfmgr.c',
  line: '129',
  routine: 'load_external_function'
}
VoVAllen commented 9 months ago

Can you follow this process? https://github.com/immich-app/immich/issues/6089#issuecomment-1881981804

Try drop the extension with CASCADE option and reinstall it? pgvecto.rs will provide a upgrade SQL script in 0.2

dwr-studio commented 9 months ago

Can you follow this process? #6089 (comment)

Try drop the extension with CASCADE option and reinstall it? pgvecto.rs will provide a upgrade SQL script in 0.2

I already tried to drop the extension with the CASCADE option, but the error remains. We'll wait for the upgrade then.

davidrudlstorfer commented 9 months ago

Same error here on Synology DSM 7.2 (Linux Kernel 3.10.108) when running Immich with docker-compose.yml

DavidTIBO commented 9 months ago

If I'm not mistaken, this issue should be fixed, right? How can I update my Immich docker-compose to integrate this fix?

Thanks!

patzobil commented 9 months ago

if you try to create a new instance, does it work on your Synology?

It does not... Recreating the same issue here, can I adjust the images to roll back to v1.87.0 until this is resolved?

Thanks

mertalev commented 9 months ago

If I'm not mistaken, this issue should be fixed, right? How can I update my Immich docker-compose to integrate this fix?

Thanks!

It is fixed on main and will be in the next release.