.immich file and encoded-video access errors
I've been running 1.116.2 without any problems until suddenly my library disappeared like it was a new installed. I'm getting these errors:
[Nest] 7 - 12/29/2024, 6:02:04 AM LOG [Microservices:StorageService] Verifying system mount folder checks (enabled=true)
[Nest] 7 - 12/29/2024, 6:02:04 AM ERROR [Microservices:StorageService] Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'
[Nest] 7 - 12/29/2024, 6:02:04 AM ERROR [Microservices:StorageService] The "encoded-video" folder appears to be offline/missing, please make sure the volume is mounted with the correct permissions
I had rebooted my server and I know that my nas doesn't mount automatically so I'm thinking immich started up without drives mounted and maybe made a new .immich file in the mount location. My library is mapped from a nas drive and so is my upload directory. Then when I remounted it maybe that got overwritten with the mount files. But that is just my guess of what happened. Now I can't even start immich back up with compose up.
If I'm on the right track what can I do to make the server happy with the files on the nas again? Or did something else cause this?
26 Replies
:wave: Hey @pitchlynn,
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. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: 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.I'm thinking immich started up without drives mountedSeems likely
and maybe made a new .immich file in the mount location.If the files are missing it'll error like you're seeing, not create new ones
when I remounted it maybe that got overwritten with the mount files.That's not how mounts work My guess would be the drive is still not mounted properly, but there's no way to say for sure without more info
Ok, good to know it won't make a new file and then be disassociated with the old one like I was worried about. I remounted the nas and tested it by creating a folder from the nas side and confirming it showed up in the location I was expecting it. But I agree, I think that immich is not able to access the files for some reason even though they appear to be mounted.
Would that cause this error also:MacBookAir:~/immich-app$ sudo docker compose up -d
[+] Running 2/2
✘ immich-machine-learning Error c... 1.0s
✘ immich-server Error manifest un... 1.0s
Error response from daemon: manifest unknown
Ok, got immich starting up again. I had locked the immich version in the .env file but had a typo there. Still no library showing up. I don't see any errors in the logs right now though.
In fact I think this is where it was failing before and no looks happy: LOG [Microservices:StorageService] Successfully verified system mount folder checks
The external library path still validates but it says the size of library is 0 and 0 assets.
what else can i check? immich_server logs look good and i've check that the immich container can navigate to the uploads and external library paths. i also check permmissions on the folders and that seemed correct.
i took a db backup just in case and then tried running a scan on my external library. it started counting up files and got to about 78000 then ramped back down to zero. still nothing showing in my library. i'm stumped
if i can provide more information please tell me what to provide
Well there's a whole checklist of things you could provide right there
Oh right, you must be referring to the auto generated checklist. I'll start filling that information in. Thanks
You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
The location where your uploaded files are stored
#UPLOAD_LOCATION=./library
UPLOAD_LOCATION=/mnt/immich_uploads
The location where your database files are stored
DB_DATA_LOCATION=./postgres
To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
TZ=Etc/UTC
The Immich version to use. You can pin this to a specific version like "v1.71.0"
#immich_VERSION=release
IMMICH_VERSION=v1.116.2
Connection secret for postgres. You should change it to a random password
Please use only the characters A-Za-z0-9
, without special characters or spaces
DB_PASSWORD=postgres
The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
Sorry, I'm struggling with formatting of the .env and yml files. Hopefully those are readable.
Here the logs I'm getting right nowMy problem has changed slightly since I started this thread. I was going to look at photos from my iphone immich app and it acted like a new install and I got the message that it was building the library. So I opened a browser on my laptop and saw and empty library.
Since I last saw it working I've installed homeassistant on the server and that caused some ports to get closed on the firewall. That seems to happen to me everytime I install something new on ubuntu. Other apps stop working but I'm learning that is because the ports get closed and it is probably my fault for not knowing what the commands I'm copying from guides are doing. I also rebooted and the directories from my NAS unmounted so I had to remount those which includes the upload and external ilbrary locations immich is mapped to.
I've tested that the immich containers can reach those paths by following immich features external library section
docker exec -it immich_server bashThat all seemed good. I also checked the permissions and it looked like it was read/write Through the web interface I tried to scan the external library again thinking it might have to start over from scratch but it ramped up to about 78000 files and then back down to 0. Strange that it saw files but didn't do anything. I have the immich version pinned at 1.116.2 right now and ubuntu is 22.04.5 LTS Immich is installed using the docker compose method and was working great untill this happened. immich app version is 1.116.1 build 177
Filesystem Size Used Avail Use% Mounted on tmpfs 785M 2.5M 783M 1% /run /dev/sda4 66G 44G 19G 71% / tmpfs 3.9G 75M 3.8G 2% /dev/shm tmpfs 5.0M 8.0K 5.0M 1% /run/lock tmpfs 3.9G 0 3.9G 0% /run/qemu /dev/sda1 197M 30M 168M 15% /boot/efi tmpfs 785M 152K 785M 1% /run/user/1000 //192.168.0.10/immich_uploads 7.2T 2.2T 5.1T 31% /mnt/immich_uploads //192.168.0.10/photo 7.2T 2.2T 5.1T 31% /mnt/photo //192.168.0.10/immich_backup 7.2T 2.2T 5.1T 31% /mnt/immich-backupThat's everything I can think of for the checklist.
Was immich restarted after you remounted? If not you should definitely do that. How did you check the mounts inside the container, did you explore and see files?
By acted like a new install, do you mean make a user and so on?
Yes, I’ve restarted it multiple times with docker compose down then back up
I was thinking maybe I pointed to the wrong upload path that was empty but I think I have the right one because there are lots of encoded video files on there already.
Yes I explored the files inside the container and could navigate to and see them using
docker exec -it immich_server bash
Looking like a New install is a bad description. User and configuration of external library is still there. Just that the library is empty and the phone app says it is building timeline like it did when the setup was new. Is the configuration stored in the upload location?
The configuration is in the database, but it sounds like your external library is missing some permissions
Anything in the logs like the bot asked?
@Mraedis here are the logs from the server. I didn’t see any errors. It even says that the mounts were successful. Are there other logs I can provide? The help section from the bot link only listed the server and one other that didn’t seem related.
The docker compose logs from when you last started anew
Ok I’ll get those logs this evening.
Here are the docker compose logs
Seems like the logs are cut off going to try again.
I was able to upload as a file. Seem like it was too long to post as text. Will that work?
I just tried refreshing the library from administration jobs. I ramped up to around 50K and then back down. Interesting that is seems to be counting something. It did a similar then when I ran a scan in the external library area.
Hope someone can chime in here because I can't read this file on my phone 🙃
I am also getting "Failed to read upload/encoded-video/.immich: Error: ENOENT: no such file or directory, open 'upload/encoded-video/.immich'" this is after restore of DB to a new machine
encoded-video does not exist in the "upload" folder, so it seems there might be a code error?
As in why is it looking in <UPLOAD_LOCATION>/encoded-video/ and not just /encoded-video
It's precisely because the folder is not there that it errors, the database is metadata only and you are expected to move and restore the upload location yourself
I did a migration following exactly the steps here (Powershell tab). Migration of database was successful. As far as the locations, all is indentical to the prior system, all immich files are on an external HDD and I just moved the drive from the old system to the new one (ensuring same windows drive letter).
Why is it looking for the encoded-video folder in the upload folder, it has never been in that folder AFIK.
I should also add my setup is completely standard have never done any custom file locations etc.
I opened a new ticket for my specific case so as not to hijack this thread, https://discord.com/channels/979116623879368755/1323958388018778132
Trying file upload again with .txt extension
@Mraedis I don't know if this will help. I added .txt extension to the file and now it has a preview but it seems truncated.
If immich started up when my uploads and external libraries were not mounted could the database have gotten messed up? I'm about ready to just start over. it takes over a week for immich to scan my library and generate thumbnails and encode videos but at least I can just let it run. I fell like something really simple is causing this but I'm not having luck.
If I want to start over can I salvage thumbnails and encoded videos somehow? I could try a restore with my current uplaod folder and database back up I made. But the backup was made after the problem started. I have 1 other db backup but it is probably too old and from a previous install so I betting useless.
I tried restoring but I think my database backup had the same problem since I made it after the problem started. So now I've started from scratch and will let it run for a week or so to get back. It is processing jobs and my library is populating. I set it up exactly the same way as before so the problem was not with access to folders. I think the db got corrupted but I'm not sure how. As mentioned I did reboot and know that my upload folder and external library paths have to be mounted manually. But I've also rebooted before so it seems unlikely that caused. I'll give it a go with the latest version and hope for better luck.
This thread has been closed. To re-open, use the button below.