#Missing the pgdata volume ? (OLD • broken bc of CREATE EXTENSION vectors; )

1 messages · Page 1 of 1 (latest)

royal wave
#

Hi,

I jumped from 1.90 to the last version, and I think I broke something since immich server won't start.

After further searches, I didn't do the CREATE EXTENSION vectors; operation

But where do I execute it ?

Thanks in advance

storm talonBOT
#

:wave: Hey @royal wave,

Thanks for reaching out to us. Please follow the recommended actions below; this will help us be more effective in our support effort and leave more time for building Immich immich.

References

Checklist

  1. :blue_square: I have verified I'm on the latest release(note that mobile app releases may take some time).
  2. :blue_square: I have read applicable release notes.
  3. :blue_square: I have reviewed the FAQs for known issues.
  4. :blue_square: I have reviewed Github for known issues.
  5. :blue_square: I have tried accessing Immich via local ip (without a custom reverse proxy).
  6. :blue_square: I have uploaded the relevant logs, docker compose, and .env files using the buttons below or the /upload command.
  7. :blue_square: I have tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable

(an item can be marked as "complete" by reacting with the appropriate number)

If this ticket can be closed you can use the /close command, and re-open it later if needed.

tepid idol
#

Did you read the change logs and adapted your compose file accordingly?

royal wave
#

yeah the compose has been changed

#

I can send it if needed

tepid idol
#

Yes pls

royal wave
#

lessgo

#
version: "3.8"

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
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  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
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

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

  redis:
    container_name: immich_redis
    image: tensorchord/pgvecto-rs:pg14-v0.1.11
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .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:```
tepid idol
#

Yeah that's not the correct database image

#

Can you look at the change logs again? I believe it's 1.91 but not 100%

royal wave
tepid idol
#

Haha

royal wave
#

i'm gonna try with the 1.93.3 compose so

tepid idol
#

Instead of the postgres image, use the tensorchord image

#

As you can see in the change logs

royal wave
#

???? I did it I'm sure of it wtf

halcyon topaz
#

you put it on the wrong container

royal wave
#

maybe I didn't save the changes

tepid idol
#

Good point!

halcyon topaz
#

you swapped the redis container with the tensorchord one instead of the postgresql container

royal wave
#

oh fuck

#

yeeeah

#

that's it

#

exact

#

thanks

tepid idol
#

Yep, thanks @halcyon topaz !

royal wave
#

I'm gonna wipe the compose and just wget the new one ig

tepid idol
#

Sure that should also work if you haven't changed anything

royal wave
#

it should'nt break anything

#

yeah nope I didn't

#

wtf is this error

#
ERROR: The Compose file './docker-compose.yml' is invalid because:
'name' does not match any of the regexes: '^x-'

You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/```
#

is there an error with the last docker compose ?

halcyon topaz
#

this is with a new compose file?

royal wave
#

i just curled the last one

#

from the release page

tepid idol
#

What's your docker version?

royal wave
#

Docker version 20.10.5+dfsg1, build 55c4c88

#

docker-compose version 1.29.2, build 5becea4c

tepid idol
#

I'm not at my computer right now so I can't check but I believe the current docker version is like 24.x?

halcyon topaz
#

I'm on 24.0.6

tepid idol
#

Are you using docker-compose or the compose plugin, so docker compose or docker-compose?

royal wave
#

docker-compose

tepid idol
#

Ah so that's the issue

royal wave
#

but it has never been a problem

tepid idol
#

docker-compose is deprecated since it is now a plugin in the main docker thing

royal wave
#

oooh ok

tepid idol
#

I.e. the name property is rather new I believe

royal wave
#

okay okay

tepid idol
#

So look into updating docker and installing the compose plugin, then everything should be fine :)

royal wave
#

it's good

#

I set the sources up then installed the compose plugin

#

nooo

#

I have password errors

#

like if it was a brand new install

#

it doesn't smell good

#

my 100Gb photos folder 🥲

#
error: password authentication failed for user "postgres"
    at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/usr/src/app/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/usr/src/app/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
[Nest] 7  - 01/25/2024, 10:19:35 PM   ERROR [ExceptionHandler] password authentication failed for user "postgres"```
tepid idol
#

Can you post the compose file again?

#

And your env file

royal wave
#

env I have my passwords etc but the thing is I didn't changed it since 1.90

#

so i think something is in there

tepid idol
#

This is just showing as a file on my phone :(

#

Can you only send the database part?

royal wave
#
container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11@sha256:0335a1a22f8c5dd1b697f14f079934f5152eaaa216c09b61e293be285491f8ee
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always```
tepid idol
#

Hm yeah that's weird

#

Can you send more logs?

#

You did restart everything?

royal wave
#

here is the env

#

yes ofc

#

yep

