#Blurry, Inaccessible photos in web client (but same photos are perfectly visible in/on phone app)

1 messages · Page 1 of 1 (latest)

left hedge
#

Screenshots attached. I'm not sure which logs I should look at, but I'm happy to provide if anyone can tell me where best to look.

One note, the "UPLOAD_LOCATION=/media/Photos/ImmichPhotos/" is an SMB mount on my local network.

Enjoying the application a great deal.

docker-compose.yml & .env here: https://pastebin.com/iKdWUdfB

torn venture
marble ferry
#

What is your linux kernel version? uname -a

#

we need the logs for immich_server and immich_microservices

left hedge
#

Is there a way to re-upload the content to that location? Everything else I'd uploaded (via the web browser) seems to be accessible and I presume is uploaded and served from the same location, right?

#

Linux debian-lab 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux

left hedge
#

@marble ferry - what's the command to check the logs when running in docker?

marble ferry
#

docker logs <container>

left hedge
#

Thanks. Let me grab those.

#

Also - congrats on the FUTO funding - it sounds like a great fit and was welcome news after I'd installed this for like a week and was already enamored. Thanks for releasing to the world.

torn venture
#

Thank you sir!

#

Can you check the SMB mount to make sure that it is correctly mounted?

left hedge
#

Very welcome!

#

It shows up with df -h via the terminal, and I can cd into it and see folders in the /ImmichPhotos/upload directory.

#

Is there a cleaner way to check via CLI?

torn venture
#

can you check the output of lsblk?

left hedge
#

Perhaps this is a clue - in the webapp I'm seeing a "double" path of "upload/upload" -- upload/upload/0d508268-fa8c-4515-8c75-c540298de89e/ff/2c/ff2cc2cc-12b4-4c57-a738-7b1a79ec48f2.jpg

torn venture
#

and I can cd into it and see folders in the /ImmichPhotos/upload directory.
You can always cd into the mount path, if the mount is not there, it will just navigate to the on-disk path

left hedge
#

lsblk it does not appear -

torn venture
#

I don't see your smb mount there, do you?

#

This is my smb mount

left hedge
#

I don't. Here's df -h -

torn venture
#

hmm

#

do you have your mount command in /etc/fstab?

left hedge
#

And I appear to be in there -

#

Hadn't added to fstab yet.

torn venture
#

Can you try to run the mount command again?

#

then check lsblk

#

if you haven't added to fstab, if your server restart, the mount won't be automatically mounted

left hedge
#

Getting an error.

#

Even though I can cd into the files via the mountpoint.

torn venture
#

Can you run this? mount -v | grep 'type smbfs'?

#

or df -k -F smbfs

left hedge
#

No output on the 1st.

#

Should I just umount and then remount?

torn venture
#

yes, try it

#

maybe try restart you server as well

left hedge
#

umount worked fine. Remount successful, but still not showing in lsblk, but is in df -h.

#

I'll restart and see what happens.

torn venture
#

okay! let me know

left hedge
#

Will do. Thanks for the assist here.

#

@torn venture - So reboot went fine, but the mount is still not showing with lsblk, but is with df -h (and I can cd to the mount point and move around).

torn venture
#

now run Immich, and monitor the logs

#

see if it spits out any error then attach to the container and check for the error file location if any is shown

left hedge
#

Getting a lot of this:

#

[Nest] 7 - 05/17/2024, 3:25:23 AM ERROR [ImmichServer] [LoggerRepository] Unable to send file: Error
Error: ENOENT: no such file or directory, access 'upload/thumbs/0d508268-fa8c-4515-8c75-c540298de89e/e1/95/e19588f8-4040-4139-b629-fb91ff2c871c-thumbnail.webp'
at async access (node:internal/fs/promises:603:10)
at async sendFile (/usr/src/app/dist/utils/file.js:51:9)
at async AssetControllerV1.getAssetThumbnail (/usr/src/app/dist/controllers/asset-v1.controller.js:57:9)

#

And this, alternating:

#

