Media seems broken

A lot of media doesn't appear on the portal. The files aren't broken however.
No description
190 Replies
universalhecker
universalheckerOP2y ago
I uploaded 50k photos and am seeing this Just started the generate thumbnails job again for all photos to see if it changes anything Even opening these files has the issue
Alex Tran
Alex Tran2y ago
This indicate your mount at UPLOAD_LOCATION has issue
universalhecker
universalheckerOP2y ago
So what can help me fix it? I used the CLI to transfer the media
Alex Tran
Alex Tran2y ago
Post your docker-compose, .env and logs from server and microservies
EnriqueGF
EnriqueGF2y ago
Check the jobs, the same happened to me maybe its just that the thumbnmails are not generated yet just wait You can check the jobs queue at the admin panel
universalhecker
universalheckerOP2y ago
Not just the thumbnails but the photo themselves aren't visible
Alex Tran
Alex Tran2y ago
Post your docker-compose, .env and logs from server and microservies and we can look into what the problem is 🙂
universalhecker
universalheckerOP2y ago
Alright give me a moment
universalhecker
universalheckerOP2y ago
Where to find the logs? @Alex
Alex Tran
Alex Tran2y ago
docker logs immich-server docker logs immich-microservices what is the output of your system of lsblk?
universalhecker
universalheckerOP2y ago
Error response from daemon: No such container: immich-server ?!?!?! Error response from daemon: No such container: immich-microservices ?! What's happening? Should I restart the server?
Alex Tran
Alex Tran2y ago
perform docker ps
universalhecker
universalheckerOP2y ago
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ba29e1851ab9 ghcr.io/immich-app/immich-proxy:release "/docker-entrypoint.…" 4 days ago Up 4 days 0.0.0.0:2283->8080/tcp, :::2283->8080/tcp immich_proxy a2cabfa4411b ghcr.io/immich-app/immich-machine-learning:release "tini -- python -m a…" 4 days ago Up 4 days immich_machine_learning 992e1a85a0aa ghcr.io/immich-app/immich-server:release "tini -- /bin/sh sta…" 4 days ago Up 4 days 3001/tcp immich_server 1953c9a9dc69 ghcr.io/immich-app/immich-server:release "tini -- /bin/sh sta…" 4 days ago Up 25 hours 3001/tcp immich_microservices 1b0c414d832d ghcr.io/immich-app/immich-web:release "tini -- /bin/sh ent…" 4 days ago Up 4 days 3000/tcp
Alex Tran
Alex Tran2y ago
try docker logs immich_server
universalhecker
universalheckerOP2y ago
That's long How can I send it Lots of red text i.e. Errors
Alex Tran
Alex Tran2y ago
capture a screenshot
universalhecker
universalheckerOP2y ago
Just a part of it
No description
Alex Tran
Alex Tran2y ago
what is lsblk output?
universalhecker
universalheckerOP2y ago
No description
Alex Tran
Alex Tran2y ago
is that /media your mount point for the storage?
universalhecker
universalheckerOP2y ago
Yup
Alex Tran
Alex Tran2y ago
can you go into /media/ghar/PHOTOS/ and perform ls
universalhecker
universalheckerOP2y ago
No description
Alex Tran
Alex Tran2y ago
can you go into thumb library and check if there are files in it? so rry library directory
universalhecker
universalheckerOP2y ago
There's one folder for a user
universalhecker
universalheckerOP2y ago
Here's what's inside
No description
Alex Tran
Alex Tran2y ago
go into one of the year and drill down to see if you can see the files
universalhecker
universalheckerOP2y ago
Which files? The ones causing the error?
Alex Tran
Alex Tran2y ago
no just any file, I just want to make sure the files make it so the location
universalhecker
universalheckerOP2y ago
Yup lots of them
universalhecker
universalheckerOP2y ago
No description
Alex Tran
Alex Tran2y ago
ok that is good
universalhecker
universalheckerOP2y ago
Should I scp one of them? To check?
Alex Tran
Alex Tran2y ago
now do this, docker-compose down then docker-compose up feel free to do that to check the files are not corrupted
universalhecker
universalheckerOP2y ago
Will do this I'm on my phone so will do this later
Alex Tran
Alex Tran2y ago
ok no problem
universalhecker
universalheckerOP2y ago
I did compose up. Looks like the command does stop Should I Ctrl+C and use the -d option?
Alex Tran
Alex Tran2y ago
don't use it so you can monitor the log
universalhecker
universalheckerOP2y ago
The problem still exists Some videos load when opening them but don't have a thumbnail But the majority of photos I uploaded 2d ago (50k) don't have the thumbnail and load when clicked
Alex Tran
Alex Tran2y ago
I am suspecting something wrong with the mount when you upload the files that is why the thumbnails weren't generated if you download some photos on the top of the timeline now, then delete and reupload them, does the thumbnail get generated now?
universalhecker
universalheckerOP2y ago
I'll try this Yes you're right Some of them do show the thumbnail now But not all 🤔
Alex Tran
Alex Tran2y ago
any log?
universalhecker
universalheckerOP2y ago
One sec Which one? immich-server or immich-microservices?
Alex Tran
Alex Tran2y ago
microservice
universalhecker
universalheckerOP2y ago
docker logs immich-microservices
Alex Tran
Alex Tran2y ago
immich_microservices underscore
universalhecker
universalheckerOP2y ago
Oh
universalhecker
universalheckerOP2y ago
Also one of them that I reuploaded also has the wrong date. Perhaps coz it's still indexing them and queued? 🤔
Alex Tran
Alex Tran2y ago
perhaps do you mind nuke this instance and try again?
universalhecker
universalheckerOP2y ago
50k photos?
Alex Tran
Alex Tran2y ago
I suspect this instance is FUBAR
universalhecker
universalheckerOP2y ago
How to do that? While keeping photos?
Alex Tran
Alex Tran2y ago
try with a small set first to make sure it works Just reupload them like you did initially
universalhecker
universalheckerOP2y ago
I did scp to get the media back from the server earlier once and a few media caused errors and didn't get received. I don't want that to happen again. How do you suggest me to do this again in a safer manner?
Alex Tran
Alex Tran2y ago
so you remove your original already? One thing you can try before nuking the instance is to generate thumbnail for all again it would ensure all thumbnails get generated correctly
universalhecker
universalheckerOP2y ago
Would that help in loading the files even after clicking them?
Alex Tran
Alex Tran2y ago
yes
universalhecker
universalheckerOP2y ago
Alright I'll do this
Alex Tran
Alex Tran2y ago
because it would use the higher resolution thumbnail for viewing in detail 🤞
universalhecker
universalheckerOP2y ago
Started it. Hopefully that should fix it
Alex Tran
Alex Tran2y ago
okay, let me know how it goes
universalhecker
universalheckerOP2y ago
Then there's some videos. That codec issue is still unsolved
Alex Tran
Alex Tran2y ago
that is the story for later, let's try one problem of a time
universalhecker
universalheckerOP2y ago
No description
Alex Tran
Alex Tran2y ago
no space left on device
universalhecker
universalheckerOP2y ago
How the heck?
Alex Tran
Alex Tran2y ago
check df -h
universalhecker
universalheckerOP2y ago
No description
universalhecker
universalheckerOP2y ago
No description
Alex Tran
Alex Tran2y ago
media looks good so I suspect the mount isn't actually mount into the container somehow pretty weird I don't see anything abnormal on your system, so I am not sure what is going on here
universalhecker
universalheckerOP2y ago
🤦🏻‍♂️ What can I do to solve the issue? I'm ready to plug in and copy the entire user folder And recreate the instance
Alex Tran
Alex Tran2y ago
I think it is best to start from scratch now, and in a new instance, before making the bulk upload, try a small set of photos first to make sure that thumbnails and videos get generated correctly Sorry man, I am unsure what is going with your setup here, everything looks correct
universalhecker
universalheckerOP2y ago
It's alright Should I be sending these files while connected to the server or wireless it from another computer?
Alex Tran
Alex Tran2y ago
How did you upload those files initially?
universalhecker
universalheckerOP2y ago
Wirelessly
Alex Tran
Alex Tran2y ago
I mean your original library, where did it located?
universalhecker
universalheckerOP2y ago
uploaded from the old hard drive, where all the old photos were located connected to another laptop Using the cli tool
Alex Tran
Alex Tran2y ago
You do that again using the CLI tool so that you new instance is clean
Alex Tran
Alex Tran2y ago
FAQ | Immich
What is the difference between the cloud icon on the mobile app?
universalhecker
universalheckerOP2y ago
Thanks
Alex Tran
Alex Tran2y ago
Do you remember if you use the --import flag?
universalhecker
universalheckerOP2y ago
Using the cli? No
Alex Tran
Alex Tran2y ago
okay, just want to make sure
universalhecker
universalheckerOP2y ago
FYI, I uploaded the files using WSL Mounting the hard drive
Alex Tran
Alex Tran2y ago
What is your server spec? the one that runs Immich
universalhecker
universalheckerOP2y ago
An old dell i3 One sec for exact specs Intel i3-3227U (4) @ 1.900GHz
universalhecker
universalheckerOP2y ago
No description
Alex Tran
Alex Tran2y ago
thank you
universalhecker
universalheckerOP2y ago
No worries. Did that help with something?
Alex Tran
Alex Tran2y ago
no, I am just wondering if the low spec can choke the system and cause issue like what we see, but I remember we have many people running RPi4 so your server shouldn't have issue
universalhecker
universalheckerOP2y ago
Also one more thing. When I uploaded via the CLI, I encountered an issue I don't remember. I redid the upload to see 1528 media more. Redoing the upload was again asking me to upload those 1528 files. What could've been the issue there?
Alex Tran
Alex Tran2y ago
thost 1528 are duplicated files
universalhecker
universalheckerOP2y ago
So reuploading them by mistake wouldn't be an issue?
Alex Tran
Alex Tran2y ago
correct, the server reject them that is why it keeps asking to be uploaded 😛 since there is no persistent memory on the CLI client
universalhecker
universalheckerOP2y ago
But it should just NOT show them right? While indexing and comparing, it already checks for the transferred files right?
Alex Tran
Alex Tran2y ago
the CLI client is stateless so it doesn't know which file is duplicated, it only knows which file has been uploaded since it compare the ID with the server
universalhecker
universalheckerOP2y ago
Is it okay to reupload using WSL? That shouldn't be causing the issue right?
Alex Tran
Alex Tran2y ago
I believe so
universalhecker
universalheckerOP2y ago
After purging and remove all folders in /media/ghar/PHOTOS/ should I just create another instance using the existing .env and docker-compose.yml?
Alex Tran
Alex Tran2y ago
yes that should be fine
universalhecker
universalheckerOP2y ago
Do you have any suggestions for which video encoding to use? Or I'll do that after uploading a few files
Alex Tran
Alex Tran2y ago
I use the default one, you can tweak it to your liking
universalhecker
universalheckerOP2y ago
Hmm... Cause I was thinking whether h264 < vp9 I have a Windows, Mac, iphones, and one Android in the home I'll leave the default for now
Alex Tran
Alex Tran2y ago
you might be right, I am not very well-versed with ffmpeg 😄
universalhecker
universalheckerOP2y ago
Alright I changed that to vp9 I'll upload a few media now Uploaded about 800 files And can see their thumbnails and they open when clicked as well
Alex Tran
Alex Tran2y ago
ok so the mount is good this time then
universalhecker
universalheckerOP2y ago
Great So now should I upload the remaining 50k too? At once?
Alex Tran
Alex Tran2y ago
Yeah I don't think there should be any issue now
universalhecker
universalheckerOP2y ago
I'll probably export the output to a log file in case there are any issues Thanks @Alex you were of great help. This discord channel is a blessing 🙂
Alex Tran
Alex Tran2y ago
no problem man, sorry for the inconvenience
universalhecker
universalheckerOP2y ago
It's fine. Still in beta. Over time it should get sorted out What do you think was the issue though? Too many uploads at once? Or a broken upgrade probably on my end?
Alex Tran
Alex Tran2y ago
I think the issue is the mount somehow not mounted properly in the container during your initial upload
universalhecker
universalheckerOP2y ago
Hopefully shouldn't cause problems this time A lot of the photos I sent have lost the metadata of dates For some reason they're showing up as 12th aug '23 About 300 of them Even the exiftool shows 12th aug But it was fine on the web app earlier
Alex Tran
Alex Tran2y ago
if exiftool shows 12th then there is issue I believe
universalhecker
universalheckerOP2y ago
Yeah but how was Immich putting them in the right places earlier?
Alex Tran
Alex Tran2y ago
do you use the same original files to upload this time?
universalhecker
universalheckerOP2y ago
I uploaded those files from a phone probably. And this time I did it using the cli. But all I did was download the images from the server and now reupload them
Alex Tran
Alex Tran2y ago
Are the jobs finished running yet? if not let's wait until everything settle and we can come back to this
universalhecker
universalheckerOP2y ago
Sure. They're still uploading I'm encountering the issue again 😦 A lot of files don't have their thumbnails
Alex Tran
Alex Tran2y ago
hmm Are all the job finished? can you go to Administration > Jobs and take a screenshot of the page?
universalhecker
universalheckerOP2y ago
The upload is still going on But the issue is the same as mentioned above in immich_microservices
universalhecker
universalheckerOP2y ago
No description
Alex Tran
Alex Tran2y ago
This?
No description
universalhecker
universalheckerOP2y ago
Yes a lot of this
Alex Tran
Alex Tran2y ago
@jrasm91 Do you have any recommendation for the issue that we are encountering here. His system after a while running into the issue with error message above, but from the report, the mount drive still have plenty of space can you attach the shell into microservices container and perform df -h
universalhecker
universalheckerOP2y ago
attach the shell?
Alex Tran
Alex Tran2y ago
docker exec -it immich_microservices sh
Alex Tran
Alex Tran2y ago
Here is what we want to see
No description
universalhecker
universalheckerOP2y ago
No description
Alex Tran
Alex Tran2y ago
yeah plenty of space left can you capture the screenshot of microservices logs again?
universalhecker
universalheckerOP2y ago
It's too long to be captured in one screen
jrasm91
jrasm912y ago
Yo this is a long thread
universalhecker
universalheckerOP2y ago
Long problems require long solutions 😭
universalhecker
universalheckerOP2y ago
Just a snippet. It's still printing the output
No description
Alex Tran
Alex Tran2y ago
basically no thumbnail get generated due to "no space left on device" error
jrasm91
jrasm912y ago
Sounds like you don't have any space on the device /s
universalhecker
universalheckerOP2y ago
Despite having half the disk space vacant
jrasm91
jrasm912y ago
Can you access this file system through the host file explorer? What type of file system is running on that mount? Can I see the fstab entry for it? Can you restart the machine and then try uploading a single (new) file and see if it generates a thumbnail for it? No space left on device can sometimes mean the device is busy and unavailable. I'm guessing it is related to the filesystem and not being able to support opening new file descriptors for writing because it's out of handles/at some limit.
Alex Tran
Alex Tran2y ago
I/O bottleneck?
jrasm91
jrasm912y ago
Not specifically i/o bottleneck, but the underlying filesystem implementation might be running into some issues.
universalhecker
universalheckerOP2y ago
Downloading a bunch of files and then uploading them again somehow works /dev/sda1 466G 171G 296G 37% /media What's /dev/sda1?
sogan
sogan2y ago
it's a partition (/dev/sda is the hard drive itself) what's the output of df -i?
universalhecker
universalheckerOP2y ago
No description
universalhecker
universalheckerOP2y ago
Here 👆
sogan
sogan2y ago
inodes look fine actually isn’t it kinda weird that sda1 has 0 inodes?
universalhecker
universalheckerOP2y ago
What's inodes? The issue still persists and I have no idea what to do Probably do one folder at a time instead of all 50k?
jrasm91
jrasm912y ago
What format is /media? Is it ext4, btrfs, zfs, NTFS, etc.?
universalhecker
universalheckerOP2y ago
Which command to identify that?
sogan
sogan2y ago
they’re special files that store metadata about files. if there are no free inodes left, it will give the same error as if the disk is full because it can’t write to any inode lsblk -f
universalhecker
universalheckerOP2y ago
That's probably the reason for the errors?
universalhecker
universalheckerOP2y ago
No description
universalhecker
universalheckerOP2y ago
It's FAT32
sogan
sogan2y ago
fat32 actually doesn’t use inodes so that’s normal then how many images did you upload? fat32 has a cap of 65,534 files in a single directory
universalhecker
universalheckerOP2y ago
No description
sogan
sogan2y ago
since we store all thumbnails in the same folder and generate multiple thumbnails for the same image, you’re probably hitting that limit the actual originals wouldn’t be affected because they’re stored hierarchically by date
universalhecker
universalheckerOP2y ago
But so many thumbnails are missing. Even after opening it doesn't show up
sogan
sogan2y ago
the large image in the image viewer is also generated and stored in the thumbnail folder
universalhecker
universalheckerOP2y ago
I get it now I'll let you know the number of files 13107 is the number of files That's not much 😦 In the thumbs folder
jrasm91
jrasm912y ago
I'm no expert, but I know fat32 has a few limitations and I'm guessing you are running into one. It shows total usage as 49k. That should be originals. You should have 2x that in the UPLOAD_LOCATION/thumbs directory.
Tabalugach
Tabalugach2y ago
Hi there, I have the same problem, following Alex suggestions for debuging I found that immich want to download something named buffalo or somthing like that. My PI-Hole DNS was rejecting that dns so file was not able to download. (sorry for my english) 🙂
Alex Tran
Alex Tran2y ago
that is the model for facial recognition, you will need to allow that dns so that facial recognition would work
Tabalugach
Tabalugach2y ago
but at same time my thumbs start to generate...
Alex Tran
Alex Tran2y ago
the dns blocking the doamin for facial recognition model doesn't related to thumbnail generation process
Tabalugach
Tabalugach2y ago
i got 100 % the same problem as universalhecker, didn't do any changes except bypassing pihole alex, are you saying that facial recongnition model is not done on local device?
Alex Tran
Alex Tran2y ago
yeah facial recognition has always been done on the server
Tabalugach
Tabalugach2y ago
sorry, i mean on local server where immich is running or remote server?
Alex Tran
Alex Tran2y ago
local server but it needs to download the model from a remote repository in order to have the model to perform the inferencing
universalhecker
universalheckerOP2y ago
But the problem is that if I download and reupload the files then it works fine The thumbs directory has 13107 photos as mentioned above
jrasm91
jrasm912y ago
Do most of your photos not have thumbnails then?
universalhecker
universalheckerOP2y ago
Yeah 😭
jrasm91
jrasm912y ago
Can you try on a different filesystem?
jrasm91
jrasm912y ago
13107 is pretty much exactly 65534 / 5. 65534 is the max number of files, assuming short file names for FAT32. We use uuids, so longer names means less than space in the directory. Tldr you need to switch file systems or wait until we implement something like this https://github.com/immich-app/immich/issues/3314
GitHub
[BUG] Thumbs dir size becomes too big · Issue #3314 · immich-app/im...
The bug Since all thumbnails are stored in a single directory (./uploads/thumbs/$user_uuid), this directory accrues many files. I uploaded my whole collection of photo's and albums, and now thi...
universalhecker
universalheckerOP2y ago
How can I do that? It's a mounted drive so I'm okay doing that but can I change it with the system switched on? I'll format it 👍 Which file system to use?
Alex Tran
Alex Tran2y ago
ext4 should be good
universalhecker
universalheckerOP2y ago
Does it work on Windows and MacOS? Ahh it doesn't Which is the most suitable one that can be accessed on each OS? Is exFAT fine? Oh it's not supported on Linux. Because I'll do regular backups of the library folder in another hard drive that I want to be able to access on a Windows or Mac system
sogan
sogan2y ago
I think ntfs is supported on linux, mac and windows. Probably your best cross-platform option
universalhecker
universalheckerOP2y ago
That's read-only on mac But all I want to do is copy the files and open them in another system. The files don't change themselves so it's alright to use ext4 I've reset my system because of an issue in my linux installation And have also installed immich along with formatting the drive with ext4 format will get back after uploading media Alright there's some real issue I formatted the hard drive to ext4 And the problem persists I did a folder of a photos of 3241 photos and 156 videos but 4 of those videos still don't load
universalhecker
universalheckerOP2y ago
No description
universalhecker
universalheckerOP2y ago
No description
No description
No description
universalhecker
universalheckerOP2y ago
But all photos do load Looks like it's these specific ones that are causing an issue. They don't load even on the pc Btw is ext4 good for large number of files? A lot of them also have long filenames Like the photos downloaded from WhatsApp that have a long string of characters separated by dashes
jrasm91
jrasm912y ago
Should be fine afaik
universalhecker
universalheckerOP2y ago
Till now everything's working fine except a few errors Thanks for the support Is there a way to print only the errors from immich_microservices?
jrasm91
jrasm912y ago
What do you mean?
universalhecker
universalheckerOP2y ago
There are a few red texts in the logs of immich_microservices I only want to see them The errors
jrasm91
jrasm912y ago
There is a log level variable you can set to only see errors moving forward.
universalhecker
universalheckerOP2y ago
Is there a way to show the past errors too?
jrasm91
jrasm912y ago
I'm not sure. You can use docker logs to get all the logs. Then probably there is a way to filter the messages.
universalhecker
universalheckerOP2y ago
Np thanks 👍

Did you find this page helpful?