#
[Nest] 7  - 01/25/2024, 10:27:35 PM   ERROR [ExceptionHandler] password authentication failed for user "postgres"
error: password authentication failed for user "postgres"
    at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/usr/src/app/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/usr/src/app/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)```
tepid idol
#

Is that the server? Or micro services? Both?

#

just to make sure... the .env and compose files are in the same directory, right?

royal wave
#

microservice, sry

#

the server doesn't say anything

#

and yes .env is in the same directory

tepid idol
royal wave
tepid idol
#

does it connect?

royal wave
#

okay no, now I have logs (I didn't a few seconds ago) so server logs :

#
error: password authentication failed for user "postgres"
    at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/dist/parser.js:287:98)
    at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/dist/parser.js:126:29)
    at Parser.parse (/usr/src/app/node_modules/pg-protocol/dist/parser.js:39:38)
    at Socket.<anonymous> (/usr/src/app/node_modules/pg-protocol/dist/index.js:11:42)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
[Nest] 7  - 01/25/2024, 10:30:10 PM   ERROR [ExceptionHandler] password authentication failed for user "postgres"```
tepid idol
#

can you try docker exec -it immich_postgres psql immich postgres?

#

I gotta go off now, sorry. Maybe someone else finds the time to help though

royal wave
#

thanks anyway thumb

tepid idol
#

Sorry, if you don't get any help we can pick it up tomorrow! :)

#

Apologies

royal wave
#

👍

#

nah np

#

thx for your time

tepid idol
royal wave
#

no, there is no prompt

tepid idol
#

then the db somehow started with the default password

#

and immich tries to use the password you set

#

thus the password is wrong

#

that the db is using a different password makes me worried though...

royal wave
#

about... like if it was a brand new install ?

tepid idol
#

exactly

royal wave
tepid idol
#

like your images are still there, that's not the issue

#

but it could be that the database is gone

royal wave
#

yeah but let's import everything exit

#

yep

royal wave
tepid idol
#

let's look tomorrow if that is in fact the case :)

tepid idol
royal wave
#

yep ok

#

okok

#