[Nest] 7 - 05/17/2024, 3:25:22 AM ERROR [ImmichServer] [ExceptionsHandler] ENOENT: no such file or directory, access 'upload/thumbs/0d508268-fa8c-4515-8c75-c540298de89e/48/19/48191177-4bbb-4a1d-8970-57cc66c826f9-thumbnail.webp'
Error: ENOENT: no such file or directory, access 'upload/thumbs/0d508268-fa8c-4515-8c75-c540298de89e/48/19/48191177-4bbb-4a1d-8970-57cc66c826f9-thumbnail.webp'
at async access (node:internal/fs/promises:603:10)
at async sendFile (/usr/src/app/dist/utils/file.js:51:9)
at async AssetControllerV1.getAssetThumbnail (/usr/src/app/dist/controllers/asset-v1.controller.js:57:9)

#

And here in microservices: [Nest] 7 - 05/17/2024, 3:05:39 AM ERROR [ImmichMicroservices] [JobService] Unable to run job handler (metadataExtraction/metadata-extraction): Error: ENOENT: no such file or directory, stat 'upload/upload/0d508268-fa8c-4515-8c75-c540298de89e/ff/2c/ff2cc2cc-12b4-4c57-a738-7b1a79ec48f2.jpg'

#

This has the double "upload/upload"

marble ferry
#

Can you run docker exec -it immich_server bash and navigate around the filesystem to see what’s in there? You’ll want to look at the /usr/src/app/upload folder

#

Upload/upload is normal. Perhaps a misguided naming at the time but that’s how it is haha

left hedge
#

Yeah, let me poke around.

left hedge
#

Ha!

#

So for this path: 'upload/thumbs/0d508268-fa8c-4515-8c75-c540298de89e/48/19/48191177-4bbb-4a1d-8970-57cc66c826f9-thumbnail.webp' it truly isn't there starting with the {19} folder path.

marble ferry
#

Try this. Shut down immich docker. Unmount the samba volume. What do you see in the mounted folder?

left hedge
#

Ah. Okay. Give me a second to get out of docker here.

#

Shut down all of the immich dockers, yes?

marble ferry
#

Yes

left hedge
#

Hmm...

#

So I'm not actually sure what's going on. umount succeeds, I check df -h and it is not there. I cd into the directory and see files, but when I then check df -h it looks like an smb mount again.

#

What can I run to see the actual place the files are cli?

marble ferry
#

Maybe you have some kind of auto mount script running somewhere

left hedge
#

I added to /etc/fstab before reboot.

marble ferry
#

I didn't think that would remount it that quickly. My concern here is that at some point the samba was unmounted and Immich wrote to the underlying filesystem

#

there are ways to re mount the underlying FS, but it's a little tricky

left hedge
#

Correct. What command can I run in the terminal to expose the actual location of the files I'm looking at there?

marble ferry
#

no way you can keep it unmounted? it's probably the safest way

#

try removing x-systemd-autmount from fstab, run systemctl daemon-reload then unmount again

left hedge
#

That seems to have done the trick. I do have a dual "ImmichPhotos" directory when unmounted & when mounted.

marble ferry
#

can you find the missing /19/ folder in there?

left hedge
#

Indeed. It's there.

marble ferry
#

in theory if you carefully merger the contents of this folder back into the samba mount it might be ok

#

in practice you're going to want to harden your network topology and setup some kind of auto-check for the mountpoint existing (for example make a random filename, then make a cron script to check for its existence q5min)

left hedge
#

Wild. I'm outside of my scope for that one. Is the cron script a best-practice or is there some other way to do that that's useful?

marble ferry
#

that's how I do it

left hedge
#

How do you prevent immich from writing to the directory if the cron script fails?

marble ferry
#

for example: */5 * * * * root [ -e /mountpoint/randomfilename ] || echo 'mount failed' | mail -s 'mountpoint failed' root

#

I don't. In practice you could run docker stop immich... in cron if that is noticed

#

I prefer to setup monitoring systems and then intervene myself if needed

#

I also use NFS in a VM which is mounted to NFSD on the hypervisor, so it's pretty much impossible for the mount to fail

#

Samba is more finnicky

left hedge
#

Well thank you for solving the mystery! I'll look into NFSD!

#

Appreciate all the help here! The good news: Immich is behaving perfectly!

marble ferry
#

ofc, good luck

sick fable
left hedge