Jump to content

Immich ERROR [TypeOrmModule] Unable to connect to the database.


EvilNievel
Go to solution Solved by cz13,

Recommended Posts

Hallo zusammen,

 

habe mir gestern den Immich Container aus den Apps installiert und heute ein Update gemacht und seitdem habe ich ein Problem. Er hat Probleme mit der Verbindung zur Datenbank aber weiß mir leider nicht zu helfen. Habe den Container postgresql15 als Datenbank installiert.

[Nest] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (2)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (3)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (4)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (5)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (6)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (7)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (8)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)...
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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] 3102  - 12/17/2023, 9:50:17 AM   ERROR [ExceptionHandler] extension "vectors" is not available
QueryFailedError: extension "vectors" is not available
    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 UsePgVectors1700713871511.up (/app/immich/server/dist/infra/migrations/1700713871511-UsePgVectors.js:19: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)

 

Link to comment
12 minutes ago, EvilNievel said:

habe mir gestern den Immich Container aus den Apps installiert und heute ein Update gemacht und seitdem habe ich ein Problem. Er hat Probleme mit der Verbindung zur Datenbank aber weiß mir leider nicht zu helfen. Habe den Container postgresql15 als Datenbank installiert.

 

erster Ansatz, im entsprechenden support Thread anfragen ?

 

sofern es dieser Container ist ... ich bin so frei und hab den Link für dich rausgesucht ...

 

 

Link to comment

Kinda shitty but they changed from the standard postgres to a vector supported version and this breaks the application completely.

 

Edit your postgres container and change the Repository value to the value below.

 

Postgres versions and which repository to use;

 

Postgres 14

 

tensorchord/pgvecto-rs:pg14-v0.1.11

 

Postgres 15

 

tensorchord/pgvecto-rs:pg15-v0.1.11

 

Postgres 16

 

tensorchord/pgvecto-rs:pg16-v0.1.11

 

Edited by Duncan77
Single line misinterpreted by users.
  • Like 3
  • Thanks 2
  • Upvote 2
Link to comment
On 12/17/2023 at 1:09 PM, Duncan77 said:

Kinda shitty but they changed from the standard postgres to a vector supported version and this breaks the application completely.

 

Edit your postgres container and change the Repository value to the value below.

 

Postgres versions and repository to use

 

Postgres 14 tensorchord/pgvecto-rs:pg14-v0.1.11

Postgres 15 : tensorchord/pgvecto-rs:pg15-v0.1.11

Postgres 16 : tensorchord/pgvecto-rs:pg16-v0.1.11

Thanks ! This was the solution

  • Like 1
Link to comment
On 12/17/2023 at 4:09 AM, Duncan77 said:

Kinda shitty but they changed from the standard postgres to a vector supported version and this breaks the application completely.

 

Edit your postgres container and change the Repository value to the value below.

 

Postgres versions and repository to use

 

Postgres 14 tensorchord / pgvecto-rs: pg14-v0.1.11

Postgres 15: tensorchord / pgvecto-rs: pg15-v0.1.11

Postgres 16: tensorchord / pgvecto-rs: pg16-v0.1.11

mind if I post this in english over at that other thread? Hmmm this didn't work. I assumed the spaces were not supposed to be in there.

 

 

 

psql tensor thing Screenshot 2023-12-18 182136.png

Edited by rutherford
  • Like 1
Link to comment
  • 2 months later...

Hallo,

 

ich hänge mich hier mal dran, denn ich vermute bei mir ähnliches.

 

Habe eben ein Update des Immich Stacks gemacht (wie hier beschrieben), jetzt kann ich mich nicht mehrin Immich einloggen.

 

Für das Log, siehe Screenshot. Kann mir jemand sagen, was genau das bedeutet und wie ich es beheben kann? pgvecto.rs auf 0.2.0 bringen kann?

 

Danke im Voraus.

 

Screenshot 2024-02-28 094053.png

Link to comment
43 minutes ago, cz13 said:

Ich hab jetzt weder postgres noch immich im Einsatz, aber hier stehen doch Hinweise was zu tun ist: 

"please run 'ALTER EXTENSION UPDATE' vectors manually as a superuser. See https://immich.app/docs/guides/database-queries/"

 

Danke für den Hinweis, habe ich auch gelesen.

 

Leider kann ich das nicht so einfach umsetzen. Ich weiß nicht, wie und wo man diese queries durchführt. Leider kann nichts über die Postgres version sagen. Ich habe mich bei der Installation von Immich an deren Anleitung gehalten, ebenso beim Update des Stacks. Und jetzt kann ich nicht mehr darauf zugreifen und sehe diesen Fehler in den Logs.

 

Um hier tiefer einzutauchen fehlt mir schlicht das Wissen. Daher hoffe ich auf Hilfe hier.

 

Edit: Ich habe es mit dieser Anleitung geschafft, ImmIch wieder zum Laufen zu bringen. DAnke für die Denkanstöße.

 

https://github.com/immich-app/immich/discussions/7252

Edited by Tebald
  • Like 1
Link to comment

@Tebald Ich habe gerade auch mal dem Link folgend meine compose Datei angepasst. So startet jetzt Immich wieder, doch wenn ich unten Links auf den Hauptseite schaue sehe ich jetzt folgendes.

 

Capture.PNG.24b01f96d43d3af4a1e2381d8c7210db.PNG

 

Ist das bei die jetzt auch so, oder wird bei dir weiterhin der Server als online und die Versionsnummer angezeigt?

 

 

Hat sich erledigt. Wurde vom Proxy Server geblockt.

Edited by Archonw
Link to comment

Hi, 

ist zwar nicht ganz das Thema aber sollte trotzdem passen.

bei mir hat sich heute irgendwas aufgehangen und hat die Datenbank zum Absturz gebracht, nach der Wiederherstellung funktioniert alle soweit einwandfrei.

Nur Immich startet quasi wie nach einer Neu-Installation. Ich hatte mit postgres-backup-local regelmäßig update erstellt, kann diese aber nicht wieder einspielen.

Kann mir wer sagen wie ich die Dateien im Backupordner wie postgres-latest.sql.gz wieder einspielen kann mit postgres-backup-local.

Danke im voraus

Link to comment

Den ersten Link, kenne ich schon, hab da auch schon eine Diskussion am laufen, bisher auch ohne Erfolg

 

zur Not muss ich das eben noch mal neu aufsetzen, wobei ich ja auch kein Bock habe das jedes mal wieder neu zu machen

 

Den 2. schaue ich mir mal an

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...