(i think it's because docker-compose change)

#

some things are weird like my stack doesn't appear in portainer

#

so it's probably broken somewhere

#

HOOOOO

#

I think I know where it's comming from

#

here you can see 2 volumes : docker_pgdata and immich_pgdata

#

when I started my immich I placed it in a folder named docker

#

and so it has been named 'docker' for a bunch of time

#

but with the new docker compose, it's "immich"

#

so the problem must come from here

#

uh

#

changed the name to docker

#

so the old thing has been mounted

#

but doesn't work neither

#

okay I dunno we'll see tomorrow ig

#

Missing the pgdata volume ? (OLD • broken bc of CREATE EXTENSION vectors; )

tepid idol
#

And then you restarted everything and it still showed the exact same error?

royal wave
#

Yep, connection error

royal wave
#

I just restarted my stack, not the entire server

tepid idol
#

yeah sure, that should be fine

royal wave
#

So nope, didn't worked

tepid idol
royal wave
tepid idol
#

Where you're running immich

#

Just like you ran it before

royal wave
#

okay

#

arf just by docker compose up i got this :

Attaching to immich_machine_learning, immich_microservices, immich_postgres, immich_redis, immich_server
immich_postgres          | 
immich_postgres          | PostgreSQL Database directory appears to contain a database; Skipping initialization
immich_postgres          | 
immich_postgres          | 2024-01-30 07:49:06.155 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
immich_postgres          | 2024-01-30 07:49:06.155 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
immich_postgres          | 2024-01-30 07:49:06.155 UTC [1] LOG:  listening on IPv6 address "::", port 5432
immich_postgres          | 2024-01-30 07:49:06.157 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
immich_postgres          | 2024-01-30 07:49:06.160 UTC [27] LOG:  database system was shut down at 2024-01-30 07:48:56 UTC
immich_postgres          | 2024-01-30 07:49:06.167 UTC [1] LOG:  database system is ready to accept connections
immich_redis             | 1:C 30 Jan 2024 07:49:06.367 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
immich_redis             | 1:C 30 Jan 2024 07:49:06.367 # Redis version=6.2.14, bits=64, commit=00000000, modified=0, pid=1, just started
immich_redis             | 1:C 30 Jan 2024 07:49:06.367 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
immich_redis             | 1:M 30 Jan 2024 07:49:06.367 * monotonic clock: POSIX clock_gettime
immich_redis             | 1:M 30 Jan 2024 07:49:06.368 * Running mode=standalone, port=6379.
immich_redis             | 1:M 30 Jan 2024 07:49:06.368 # Server initialized
immich_redis             | 1:M 30 Jan 2024 07:49:06.368 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
immich_redis             | 1:M 30 Jan 2024 07:49:06.369 * Ready to accept connections
immich_machine_learning  | [01/30/24 07:49:07] INFO     Starting gunicorn 21.2.0                           
immich_machine_learning  | [01/30/24 07:49:07] INFO     Listening at: http://0.0.0.0:3003 (9)              
immich_machine_learning  | [01/30/24 07:49:07] INFO     Using worker: app.config.CustomUvicornWorker       
immich_machine_learning  | [01/30/24 07:49:07] INFO     Booting worker with pid: 21                        
immich_postgres          | 2024-01-30 07:49:07.940 UTC [37] FATAL:  password authentication failed for user "postgres"
immich_postgres          | 2024-01-30 07:49:07.940 UTC [37] DETAIL:  Connection matched pg_hba.conf line 100: "host all all all scram-sha-256"```
royal wave
tepid idol
#

Why do you want to disable logs?

royal wave
tepid idol
#

To send it to the background you simply add a -d to the command

#

So docker compose up -d or whatever

royal wave
#

Uh okay yes

royal wave
#

and the same auth error

#

like that

silver meteor
#

did you change the password in the .env after bringing up the database?

#

you cannot just change the password in the .env file, you will have to first change it in the database context first

royal wave
#

I just tried to update

#

so downloaded the new docker-compose, and then the "new" docker compose module (since I was using docker-compose up -d instead of docker compose up -d )

#

when I did that, the name of my stuff changed from "docker" to "immich"
I changed the name back to match my old containers
aaaand from that, it doesn't work anymore

silver meteor
#

ah, remove the name: immich directive from the docker-compose file should fix it

royal wave
#

but

#

lemme try anyway

#

password authentification failed anyway

silver meteor
#

can you perform docker volume ls?

royal wave
silver meteor
#

so docker_pgdata is your old database

royal wave
#

in the beginning, my compose (portainer stack) was named docker

#

yes

#

exactly

#

ig so

silver meteor
#

okay, did you change the password in the .env file by chance?

royal wave
#

nope

#

first characters match what I have in my bitwarden so...

silver meteor
#

Ah you probably forgot to change the .env to stack.env in your docker-compose file so what Portainer can use the value in the .env file

royal wave
#

uuuh

#

i'll look

silver meteor
royal wave
#

I installed immich with docker-compose actually

#

not portainer stack

#

but I manage it with portainer (like seeing logs etc)

silver meteor
#

I see

royal wave
#

but the env file configured in docker-compose.yml is .env

#

and my env file is .env

silver meteor
#

what do you mean?

#

can you show the content of your directory?

royal wave
#

env file is .env
and my env file in the directory is .env

#

of course

silver meteor
#

yeah this looks good

royal wave
#

yep

silver meteor
#

not sure why it happen though, hmm

#

try this

#

docker compose down then docker container prune and finally docker compose up

royal wave
#

okay

#

i put back "name: docker" in compose ?

silver meteor
#

You can, with out the name directive, it will use the folder's name where the docker-compose file is in

royal wave
#

okay so i don't touch bonhomme

#

it deleted only 1 container, an unnamed one

#

is it ok anyway ?

silver meteor
#

yeah that should be fine, container is stateless, all the data is stored in the persistent volume

royal wave
#

okay

silver meteor
#

Bring down the container again, then perform docker compose pull

royal wave
#

okay

#

docker compose up ?

silver meteor
#

yep

royal wave
#

someone is against me

silver meteor
#

hmm strange

#

now can you go inside the postgres container

#

and do psql immich -U postgres

royal wave
#

how can i do that ? docker attach ?

silver meteor
#

docker exec -it immich_postgres bash

royal wave
silver meteor
#

now do psql immich -U postgres

#

ah you are in

#

now try this query

#

select u.name from users u;

royal wave
#

select u.name from users u; where u is my username or i don't touch anything ?

silver meteor
#

don't touch anything

royal wave
#

okay nope it works

silver meteor
#

just try that query

#

can you show the output

royal wave
#

I have my two users

#

yep

silver meteor
#

ok

#

that is good

#

so

#

you were able to login without using any password, so in your .env file try to put back the password as DB_PASSWORD=postgres

#

then bring down/up the stack again

royal wave
#

DB_PASSWORD=My actual password => DB_PASSWORD=postgres ?

silver meteor
#

Yup

#

try that

royal wave
#

k

silver meteor
#

intersting, ok now go back to the postgres container

#

let's change the password in there

#

ALTER USER postgres WITH PASSWORD 'new-password';

#

then add the new password to the .env file

royal wave
#

ok

#

done

#

OOOOOOOHHHHHHHHH

#

IIIITTTTT WOOOOOORKSSSSSS

#

i guess

#

aaaa

#

Thanks Alex, it worked (I'm going to put my true password back and pray)

#

wtf

#

...

#

@silver meteor I guess my password is the problem actually, using the same old password, it doesn't work anymore

#

maybe some characters in it are prohibited ?

#

or should I use " in the start and in the end ?

#

doesn't work with it

#

uh

silver meteor
royal wave
#

I tried, and it didn't worked

silver meteor
#

how about single quote?

royal wave
#

but i'm going to retry without the $ sign

#

like what ?

#

ooookay

#

it worked

silver meteor
#

wrapper your password in the single quote so DB_PASSWORD='your-password'

royal wave
#

never ever a $ in the password

royal wave
#

there is a ghost in my install

silver meteor
#

enable websocket on your proxy please

royal wave
#

i can't believe it

#

oh

royal wave
silver meteor
#

your NGINX proxy

royal wave
#

okep

royal wave
silver meteor
#

No problem!