I
Immich5mo ago
echan42

Smart search doesnt work on my new immich installation (Docker, Synology)

Hi, my new installation of immich can't use smart search. I get the following error "Failed to search smart (immich server error)". I suspect it comes down to these lines in my server logs: [Nest] 17 - 05/28/2025, 3:39:30 PM WARN [Api:MachineLearningRepository~hp22bg8p] Machine learning request to "http://immich-machine-learning:3003" failed with status 500: Internal Server Error [Nest] 17 - 05/28/2025, 3:39:30 PM ERROR [Api:ErrorInterceptor~hp22bg8p] Unknown error: Error: Machine learning request '{"clip":{"textual":{"modelName":"ViT-B-32__openai","options":{"language":"en-US"}}}}' failed for all URLs My Immich-LEARNING is configured as follows IMMICH_MACHINE_LEARNING_URL http://immich-machine-learning:3003 I've also attached both container's logs. Any ideas what I did wrong? I've tried many options I found online.
80 Replies
Immich
Immich5mo ago
:wave: Hey @echan42, 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. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time). 2. :blue_square: read applicable release notes. 3. :blue_square: reviewed the FAQs for known issues. 4. :blue_square: reviewed Github for known issues. 5. :blue_square: 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.
Tempest
Tempest5mo ago
How much ram does your Synology have?
echan42
echan42OP5mo ago
Thanks for the quick response
No description
echan42
echan42OP5mo ago
No description
mertalev
mertalev5mo ago
You’re getting a permission denied error when it tries to save the model to the model cache. Are you using docker compose? If so, could you share your yml file?
echan42
echan42OP5mo ago
That was my first suspicion so I chmod777'd my immich folder maybe foolishly Let me find the yaml file docker composer is my frontend to manage stacks, right? I'm using portainer
echan42
echan42OP5mo ago
Marius Hosting
How to Install Immich on Your Synology NAS
Trustworthy expert guide to your Synology NAS.
mertalev
mertalev5mo ago
Oh, I’ve never used portainer. Are you running as non-root? This issue is similar to what another user was facing and they were non-root on k8s. The download library we use changed how it works recently and we haven’t figured out what specifically causes the permission error yet. My guesses are the relevant folders (inside the container, not on the host) are /cache, /tmp, maybe ~/.cache
echan42
echan42OP5mo ago
I'm running portainer using their local administrator account, I believe this admin account interacts with the only user I have on my Synology, this user has full admin access
echan42
echan42OP5mo ago
I've set full read write modify for all folders and files in this directory but I don't see /tmp or /.cache
No description
No description
echan42
echan42OP5mo ago
I pulled my local admin's account's uid and gid And gave them to portainer when deploying
mertalev
mertalev5mo ago
Hmm it’d be good to figure out which folder it’s failing to write to. Can you ssh/exec into a shell session in the ML container? You can try seeing if you can touch a file into /cache. I can also do some digging today see what the library is doing
echan42
echan42OP5mo ago
I'm sorry if this is ignorant, but what container is ML?
No description
echan42
echan42OP5mo ago
Ah right, machine learning, gotcha
echan42
echan42OP5mo ago
No description
echan42
echan42OP5mo ago
Is this the right "/cache/" folder? Are the local unix caché folder the same folder that immich is trying to use? I'm sorry, I have unix server knowledge but I'm not familiar with container enviroments
mertalev
mertalev5mo ago
Yes, this is the same environment that the machine learning process is under
Mraedis
Mraedis5mo ago
Did you pay Marius for the stack.env? 👀
echan42
echan42OP5mo ago
Yeah, $5 got the job done, I value their contribution but I'd have prefered not having to "donate"
Mraedis
Mraedis5mo ago
I just mean that they provide support as well, tailored to the compose
echan42
echan42OP5mo ago
I have my reservations towards paywalling knowledge but using their guide saved me time I'll hit them up requesting some help, I hadn't tought of that
Mraedis
Mraedis5mo ago
If you get there ,ask about the matplotlib I've always wondered what that was about
echan42
echan42OP5mo ago
Will get back to you with that
Mraedis
Mraedis5mo ago
(My guess is it's to somehow weed out the non-paying users 😛 )
echan42
echan42OP5mo ago
How would that work?
Mraedis
Mraedis5mo ago
somehow Guessing the MPLOTLIBDIR var is a token of some kind
echan42
echan42OP5mo ago
I've sent them an email but I don't want to prod too hard regarding the matplotlib, if I get a response I'll ask them in a follow-up
Mraedis
Mraedis5mo ago
Sure thing Could you ls -la /cache /tmp meanwhile? From inside the container
echan42
echan42OP5mo ago
On it
echan42
echan42OP5mo ago
No description
echan42
echan42OP5mo ago
Could this be my issue?
No description
Mraedis
Mraedis5mo ago
did you try to chmod /cache too?
echan42
echan42OP5mo ago
Yep, no issues I can change permissions on /cache
Mraedis
Mraedis5mo ago
I think /cache/ is owned by you because it's mounted Maybe you can add the tmp volume
volumes:
- tmp:/tmp
- model-cache:/cache
volumes:
- tmp:/tmp
- model-cache:/cache
echan42
echan42OP5mo ago
I'm not sure how to mount additional volumes, but you're right, tmp may be missing
No description
Mraedis
Mraedis5mo ago
it's not missing FWIW, it doesn't exist in 'normal' deployments in the Stacks editor, just add tmp:
volumes:
- /volume1/docker/immich/upload:/usr/src/app/upload:rw
- /volume1/docker/immich/cache:/cache:rw
- /volume1/docker/immich/tmp:/tmp:rw
- /volume1/docker/immich/matplotlib:/matplotlib:rw
volumes:
- /volume1/docker/immich/upload:/usr/src/app/upload:rw
- /volume1/docker/immich/cache:/cache:rw
- /volume1/docker/immich/tmp:/tmp:rw
- /volume1/docker/immich/matplotlib:/matplotlib:rw
echan42
echan42OP5mo ago
Updated and deployed, brb
echan42
echan42OP5mo ago
No description
echan42
echan42OP5mo ago
No description
echan42
echan42OP5mo ago
Still no smart search
echan42
echan42OP5mo ago
No description
echan42
echan42OP5mo ago
I can touch files to /tmp
Mraedis
Mraedis5mo ago
Same error in the logs?
echan42
echan42OP5mo ago
ML logs, RuntimeError: Data processing error: I/O error:
Permission denied (os error 13)
echan42
echan42OP5mo ago
Is this the error we're talking about? I didn't pinpoint the original error in the logs or this error? [Nest] 7 - 05/28/2025, 5:43:23 PM ERROR [Microservices:{"id":"d6bde133-b91a-43a6-a631-f48361e217bb"}] Unable to run job handler (smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed for all URLs
Mraedis
Mraedis5mo ago
Yeah the big wall is the error I meant
echan42
echan42OP5mo ago
I appreciate you patience here, I feel like I'm fumbling at every step
Mraedis
Mraedis5mo ago
No, like mert said this might have been the result of some changes on our end and understanding why/how is important
echan42
echan42OP5mo ago
I'm happy to cooperate with any request you may have But my knowledge is limited here
Mraedis
Mraedis5mo ago
Same! Going to be rude and tag @sogan 👀 They can be pretty busy though so, patience
echan42
echan42OP5mo ago
I've got time but I'm not always on Discord, I'll keep an eye on this convo I'm happy to provide VNC if it's of any help to asses if this is a result of any changes in immich I'm aware that the main objective here is check if this is the result of any changes on your end and understanding, not fixing my server So I'm not gonna nudge in the direction that's only convenient to e me*
Mraedis
Mraedis5mo ago
Oh no, we want to have both 😛 Understanding why it's erroring will also allow us to fix your issue
echan42
echan42OP5mo ago
I'm willing for the focus to shift, just wanted to make that clear 🙂
Mraedis
Mraedis5mo ago
Pretty sure you can just... download the model manually if you want to get it going
echan42
echan42OP5mo ago
I'd be happy with that result if it doesn't impede any investigation you'd value
Mraedis
Mraedis5mo ago
What model do you have defined in smart search?
echan42
echan42OP5mo ago
ViT-B-32__openai Came standard
echan42
echan42OP5mo ago
I have a small folder on my drive that populated with deployment, this doesn't change things, right?
No description
Mraedis
Mraedis5mo ago
that's part of the model, yeah bah it seems like hugginface download is not that straightforward I mean it is, just not from web 😛 https://huggingface.co/immich-app/ViT-B-32__openai/tree/main
echan42
echan42OP5mo ago
I actually landed on that page during my own troubleshooting, gave up since I didn't find a download button
Mraedis
Mraedis5mo ago
Yeah from the web gui you'd need to either download all files individually and place them in their folders or do a git clone git clone https://huggingface.co/immich-app/ViT-B-32__openai
echan42
echan42OP5mo ago
testing git cloned the files and copying to /docker/immich/cache/clip/ViT-B-32__openai
Mraedis
Mraedis5mo ago
For reference, this is the normal folder structure:
root@poseidon:/var/lib/docker/volumes/immich_model-cache/_data# ll clip/ViT-B-32__openai/
total 36
drwxr-xr-x 6 root root 4096 Aug 28 2024 .
drwxr-xr-x 5 root root 4096 Sep 30 2024 ..
drwxr-xr-x 3 root root 4096 Aug 28 2024 .cache
-rw-r--r-- 1 root root 196 Aug 28 2024 config.json
-rw-r--r-- 1 root root 1751 Aug 28 2024 .gitattributes
drwxr-xr-x 3 root root 4096 Aug 28 2024 models--immich-app--ViT-B-32__openai
-rw-r--r-- 1 root root 422 Aug 28 2024 README.md
drwxr-xr-x 2 root root 4096 Aug 28 2024 textual
drwxr-xr-x 2 root root 4096 Aug 28 2024 visual
root@poseidon:/var/lib/docker/volumes/immich_model-cache/_data# ll clip/ViT-B-32__openai/
total 36
drwxr-xr-x 6 root root 4096 Aug 28 2024 .
drwxr-xr-x 5 root root 4096 Sep 30 2024 ..
drwxr-xr-x 3 root root 4096 Aug 28 2024 .cache
-rw-r--r-- 1 root root 196 Aug 28 2024 config.json
-rw-r--r-- 1 root root 1751 Aug 28 2024 .gitattributes
drwxr-xr-x 3 root root 4096 Aug 28 2024 models--immich-app--ViT-B-32__openai
-rw-r--r-- 1 root root 422 Aug 28 2024 README.md
drwxr-xr-x 2 root root 4096 Aug 28 2024 textual
drwxr-xr-x 2 root root 4096 Aug 28 2024 visual
echan42
echan42OP5mo ago
looks good! Fingers crossed
Mraedis
Mraedis5mo ago
Not sure what is in models--immich-app--ViT-B-32__openai 🤔 it's like 2 more folders, both empty
echan42
echan42OP5mo ago
Works!
No description
echan42
echan42OP5mo ago
I asked it for "car" and it gave me my car
No description
echan42
echan42OP5mo ago
This is amazing I'm still around if there's testing to be done to find the source of the issue Matplotlib could be used in custom scripts or projects involving Immich to analyze or visualize data related to photo/video libraries, such as metadata, storage usage, or tagging statistics. For example, you might use Matplotlib to: Plot the number of photos uploaded over time using Immich's API data. Visualize storage usage across albums or libraries. Create graphs of face recognition or tag distribution from Immich's metadata. This was his response
David
David5mo ago
I've been having problems too and have been working through them using ChatGPT to help me resolve. It has concluded the issue is likely a bug and related to a mismatch with Pydantic FastAPI schema. Screenshot attached.
No description
Mraedis
Mraedis5mo ago
I don't think it is 👀
SJL
SJL4mo ago
Hi. I'm a new Immich user setting up and testing for the 1st time. I'm seeing this same problem as echan42 and same environment (Synology with Portainer). In GitHub, I see Issue #19431 (https://github.com/immich-app/immich/issues/19431) which also looks like the same problem. That Issue has been closed and moved to Discussion 3 days ago. What does being moved to a Discussion mean with regard to a fix/resolution? One difference is that Issue #19431 log shows "Downloading detection model 'buffalo_1' prior to the error. But like echan42, I'm seeing "Downloading textual model 'ViT-B-32__openai' prior to the "ERROR Exception in ASGI application". It looks like echan42 fixed their problem by "git cloning" that part of the model (5/28/2025 10:20AM in this thread). Is that the solution? (or just a temporary solution?)
Immich
Immich4mo ago
[Issue] Immich-machine-learning container in portainer keeps giving permission denied when trying to download model evne though same permission is used for immich-server (immich-app/immich#19431)
Mraedis
Mraedis4mo ago
Closing the issue means the issue is not with Immich
SJL
SJL4mo ago
OK. Thanks. @echan42 I did the "git clone ... ViT-B-32__openai" and copied it into the .../cache/clip folder. But unfortunately, I'm still getting a failure - slightly different. I'm curious if you had to do anything else to get it to work? Thanks.
Tempest
Tempest4mo ago
Fwiw, immich works fine on Synology with the built in container manager, I know it's not exactly what you're looking for, but it is a solution
SJL
SJL4mo ago
@Tempest Thanks. I see there is a docker-compose.yaml available in the Immich documentation. I had missed that. From your comment, I believe you realized that I installed Immich using Portainer. I think everything is working, except the machine-learning. If I interpret your comment correctly, you are suggesting the possibility that Portainer is potentially introducing the problem. I will take the docker-compose.yaml and start with that - using the container manager, instead of Portainer. (I just recently moved my few other containers into Portainer.) If I can get that working, then I have something that I can tweak and hopefully get to work in Portainer. Thanks for the "gentle nudge." I do appreciate it. It got me to look in a different direction. I was stuck.
Tempest
Tempest4mo ago
I'm successfully running immich on a ds423+ in the container manager using the official docker compose instructions (slightly modified to work with docker -compose instead of docker compose)
SJL
SJL4mo ago
@Tempest I have a DS1621+. So, no hardware acceleration. But should be capable. I'll start with the official instructions. I had started with MariusHosting (just like the OP). But had also made modifications. Obviously, I did something wrong. Again, thanks. @Tempest It all works (including machine-learning)! Cheers!
echan42
echan42OP4mo ago
Hi, a very strong topic during my research was permissions, double check that the permissions are correct, including all sub-directories

Did you find this page helpful?