#Cant reach my server (Immich_Postrgres constantly restarting)

1 messages · Page 1 of 1 (latest)

pallid thorn
#

I have just upgraded my docker to 4.36.0 and my Immich to v1.121.0 by using docker compose pull && docker compose up -d and when I got to try access my immich server through the browser it says localhost didn’t send any data. When I looked into my containers I saw that immich_postgres is constantly restarting does anyone know why this is or could help out? Would be very much appreciated.

queen patioBOT
#

:wave: Hey @pallid thorn,

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

References

#

Checklist

I have...

  1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
  2. :ballot_box_with_check: read applicable release notes.
  3. :ballot_box_with_check: reviewed the FAQs for known issues.
  4. :ballot_box_with_check: reviewed Github for known issues.
  5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
  6. :blue_square: uploaded the relevant information (see below).
  7. :blue_square: 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)

Information

In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:

  • Your docker-compose.yml and .env files.
  • Logs from all the containers and their status (see above).
  • All the troubleshooting steps you've tried so far.
  • Any recent changes you've made to Immich or your system.
  • Details about your system (both software/OS and hardware).
  • Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
  • The version of the Immich server, mobile app, and other relevant pieces.
  • Any other information that you think might be relevant.

Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)

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

pallid thorn
#

Sorry I had asked this question I was told to put quotes around something I cant remember what else I hadnt had time to try it and reply and it got closed

unborn oak
#

What is the file system postgres is stored on?

meager agate
#
  • other details about your system please
queen patioBOT
#

We need more info on your system, please execute the following command (paste it into your terminal), and share the output of it afterwards:

( lsb_release -d && echo -n 'Kernel Version: ' && cat /proc/version && docker -v && docker compose version && echo -n 'Docker-Compose!! (deprecated): ' && docker-compose version && echo -n 'CPU ' && lscpu | grep 'Model name' | tr -s ' ' && lscpu | grep 'Architecture' | tr -s ' ' && cat /proc/meminfo | grep MemTotal | tr -s ' ' && hostnamectl )

versed depot
#

@pallid thorn and provide the info schuhbacca asked for (what file system is the postgres db stored on and is it local or remote storage). also provide logs

queen patioBOT
pallid thorn
#

Here are the docker compose logs

pallid thorn
pallid thorn
pallid thorn
versed depot
#

uh oh, just noticed you are running docker desktop on windows...
so postgres is running on an NTFS file system I assume, this usually causes problems.
I recommend to install docker engine on a linux system, not on windows to avoid unnecessary incompatibilities and issues

pallid thorn
#

Is this really the issue it was running fine for months?

graceful blaze
#

Hmm, can you try docker compose down then “docker compose up”?

pallid thorn
#

I had tried docker compose down then docker compose up -d whats the difference? is it just that I see the logs in my terminal?

graceful blaze
#

Yes

pallid thorn
#

Yeah Postgres is just still restarting did you want me to send the logs for that?

graceful blaze
#

Yes please

pallid thorn
graceful blaze
#

Your docker-compose file is out of date

#

can you put quote around that line in the volumes section

#

and for the port, change to 2283:2283?

pallid thorn
#

Will do thanks for the help Ill let you know if it works

pallid thorn
#

Unless I put the quotes in wrong or something

graceful blaze
#

No you got it right

#

somethings seem to be wrong with the database

#

Do you have the backups folder at the UPLOAD_LOCATION?

pallid thorn
#

is the upload location just the - "D:/Documents/Photos & Videos:/usr/src/app/photos"

graceful blaze
#

here is the path to your UPLOAD_LOCATION

#

UPLOAD_LOCATION=D:\Immich\Backup-assets

#

Can you navigate there D:\Immich\Backup-assets and see if there are any folder called backups?

pallid thorn
#

Yeah in the backup-assets folder there is a folder called backups D:\Immich\Backup-assets\backups

#

the only thing in it is a .immich file

graceful blaze
#

ah so you must have update from a version that didn't have that backup feature yet

graceful blaze
pallid thorn
#

Done will I need to go in and edit it so that it still knows where my photos and stuff are or is it fine just to run it and see if it works?

graceful blaze
#

you should just change the docker-compose file to the default one

#

not the .env file

#

