I
Immich3mo ago
Adman234

Unraid- cache drive filled up, now immich won't start

I'm using postgreSQL_immich and redis with immich through unraid, and my cache drive filled up and immich stopped working. I reinstalled all those containers, but still having issues. Here is my error
Error: connect ECONNREFUSED 192.168.50.184:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.50.184',
port: 6379
}
Error: connect ECONNREFUSED 192.168.50.184:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.50.184',
port: 6379
}
[Nest] 366 - 02/13/2025, 9:45:07 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
Error: connect ECONNREFUSED 192.168.50.184:5433
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)
Error: connect ECONNREFUSED 192.168.50.184:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.50.184',
port: 6379
}
Error: connect ECONNREFUSED 192.168.50.184:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '192.168.50.184',
port: 6379
}
[Nest] 366 - 02/13/2025, 9:45:07 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
Error: connect ECONNREFUSED 192.168.50.184:5433
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)
18 Replies
Immich
Immich3mo ago
:wave: Hey @Adman234, 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 - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy - Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA 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.
Mraedis
Mraedis3mo ago
You have reinstalled the containers but kept the database, thus it is still corrupt
Adman234
Adman234OP3mo ago
So the database is corrupt? What steps can I take to resolve this without data loss?
Mraedis
Mraedis3mo ago
There should be database dumps you can use for a restore over at UPLOAD_LOCATION/backup
Adman234
Adman234OP3mo ago
Ok, I'm reading that over now, thanks. I'll need to uncomment the rm -rf line, correct? Sorry, I'm really unclear on this whole restore process. I'm not a linux/command line person so I'm trying to figure it out- I need to double check all the path locations and container names because they're different. I just really don't wanna screw something up and lose my database.
Mraedis
Mraedis3mo ago
The database is over at the backups/dumps, so verify those exist first If you don't want to rm -rf it you could just move it to a different name, like postgres.old
Adman234
Adman234OP3mo ago
I don't see any /dumps folder
No description
Adman234
Adman234OP3mo ago
Also, previously I tried deleting the PostgreSQL_Immich folder in appdata and reinstalling, and that did not resolve the issue. If I reinstall immich as well, can I restore it from a backup? Is there a way to restore database from backup in GUI? I'm just in way over my head here, sorry
Mraedis
Mraedis3mo ago
Those are the dumps And no, restore cannot be done from the GUI right now They are dated by UNIX timestamp, so the one with the highest number at the back is the most recent one You can restore from the backup with the database + the UPLOAD_LOCATION folder (specifically library and upload within that folder, but having everything is just faster to restore) So even if you start fresh, if you have those two you're good UPLOAD_LOCATION = files DB_DATA_LOCATION = metadata, how are files ordered, whose files are they etc
Adman234
Adman234OP3mo ago
Ok, so I'm able to get into immich now and all my settings are there, but I don't see any photos. So it seems the database didn't restore correctly? I ran the following:
gunzip < /mnt/user/data/photos/backups/immich-db-backup-1739347200004.sql.gz \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i PostgreSQL_Immich psql --dbname=immich --username=postgres # Restore Backup
docker compose up -d # Start remainder of Immich apps
gunzip < /mnt/user/data/photos/backups/immich-db-backup-1739347200004.sql.gz \
| sed "s/SELECT pg_catalog.set_config('search_path', '', false);/SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);/g" \
| docker exec -i PostgreSQL_Immich psql --dbname=immich --username=postgres # Restore Backup
docker compose up -d # Start remainder of Immich apps
And there were a bunch of errors.
ERROR: cannot drop the currently open database
ERROR: current user cannot be dropped
ERROR: role "postgres" already exists
ALTER ROLE
ERROR: cannot drop the currently open database
ERROR: current user cannot be dropped
ERROR: role "postgres" already exists
ALTER ROLE
Plus about 500 errors after this about stuff already existing. Any idea what I'm missing?
Zeus
Zeus3mo ago
Those first 3 errors you posted are normal. You’ll have to share more info You probably started the immich server before the database restore
Adman234
Adman234OP3mo ago
Wall of text incoming
Adman234
Adman234OP3mo ago
Ok, I tried reinstalling immich again, and now my photos are showing up, but they all just say "error loading image"
Adman234
Adman234OP3mo ago
No description
Adman234
Adman234OP3mo ago
Could this be related to an immich update? I might have updated immich before I realized there was an issue here. I'm now trying to roll back immich to see if that resolves my issue, but having trouble. The current repo is
ghcr.io/imagegenius/immich:cuda
ghcr.io/imagegenius/immich:cuda
I'm trying to go to 1.126.0 but I can't figure out what to put for the repo.
bo0tzz
bo0tzz3mo ago
The files are not where Immich expects them to be
Adman234
Adman234OP3mo ago
The files are in the same location as before, and I don't think my settings for paths have changed at all. When I re-added the containers, all the paths were still filled out to the previous paths. Ok, I reinstalled everything again. I think previously I started immich before the restore as Zeus suggested. Almost no errors this time. It looks like everything is working now! Thanks guys for the assistance, and apologies for my lack of knowledge.
Immich
Immich3mo ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?