ValueError: Incorrect path or url, URLs must start with `http://` or `https://`,

Hi, got this errors in the machine-learning container when running the 'tag object' job. Any idea what a reason can be? ValueError: Incorrect path or url, URLs must start with http:// or https://, and upload/thumbs/5c86787b-cae9-4382-b7ca-cc0075d77b96/7cfcd751-2dda-4ead-a18a-93ec16ee388d.jpeg is not a valid path
12 Replies
bo0tzz
bo0tzz•3y ago
@jrasm91 is this a bug caused by the new path handling?
Alex Tran
Alex Tran•3y ago
we saw this once but haven't been able to reproduce it @theautomation Can you make sure the mount can be accessed from the machine learning container?
theautomation
theautomationOP•3y ago
Hm I get a permission denied when cd into the upload folder inside the machine-learning container 🤔
root@immich-machine-learning-bc4bff978-vkc7r:/usr/src/app# whoami
root
root@immich-machine-learning-bc4bff978-vkc7r:/usr/src/app# ls -la
total 29
drwxr-xr-x 1 root root 51 Mar 31 19:10 .
drwxr-xr-x 1 root root 17 Mar 23 22:59 ..
-rw-r--r-- 1 root root 5 Mar 23 22:58 .dockerignore
-rw-r--r-- 1 root root 39 Mar 23 22:58 .gitignore
drwxrwsrwx 2 root 2000 6 Mar 31 19:10 .reverse-geocoding-dump
-rw-r--r-- 1 root root 682 Mar 23 22:58 Dockerfile
-rw-r--r-- 1 root root 69 Mar 23 22:58 README.md
-rw-r--r-- 1 root root 837 Mar 23 22:58 gunicorn.conf.py
drwxr-xr-x 2 root root 21 Mar 23 22:58 src
drwxrwx--- 6 1000 2000 6 Mar 31 18:19 upload
root@immich-machine-learning-bc4bff978-vkc7r:/usr/src/app# cd upload/
bash: cd: upload/: Permission denied
root@immich-machine-learning-bc4bff978-vkc7r:/usr/src/app# whoami
root
root@immich-machine-learning-bc4bff978-vkc7r:/usr/src/app# ls -la
total 29
drwxr-xr-x 1 root root 51 Mar 31 19:10 .
drwxr-xr-x 1 root root 17 Mar 23 22:59 ..
-rw-r--r-- 1 root root 5 Mar 23 22:58 .dockerignore
-rw-r--r-- 1 root root 39 Mar 23 22:58 .gitignore
drwxrwsrwx 2 root 2000 6 Mar 31 19:10 .reverse-geocoding-dump
-rw-r--r-- 1 root root 682 Mar 23 22:58 Dockerfile
-rw-r--r-- 1 root root 69 Mar 23 22:58 README.md
-rw-r--r-- 1 root root 837 Mar 23 22:58 gunicorn.conf.py
drwxr-xr-x 2 root root 21 Mar 23 22:58 src
drwxrwx--- 6 1000 2000 6 Mar 31 18:19 upload
root@immich-machine-learning-bc4bff978-vkc7r:/usr/src/app# cd upload/
bash: cd: upload/: Permission denied
bo0tzz
bo0tzz•3y ago
Looks like a user/file permissions issue
theautomation
theautomationOP•3y ago
Yup, gonna dive into this, thanks so far!
Alex Tran
Alex Tran•3y ago
try to bring down and bring the stack up
theautomation
theautomationOP•3y ago
Fixed it by adding the GID an UID env of the mountpoint owner hopefully it is not breaking anything else when using a non-root user
theautomation
theautomationOP•3y ago
Hm now when I search for a random word in the searchbar I get an
Internal server error (500 - Internal Server Error)
Internal server error (500 - Internal Server Error)
only when I am using a non-root user (GID UID) for the machine-learning container Looks like my UID doesn't have the right permissions to /.cache Is this a known issue ?
No description
Alex Tran
Alex Tran•3y ago
I think we encountered this
jrasm91
jrasm91•3y ago
If you're running under a non root guid you'll need to create a volume for that folder with read write permissions for the user your are running the container with.
theautomation
theautomationOP•3y ago
Thanks! I have made a EmptyDir volume (kubernetes ephemeral storage I am running immich in Kubernetes) and mount that into the container /.cache and that indeed work. So there is a
/cache
/cache
and a
/.cache
/.cache
folder? Must both be persistent storage or can it be ephemeral/temporary?
jrasm91
jrasm91•3y ago
Not 100% sure which one is used where but both are non-essential and would just mean redownloading ml models again probably

Did you find this page helpful?