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

1 messages · Page 1 of 1 (latest)

cyan flax
#

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

    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)```
supple smeltBOT
#

:wave: Hey @cyan flax,

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.

brazen trellis
#

You have reinstalled the containers but kept the database, thus it is still corrupt

cyan flax
#

So the database is corrupt? What steps can I take to resolve this without data loss?

brazen trellis
#

There should be database dumps you can use for a restore over at UPLOAD_LOCATION/backup

cyan flax
#

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.

brazen trellis
#

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

cyan flax
#

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

brazen trellis
#

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

cyan flax
#

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:

| 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```

Plus about 500 errors after this about stuff already existing.

Any idea what I'm missing?
dim owl
#

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

cyan flax
#

Ok, I tried reinstalling immich again, and now my photos are showing up, but they all just say "error loading image"

#

Could this be related to an immich update? I might have updated immich before I realized there was an issue here.

cyan flax
#

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

I'm trying to go to 1.126.0 but I can't figure out what to put for the repo.

tepid loom
# cyan flax

The files are not where Immich expects them to be

cyan flax
cyan flax
#

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.