Ah

#

hmm

pallid thorn
#

Yeah so I copy and pasted the txt you sent me to replace my docker-compose.yml file but in my original one I had the - "D:/Documents/Photos & Videos:/usr/src/app/photos" so was just unsure if that will mess anything up

#

I copied the original file to my desktop first incase

graceful blaze
#

Can you check your .env file and make sure there is no space here

#

You already have DB_DATA_LOCATION above so you can remove the line below

pallid thorn
#

There was space behind all of them so what part am I removing?

#

I removed the spaces

graceful blaze
#

Remove the space please

#

then run docker compose down and docker compose up again

#

can you post the content of your .env again. after editing them?

pallid thorn
#

yup

graceful blaze
#

You can remove these two lines as well

#

Then run docker compose down and docker compose up

pallid thorn
#

Still looks to be having an issue

graceful blaze
#

So it is likely that the database has corrupted so it cannot start up

#

let's try starting with a new database by changing this line to DB_DATA_LOCATION=./postgres-test

pallid thorn
#

as in paste that where I removed it before?

#

oh oops

#

nah I know what you mean

#

I assume once I have done that I just re do docker down then docker up

graceful blaze
#

Yes

pallid thorn
#

This means Ill need to reupload everything and re name every face and all of that again right? it looks like I can access the server now

graceful blaze
#

Alright, so it means the previous database has corrupted somehow

#

Do you have any Linux system that you can run Immich on?

#

running Immich on Windows can be unreliable due to Docker on Windows is not the greatest

pallid thorn
#

I dont have any computer running linux can I run it within the same computer or is that also unstable

graceful blaze
#

I assume this is your main workstation?

pallid thorn
#

Yeah

graceful blaze
#

the location of the drive where you have your docker-compose.yml stored at, is it a local hard drive or network hard drive?

pallid thorn
#

Its my local disk

#

I have immich and docker and everything installed on my main ssd that has windows and everything on it and then I have my location that my photos and videos are kept on my seperate m.2 storage because it is larger

graceful blaze
#

okay, that is good

#

hmm maybe it is better to run docker in the wsl context

#

fwiw, starting the last two release, we now have automatic database dump to save you in situation like this

#

but sorry man, looks like you will have to start over

pallid thorn
#

That is so completely fine

#

so now if this were to happen its saved somewhere?

#

what happens then I make a new database then what?

graceful blaze
#

then you run the restore command

queen patioBOT
pallid thorn
#

Gotcha so if same thing ends up happening I can just do that and I should be all good again

graceful blaze
#

Correct

#

please look into running Immich in at least wsl context

#

all your files should still in the library folder

pallid thorn
pallid thorn
#

It is still however giving me this?

#

2024-12-02 11:27:37 [Nest] 19 - 12/02/2024, 12:27:37 AM LOG [Api:EventRepository] Websocket Connect: ZrgzunOoWjT1gfokAAAB
2024-12-02 11:24:21 [Nest] 7 - 12/02/2024, 12:24:21 AM ERROR [Microservices:TypeOrmModule] Unable to connect to the database. Retrying (1)...
2024-12-02 11:24:21 Error: connect ECONNREFUSED 172.18.0.4:5432
2024-12-02 11:24:21 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1610:16)
2024-12-02 11:24:21 [Nest] 7 - 12/02/2024, 12:24:21 AM ERROR [Microservices:TypeOrmModule] Unable to connect to the database. Retrying (2)...
2024-12-02 11:24:21 Error: connect ECONNREFUSED 172.18.0.4:5432
2024-12-02 11:24:21 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1610:16)
2024-12-02 11:24:21 [Nest] 7 - 12/02/2024, 12:24:21 AM ERROR [Microservices:TypeOrmModule] Unable to connect to the database. Retrying (3)...
2024-12-02 11:24:21 Error: connect ECONNREFUSED 172.18.0.4:5432

#

But regardless immich still seems to be working

#

maybe ill just fresh install on wsl

solar gulch
#

Option 1: restore old DB
Run the DB-restore from the website and re-use your old upload folder
Option 2: full fresh install
Just install a fresh immich instance and use immich-cli or immich-go on your OLD UPLOAD_LOCATION/library folder, which will re-import the files there