I
Immich•3y ago
Quafley

Transcode job gets killed by failed video conversion.

Hi, I've recently added about 1800 videos to my instance of immich. I'm currently running immich within docker, see my docker-compose:
version: "3.6"
services:
immich:
container_name: "immich"
entrypoint:
- "/init"
environment:
- "DB_PASSWORD=SECRET"
- "DB_PORT=5432"
- "REDIS_PASSWORD=SECRET"
- "TZ=Europe/Berlin"
- "HOST_HOSTNAME=Hypnos"
- "DB_USERNAME=root"
- "DB_DATABASE_NAME=immich"
- "JWT_SECRET=SECRET"
- "PUID=99"
- "UMASK=022"
- "PGID=100"
- "HOST_OS=Unraid"
- "HOST_CONTAINERNAME=immich"
- "DB_HOSTNAME=postgreSQL"
- "REDIS_HOSTNAME=immich_redis"
- "REDIS_PORT=6379"
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- "HOME=/root"
- "LANGUAGE=en_US.UTF-8"
- "LANG=en_US.UTF-8"
- "TERM=xterm"
- "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0"
- "S6_VERBOSITY=1"
- "S6_STAGE2_HOOK=/docker-mods"
- "TRANSFORMERS_CACHE=/config/transformers"
- "SENTENCE_TRANSFORMERS_HOME=/config/transformers"
- "TYPESENSE_DATA_DIR=/config/typesense"
- "TYPESENSE_VERSION=0.24.0"
- "TYPESENSE_API_KEY=xyz"
- "TYPESENSE_HOST=127.0.0.1"
- "PUBLIC_IMMICH_SERVER_URL=http://127.0.0.1:3001"
- "IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003"
- "IMMICH_MEDIA_LOCATION=/photos"
- "NODE_ENV=production"
hostname: "afd4df3dae71"
image: "ghcr.io/imagegenius/immich"
ipc: "private"
labels:
build_version: "ImageGenius Version:- v1.54.1-ig90 Build-date:- 2023-04-23T13:54:22+10:00"
maintainer: "hydazz, martabal"
net.unraid.docker.icon: "https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png"
net.unraid.docker.managed: "dockerman"
net.unraid.docker.webui: "http://[IP]:[PORT:8080]"
org.opencontainers.image.authors: "imagegenius.io"
org.opencontainers.image.created: "2023-04-23T13:54:22+10:00"
org.opencontainers.image.description: "Immich is a high performance self-hosted\
\ photo and video backup solution."
org.opencontainers.image.documentation: "https://docs.linuxserver.io/images/docker-baseimage-ubuntu"
org.opencontainers.image.licenses: "GPL-3.0-only"
org.opencontainers.image.ref.name: "9eab155d41dd493c5274726f3e71521ba9a2bf59"
org.opencontainers.image.revision: "9eab155d41dd493c5274726f3e71521ba9a2bf59"
org.opencontainers.image.source: "https://github.com/imagegenius/docker-immich"
org.opencontainers.image.title: "Immich"
org.opencontainers.image.url: "https://github.com/imagegenius/docker-immich/packages"
org.opencontainers.image.vendor: "imagegenius.io"
org.opencontainers.image.version: "v1.54.1-ig90"
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "50m"
networks:
- "hypnosnet"
ports:
- "8585:8080/tcp"
volumes:
- "/mnt/user/media:/photos"
- "/mnt/user/appdata/immich:/config"
- "2e9ad17bdd79aeab289dddf46d56d2ad8eddb350acc85da8b23689228265af3c:/uploads"
working_dir: "/"
networks:
hypnosnet:
external: true
name: "hypnosnet"
volumes:
2e9ad17bdd79aeab289dddf46d56d2ad8eddb350acc85da8b23689228265af3c:
external: true
version: "3.6"
services:
immich:
container_name: "immich"
entrypoint:
- "/init"
environment:
- "DB_PASSWORD=SECRET"
- "DB_PORT=5432"
- "REDIS_PASSWORD=SECRET"
- "TZ=Europe/Berlin"
- "HOST_HOSTNAME=Hypnos"
- "DB_USERNAME=root"
- "DB_DATABASE_NAME=immich"
- "JWT_SECRET=SECRET"
- "PUID=99"
- "UMASK=022"
- "PGID=100"
- "HOST_OS=Unraid"
- "HOST_CONTAINERNAME=immich"
- "DB_HOSTNAME=postgreSQL"
- "REDIS_HOSTNAME=immich_redis"
- "REDIS_PORT=6379"
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- "HOME=/root"
- "LANGUAGE=en_US.UTF-8"
- "LANG=en_US.UTF-8"
- "TERM=xterm"
- "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0"
- "S6_VERBOSITY=1"
- "S6_STAGE2_HOOK=/docker-mods"
- "TRANSFORMERS_CACHE=/config/transformers"
- "SENTENCE_TRANSFORMERS_HOME=/config/transformers"
- "TYPESENSE_DATA_DIR=/config/typesense"
- "TYPESENSE_VERSION=0.24.0"
- "TYPESENSE_API_KEY=xyz"
- "TYPESENSE_HOST=127.0.0.1"
- "PUBLIC_IMMICH_SERVER_URL=http://127.0.0.1:3001"
- "IMMICH_MACHINE_LEARNING_URL=http://127.0.0.1:3003"
- "IMMICH_MEDIA_LOCATION=/photos"
- "NODE_ENV=production"
hostname: "afd4df3dae71"
image: "ghcr.io/imagegenius/immich"
ipc: "private"
labels:
build_version: "ImageGenius Version:- v1.54.1-ig90 Build-date:- 2023-04-23T13:54:22+10:00"
maintainer: "hydazz, martabal"
net.unraid.docker.icon: "https://raw.githubusercontent.com/imagegenius/templates/main/unraid/img/immich.png"
net.unraid.docker.managed: "dockerman"
net.unraid.docker.webui: "http://[IP]:[PORT:8080]"
org.opencontainers.image.authors: "imagegenius.io"
org.opencontainers.image.created: "2023-04-23T13:54:22+10:00"
org.opencontainers.image.description: "Immich is a high performance self-hosted\
\ photo and video backup solution."
org.opencontainers.image.documentation: "https://docs.linuxserver.io/images/docker-baseimage-ubuntu"
org.opencontainers.image.licenses: "GPL-3.0-only"
org.opencontainers.image.ref.name: "9eab155d41dd493c5274726f3e71521ba9a2bf59"
org.opencontainers.image.revision: "9eab155d41dd493c5274726f3e71521ba9a2bf59"
org.opencontainers.image.source: "https://github.com/imagegenius/docker-immich"
org.opencontainers.image.title: "Immich"
org.opencontainers.image.url: "https://github.com/imagegenius/docker-immich/packages"
org.opencontainers.image.vendor: "imagegenius.io"
org.opencontainers.image.version: "v1.54.1-ig90"
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "50m"
networks:
- "hypnosnet"
ports:
- "8585:8080/tcp"
volumes:
- "/mnt/user/media:/photos"
- "/mnt/user/appdata/immich:/config"
- "2e9ad17bdd79aeab289dddf46d56d2ad8eddb350acc85da8b23689228265af3c:/uploads"
working_dir: "/"
networks:
hypnosnet:
external: true
name: "hypnosnet"
volumes:
2e9ad17bdd79aeab289dddf46d56d2ad8eddb350acc85da8b23689228265af3c:
external: true
When starting the job, it seems to fail after about 5 minutes. By default the job displays 34 failed, when clicking on missing it goes up to somehwere in the 1600s and slowly goes down. (I assume it's checking all the videos if transcoding is necessary.) After some time it displays the following error message within my console:
130 Replies
Quafley
QuafleyOP•3y ago
Quafley
QuafleyOP•3y ago
Also: I'm on the latest build of immich, being the .1 version pushed this weekend. It looks like it fails on a particular transcode, but I wonder why it kill the whole job. It seems to also happen when starting the job for clip.
An error also seems to occur when activating the encode clip jon; /photos/library/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/2021/2021-01-12/20190815_123906_01.mp4: Invalid data found when processing input

at ChildProcess.<anonymous> (/app/immich/server/node_modules/fluent-ffmpeg/lib/ffprobe.js:233:22)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
[2023-04-23 19:45:38,549] ERROR in app: Exception on /sentence-transformer/encode-image [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/app/immich/machine-learning/src/main.py", line 49, in clip_encode_image
return model.encode(Image.open(assetPath)).tolist(), 200
File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/SentenceTransformer.py", line 161, in encode
features = self.tokenize(sentences_batch)
File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/SentenceTransformer.py", line 319, in tokenize
return self._first_module().tokenize(texts)
File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/models/CLIPModel.py", line 71, in tokenize
inputs = self.processor(text=texts_values, images=images, return_tensors="pt", padding=True)
File "/usr/local/lib/python3.10/dist-packages/transformers/models/clip/processing_clip.py", line 102, in __call__
image_features = self.image_processor(images, return_tensors=return_tensors, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/transformers/image_processing_utils.py", line 458, in __call__
return self.preprocess(images, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/transformers/models/clip/image_processing_clip.py", line 317, in preprocess
images = [convert_to_rgb(image) for image in images]
File "/usr/local/lib/python3.10/dist-packages/transformers/models/clip/image_processing_clip.py", line 317, in <listcomp>
images = [convert_to_rgb(image) for image in images]
File "/usr/local/lib/python3.10/dist-packages/transformers/image_transforms.py", line 743, in convert_to_rgb
image = image.convert("RGB")
File "/usr/local/lib/python3.10/dist-packages/PIL/Image.py", line 933, in convert
self.load()
File "/usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py", line 288, in load
raise_oserror(err_code)
File "/usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py", line 72, in raise_oserror
raise OSError(msg)
OSError: broken data stream when reading image file
127.0.0.1 - - [23/Apr/2023:19:45:38 +0200] "POST /sentence-transformer/encode-image HTTP/1.1" 500 265 "-" "axios/0.26.1"
[Nest] 614 - 04/23/2023, 7:45:38 PM ERROR [SmartInfoService] Unable run clip encoding pipeline: cfae805e-51cd-4a3b-99b1-a5473663659c
Error: Request failed with status code 500
at createError (/app/immich/server/node_modules/axios/lib/core/createError.js:16:15)
at settle (/app/immich/server/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/app/immich/server/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
An error also seems to occur when activating the encode clip jon; /photos/library/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/2021/2021-01-12/20190815_123906_01.mp4: Invalid data found when processing input

at ChildProcess.<anonymous> (/app/immich/server/node_modules/fluent-ffmpeg/lib/ffprobe.js:233:22)
at ChildProcess.emit (node:events:513:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
[2023-04-23 19:45:38,549] ERROR in app: Exception on /sentence-transformer/encode-image [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/app/immich/machine-learning/src/main.py", line 49, in clip_encode_image
return model.encode(Image.open(assetPath)).tolist(), 200
File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/SentenceTransformer.py", line 161, in encode
features = self.tokenize(sentences_batch)
File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/SentenceTransformer.py", line 319, in tokenize
return self._first_module().tokenize(texts)
File "/usr/local/lib/python3.10/dist-packages/sentence_transformers/models/CLIPModel.py", line 71, in tokenize
inputs = self.processor(text=texts_values, images=images, return_tensors="pt", padding=True)
File "/usr/local/lib/python3.10/dist-packages/transformers/models/clip/processing_clip.py", line 102, in __call__
image_features = self.image_processor(images, return_tensors=return_tensors, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/transformers/image_processing_utils.py", line 458, in __call__
return self.preprocess(images, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/transformers/models/clip/image_processing_clip.py", line 317, in preprocess
images = [convert_to_rgb(image) for image in images]
File "/usr/local/lib/python3.10/dist-packages/transformers/models/clip/image_processing_clip.py", line 317, in <listcomp>
images = [convert_to_rgb(image) for image in images]
File "/usr/local/lib/python3.10/dist-packages/transformers/image_transforms.py", line 743, in convert_to_rgb
image = image.convert("RGB")
File "/usr/local/lib/python3.10/dist-packages/PIL/Image.py", line 933, in convert
self.load()
File "/usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py", line 288, in load
raise_oserror(err_code)
File "/usr/local/lib/python3.10/dist-packages/PIL/ImageFile.py", line 72, in raise_oserror
raise OSError(msg)
OSError: broken data stream when reading image file
127.0.0.1 - - [23/Apr/2023:19:45:38 +0200] "POST /sentence-transformer/encode-image HTTP/1.1" 500 265 "-" "axios/0.26.1"
[Nest] 614 - 04/23/2023, 7:45:38 PM ERROR [SmartInfoService] Unable run clip encoding pipeline: cfae805e-51cd-4a3b-99b1-a5473663659c
Error: Request failed with status code 500
at createError (/app/immich/server/node_modules/axios/lib/core/createError.js:16:15)
at settle (/app/immich/server/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/app/immich/server/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
bo0tzz
bo0tzz•3y ago
What tells you it's killing the whole job? The failure is for just one asset, it should still continue with the rest
Quafley
QuafleyOP•3y ago
Because the job stops running right after this error. I also know its failing since the .avi isn't transcoded. And it does not match any of the ids mentioned within the log. It being 7bd56e83-943a-46ab-bc00-3adb087bbaba
bo0tzz
bo0tzz•3y ago
The job for the failed asset would stop, but the queue for the rest should keep going
Quafley
QuafleyOP•3y ago
Now that I look at it, there are tons of errors being generated by the different jobs I take back what I said, it indeed finishes the job @bo0tzz. I was too quick to judge, however I wonder why it generates those errors. At the same time it does not seem to transcode my .avi recordings at all, leaving them un-transcoded.
Quafley
QuafleyOP•3y ago
When starting the Generate Thumbnail job, it seems to do the following
Quafley
QuafleyOP•3y ago
When extracting metadata it does the following for many of my assets:
Quafley
QuafleyOP•3y ago
WIth regards to the encode clip job, this one gets killed straight away and seems to be totally borked. These are basically my issues with the job's at the moment, hopefully my logs provide some detail and can be helpful.
bo0tzz
bo0tzz•3y ago
I haven't looked deeply but it seems like the files are broken in some way
Quafley
QuafleyOP•3y ago
I'll have a look the files in MetaExtractionProcessor are fine Lots of information is provided for SAN&0020.JPG for example, this feels more like some bug than anything else: type timestamp with time zone: "0NaN-NaN-NaNTNaN:NaN:NaN.NaN+NaN:NaN"
bo0tzz
bo0tzz•3y ago
Did the files come from Google photos?
Quafley
QuafleyOP•3y ago
nope All photos are either ripped from an SD-card or mobile phones. This one is actually from a SANYO digital camera
Quafley
QuafleyOP•3y ago
No description
Quafley
QuafleyOP•3y ago
more than enough metadata to extract What I don't understand is why it seems to error out on timestamp time zone
Quafley
QuafleyOP•3y ago
Such as this avi file, which is not being transcoded:
No description
Quafley
QuafleyOP•3y ago
No description
Quafley
QuafleyOP•3y ago
just providing as much info as I can :)
Alex Tran
Alex Tran•3y ago
There pretty old file might not have the correct EXIF header thus you see some of the erros But failing on one job and killing the whole thing is new to us If you can track down this one /photos/library/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/2021/2021-01-12/20190815_123906_01.mp4 and if it is something you can share that would be helpful
Quafley
QuafleyOP•3y ago
will have a look sec Alright, so bit of an odd one if you ask me. The file seems to be corrupted. At least, for as far as I can see.
Alex Tran
Alex Tran•3y ago
is it corrupted on the original file? i.e from your sdcard
Quafley
QuafleyOP•3y ago
Well, this one is actually from my phone I believe. But it's a bit odd, since the 2021-01-12 folder contains two files. One that shouldn't be there at all, because it's a video shot in 2019. When I look at the timeline it also isn't there.
Alex Tran
Alex Tran•3y ago
probably it hasn't gone through the pipeline so no thumbnail to show
Quafley
QuafleyOP•3y ago
perhaps yes I will have to manually remove the mp4 killing the clip job, however I find it weird how that one got corrupted.
Alex Tran
Alex Tran•3y ago
depends on your hardware, 1800 video might take a while to finish everything
Quafley
QuafleyOP•3y ago
Well the job says it isn't running
Alex Tran
Alex Tran•3y ago
I encountered a few situation where the file on the phone are corrupted and they could cause issue
Quafley
QuafleyOP•3y ago
interesting Well in that case I will remove this file and see if the clip job runs
Alex Tran
Alex Tran•3y ago
It was an FYI
Quafley
QuafleyOP•3y ago
Yes, thanks. It does however skip over .avi files it seems?
Alex Tran
Alex Tran•3y ago
I can't confirm on top of my head if AVI is supported entirely You can download a sample AVI file and upload on the web to see if it shows up
Quafley
QuafleyOP•3y ago
encode clip gives me the following after removing the before-mentioned mp4
Quafley
QuafleyOP•3y ago
after that it seems to repeatedly do this:
[Nest] 181 - 04/23/2023, 8:30:25 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:25 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:25 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:25 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:54 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:54 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:25 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:25 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:25 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:25 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:54 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
[Nest] 181 - 04/23/2023, 8:30:54 PM ERROR [ExpressAdapter] Premature close
Error [ERR_STREAM_PREMATURE_CLOSE]: Premature close
at new NodeError (node:internal/errors:387:5)
at ServerResponse.onclose (node:internal/streams/end-of-stream:145:30)
at ServerResponse.emit (node:events:525:35)
at Socket.onServerResponseClose (node:_http_server:275:23)
at Socket.emit (node:events:525:35)
at TCP.<anonymous> (node:net:301:12)
it does, and it also playbacks which makes it even more odd. Is it possible to remove all the transcoded videos? And run the job fresh?
[Nest] 609 - 04/23/2023, 8:50:53 PM LOG [MediaService] Start Generating Video Thumbnail
[Nest] 609 - 04/23/2023, 8:50:53 PM LOG [MediaService] Start encoding video 1028f4d4-99dc-4e6c-b35a-a3f37abe405b -crf 17,-preset ultrafast,-vcodec h264,-acodec aac,-movflags faststart
[Nest] 609 - 04/23/2023, 8:50:53 PM LOG [MediaService] Generating Video Thumbnail Success 1028f4d4-99dc-4e6c-b35a-a3f37abe405b
127.0.0.1 - - [23/Apr/2023:20:50:55 +0200] "POST /image-classifier/tag-image HTTP/1.1" 200 3 "-" "axios/0.26.1"
127.0.0.1 - - [23/Apr/2023:20:50:57 +0200] "POST /object-detection/detect-object HTTP/1.1" 200 3 "-" "axios/0.26.1"
[Nest] 609 - 04/23/2023, 8:50:57 PM LOG [MediaService] Encoding success 1028f4d4-99dc-4e6c-b35a-a3f37abe405b
[Nest] 609 - 04/23/2023, 8:50:53 PM LOG [MediaService] Start Generating Video Thumbnail
[Nest] 609 - 04/23/2023, 8:50:53 PM LOG [MediaService] Start encoding video 1028f4d4-99dc-4e6c-b35a-a3f37abe405b -crf 17,-preset ultrafast,-vcodec h264,-acodec aac,-movflags faststart
[Nest] 609 - 04/23/2023, 8:50:53 PM LOG [MediaService] Generating Video Thumbnail Success 1028f4d4-99dc-4e6c-b35a-a3f37abe405b
127.0.0.1 - - [23/Apr/2023:20:50:55 +0200] "POST /image-classifier/tag-image HTTP/1.1" 200 3 "-" "axios/0.26.1"
127.0.0.1 - - [23/Apr/2023:20:50:57 +0200] "POST /object-detection/detect-object HTTP/1.1" 200 3 "-" "axios/0.26.1"
[Nest] 609 - 04/23/2023, 8:50:57 PM LOG [MediaService] Encoding success 1028f4d4-99dc-4e6c-b35a-a3f37abe405b
are the logs for the example avi file so I'm beginning to think it tried transcoding it, failed and now there is a corrupt file somewhere in the transcoded library that doesn't want to playback.
Quafley
QuafleyOP•3y ago
hm big chance that might actually be the case:
No description
Quafley
QuafleyOP•3y ago
When I download this mp4 file, it downloads it as a .3gp Checked other avi videos in my library, older ones all seem to be in their original state, while some have been transcoded. So to best test this I would say removing all transcoded media and re-running the job. But I don't know what to exactly delete
Alex Tran
Alex Tran•3y ago
These error happen when you try to play video on the web and it can be ignored Have you tried on Chrome? I know there are some issue with Firefox playback
Quafley
QuafleyOP•3y ago
Well, it happens on Firefox and my Android devices. I have not testen another browser Android generates weird artifacts
Quafley
QuafleyOP•3y ago
No description
Alex Tran
Alex Tran•3y ago
I would guess there is something wrong with the trans coding process for AVI
Quafley
QuafleyOP•3y ago
The thing is, it did correctly do the sample avi file.
Alex Tran
Alex Tran•3y ago
maybe track down that AVI file of yours and retest it?
Quafley
QuafleyOP•3y ago
But yeah, something is going wrong. But I can seem to find it within the logs How would I try it on 1 file? The erroes at the beginning of the post aren't related to the avi files
Alex Tran
Alex Tran•3y ago
there might have a few things going on with the batch you upload so let's try figuring out one by one
Quafley
QuafleyOP•3y ago
Ah you mean manually upload it again?
Alex Tran
Alex Tran•3y ago
Yes
Quafley
QuafleyOP•3y ago
Ah okay, I will test this tomorrow. I'll report back on this, curious what that will do Alright @Alex, I downloaded the .AVI and re-uploaded it. Before doing this I went over to edge and it played the .AVI file without issue, and on firefox it didn't playback, nor does it playback on my android device This is what the console shows;
[Nest] 607 - 04/24/2023, 5:22:05 PM LOG [MediaService] Start Generating Video Thumbnail
[Nest] 607 - 04/24/2023, 5:22:05 PM LOG [MediaService] Start encoding video 162db31a-7694-49a9-b45b-b78294954c9c -crf 17,-preset ultrafast,-vcodec h264,-acodec aac,-movflags faststart
[Nest] 607 - 04/24/2023, 5:22:05 PM LOG [MediaService] Generating Video Thumbnail Success 162db31a-7694-49a9-b45b-b78294954c9c
[Nest] 607 - 04/24/2023, 5:22:05 PM LOG [MediaService] Encoding success 162db31a-7694-49a9-b45b-b78294954c9c
127.0.0.1 - - [24/Apr/2023:17:22:06 +0200] "POST /sentence-transformer/encode-image HTTP/1.1" 200 10290 "-" "axios/0.26.1"
127.0.0.1 - - [24/Apr/2023:17:22:06 +0200] "POST /image-classifier/tag-image HTTP/1.1" 200 3 "-" "axios/0.26.1"
127.0.0.1 - - [24/Apr/2023:17:22:07 +0200] "POST /object-detection/detect-object HTTP/1.1" 200 3 "-" "axios/0.26.1"
[Nest] 607 - 04/24/2023, 5:22:05 PM LOG [MediaService] Start Generating Video Thumbnail
[Nest] 607 - 04/24/2023, 5:22:05 PM LOG [MediaService] Start encoding video 162db31a-7694-49a9-b45b-b78294954c9c -crf 17,-preset ultrafast,-vcodec h264,-acodec aac,-movflags faststart
[Nest] 607 - 04/24/2023, 5:22:05 PM LOG [MediaService] Generating Video Thumbnail Success 162db31a-7694-49a9-b45b-b78294954c9c
[Nest] 607 - 04/24/2023, 5:22:05 PM LOG [MediaService] Encoding success 162db31a-7694-49a9-b45b-b78294954c9c
127.0.0.1 - - [24/Apr/2023:17:22:06 +0200] "POST /sentence-transformer/encode-image HTTP/1.1" 200 10290 "-" "axios/0.26.1"
127.0.0.1 - - [24/Apr/2023:17:22:06 +0200] "POST /image-classifier/tag-image HTTP/1.1" 200 3 "-" "axios/0.26.1"
127.0.0.1 - - [24/Apr/2023:17:22:07 +0200] "POST /object-detection/detect-object HTTP/1.1" 200 3 "-" "axios/0.26.1"
However, when navigating to the asset it becomes clear that I can still not playback it on firefox, and it is still in .AVI format, as my settings are set to transcode if not in desired format, it should've transcoded this video file right?
Quafley
QuafleyOP•3y ago
When looking in the directory encoded-videos I've searched up the UUID of the image and it came back with a playable .mp4 file.
No description
Quafley
QuafleyOP•3y ago
No description
Alex Tran
Alex Tran•3y ago
Is the file something you can share with?
Quafley
QuafleyOP•3y ago
Yes I can, but in private DM if you don't mind.
Alex Tran
Alex Tran•3y ago
Yes please Can you zip it up?
Quafley
QuafleyOP•3y ago
oh sure thing one moment I will also include the encoded-video There are other .AVI files with the exact same issue. Oh btw, if there is specific things you need such as more examples. Let me know Alex, more than happy to provide :) @Alex you managed to find something odd in the file? 😃
Alex Tran
Alex Tran•3y ago
I haven't looked at it yet'
Quafley
QuafleyOP•3y ago
Oh no problem!
Alex Tran
Alex Tran•3y ago
Yeah diving in facial recognition feature at the moment 😛 will circle back to this error later
Quafley
QuafleyOP•2y ago
Oooh, you don't even know how excited I am for that hah The one I find most curious is this one, which doesn't really seem to be related to any file. Well it was, but it still crashes @Alex I just tried running the clip encoding job again, but it still fails on activation. Are you experiencing the same issue, and is there a way to quote on quote "reset it"?
Alex Tran
Alex Tran•2y ago
You can bring down the stack, remove redis and microservices container then bring up the stack again
Quafley
QuafleyOP•2y ago
I'm beginning to have the feeling it might be due to the way I have it installed. I'm making use of unRAID, and I installed it by using the community app. It worked, so I didn't really look back at it.
No description
Quafley
QuafleyOP•2y ago
Using a postgreSQL database and redis seperately.
bo0tzz
bo0tzz•2y ago
That's a different image & deployment method so we can't really diagnose and help if it's causing issues
bo0tzz
bo0tzz•2y ago
Unraid | Immich
Immich can easily be installed and updated on Unraid via:
Quafley
QuafleyOP•2y ago
Well that is the thing, I don't know if it is related to that as it is very specific hm I can generate a compose file pretty easily, and it doesn't look at all weird to be honest. but, I do agree is it hard to troubleshoot this. I will do it the official way and report back. The only thing I would like to know beforehand is if I can keep my current configuration e.g., Redis DB and postgreSQL
bo0tzz
bo0tzz•2y ago
If you keep your postgres database and library volume, everything should still be there after you move (but take backups to be sure)
Quafley
QuafleyOP•2y ago
I backup daily off-site so I'm good there. Alright, I will report back on this with my findings. As this might also be beneficial for other unRAID users attempting the arguably "easier way" out. Did I do this correctly if I have an existing database?
version: "3.8"

services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:release
entrypoint: ["/bin/sh", "./start-server.sh"]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
env_file:
- .env
depends_on:
- redis
# - database
- typesense
restart: always

immich-microservices:
container_name: immich_microservices
image: ghcr.io/immich-app/immich-server:release
entrypoint: ["/bin/sh", "./start-microservices.sh"]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
env_file:
- .env
depends_on:
- redis
# - database
- typesense
restart: always

immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:release
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- model-cache:/cache
env_file:
- .env
restart: always

immich-web:
container_name: immich_web
image: ghcr.io/immich-app/immich-web:release
entrypoint: ["/bin/sh", "./entrypoint.sh"]
env_file:
- .env
restart: always

typesense:
container_name: immich_typesense
image: typesense/typesense:0.24.0
environment:
- TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
- TYPESENSE_DATA_DIR=/data
logging:
driver: none
volumes:
- tsdata:/data
restart: always

redis:
container_name: immich_redis
image: redis:6.2
restart: always

# database:
# container_name: immich_postgres
# image: postgres:14
# env_file:
# - .env
# environment:
# POSTGRES_PASSWORD: ${DB_PASSWORD}
# POSTGRES_USER: ${DB_USERNAME}
# POSTGRES_DB: ${DB_DATABASE_NAME}
# PG_DATA: /var/lib/postgresql/data
# volumes:
# - pgdata:/var/lib/postgresql/data
# restart: always

immich-proxy:
container_name: immich_proxy
image: ghcr.io/immich-app/immich-proxy:release
environment:
# Make sure these values get passed through from the env file
- IMMICH_SERVER_URL
- IMMICH_WEB_URL
ports:
- 2283:8080
logging:
driver: none
depends_on:
- immich-server
restart: always

#volumes:
# pgdata:
# model-cache:
# tsdata:
version: "3.8"

services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:release
entrypoint: ["/bin/sh", "./start-server.sh"]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
env_file:
- .env
depends_on:
- redis
# - database
- typesense
restart: always

immich-microservices:
container_name: immich_microservices
image: ghcr.io/immich-app/immich-server:release
entrypoint: ["/bin/sh", "./start-microservices.sh"]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
env_file:
- .env
depends_on:
- redis
# - database
- typesense
restart: always

immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:release
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- model-cache:/cache
env_file:
- .env
restart: always

immich-web:
container_name: immich_web
image: ghcr.io/immich-app/immich-web:release
entrypoint: ["/bin/sh", "./entrypoint.sh"]
env_file:
- .env
restart: always

typesense:
container_name: immich_typesense
image: typesense/typesense:0.24.0
environment:
- TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
- TYPESENSE_DATA_DIR=/data
logging:
driver: none
volumes:
- tsdata:/data
restart: always

redis:
container_name: immich_redis
image: redis:6.2
restart: always

# database:
# container_name: immich_postgres
# image: postgres:14
# env_file:
# - .env
# environment:
# POSTGRES_PASSWORD: ${DB_PASSWORD}
# POSTGRES_USER: ${DB_USERNAME}
# POSTGRES_DB: ${DB_DATABASE_NAME}
# PG_DATA: /var/lib/postgresql/data
# volumes:
# - pgdata:/var/lib/postgresql/data
# restart: always

immich-proxy:
container_name: immich_proxy
image: ghcr.io/immich-app/immich-proxy:release
environment:
# Make sure these values get passed through from the env file
- IMMICH_SERVER_URL
- IMMICH_WEB_URL
ports:
- 2283:8080
logging:
driver: none
depends_on:
- immich-server
restart: always

#volumes:
# pgdata:
# model-cache:
# tsdata:
I actually also have a seperate redis container
bo0tzz
bo0tzz•2y ago
Assuming you pointed to your db in the .env, yes and you probably still want the model-cache and tsdata volumes
Quafley
QuafleyOP•2y ago
Meaning I would need to uncomment volumes: and the two you mentioned ah I see how it is structured. Hadn't taken a look at the .env yet Any specific reasoning why versions are set for typesense and redis within the .env?
Quafley
QuafleyOP•2y ago
If I want it to work in the same was as I had it before, would I need to submit UPLOAD_LOCATION=/mnt/user/media? https://i.imgur.com/R25hqk7.png
Imgur
Quafley
QuafleyOP•2y ago
At the same time immich used to store some things within the folder:
No description
Quafley
QuafleyOP•2y ago
It is also using it's own network, which I preferably don't want as I want it to use my own docker network so I can easily expose it with my reverse proxy like, where does the appdata go
Quafley
QuafleyOP•2y ago
This is what it looked like before:
No description
Quafley
QuafleyOP•2y ago
I could add - "/mnt/user/appdata/immich:/config" but I don't know how how the different containers react to this. And also add
networks:
hypnosnet:
external: true
name: "hypnosnet"
networks:
hypnosnet:
external: true
name: "hypnosnet"
What are you guys tips on this? I want to replicate my old setup where config was in /mnt/user/appdata/immich and my uploads and other data such as encoded-videos, thumbs, library under /mnt/user/media @bo0tzz Sorry to tag you, but would you be able to answer my questions? :)
bo0tzz
bo0tzz•2y ago
I don't see any versions set, which part do you mean? Yes This is stuff from the imagegenius container, you don't need it with our setup You can add a container to multiple networks with docker compose, so you can add your reverse proxy's network to the immich_proxy container and link them that way Immich's data is in the postgres database and the library folder. The volumes in the docker-compose (model-cache and tsdata) are automatically generated by docker, they don't need backing up
Quafley
QuafleyOP•2y ago
I was referring to this:
redis:
container_name: immich_redis
image: redis:6.2
restart: always
redis:
container_name: immich_redis
image: redis:6.2
restart: always
typesense:
container_name: immich_typesense
image: typesense/typesense:0.24.0
typesense:
container_name: immich_typesense
image: typesense/typesense:0.24.0
bo0tzz
bo0tzz•2y ago
Because those are the versions we support & develop Immich against It's good practice to always set a particular version, rather than just using latest (which could really be anything)
Quafley
QuafleyOP•2y ago
Okay, I am however making use of Postgres 15
bo0tzz
bo0tzz•2y ago
That should be ok
Quafley
QuafleyOP•2y ago
Didn't encounter issues before so. Thanks for this.
bo0tzz
bo0tzz•2y ago
The main reason it's not 15 in our default compose is because we haven't updated and tested yet 😛
Quafley
QuafleyOP•2y ago
like this?
immich-proxy:
container_name: immich_proxy
image: ghcr.io/immich-app/immich-proxy:release
environment:
# Make sure these values get passed through from the env file
- IMMICH_SERVER_URL
- IMMICH_WEB_URL
ports:
- 2283:8080
logging:
driver: none
depends_on:
- immich-server
networks:
- "hypnosnet"
restart: always
immich-proxy:
container_name: immich_proxy
image: ghcr.io/immich-app/immich-proxy:release
environment:
# Make sure these values get passed through from the env file
- IMMICH_SERVER_URL
- IMMICH_WEB_URL
ports:
- 2283:8080
logging:
driver: none
depends_on:
- immich-server
networks:
- "hypnosnet"
restart: always
Sorry if I am asking dumb questions, not used to doing it this way :) fair haha Alright, thanks! That helps a lot, now it's basically down to getting the container in the same network as my swag reverse proxy. Which is in the network named "hypnosnet" edited the config I sent, it should be that. Not sure if I also need to define the immich_default network as well now.
bo0tzz
bo0tzz•2y ago
You might need to, I'm not sure, it's been quite a while since I've done anything like that in compose myself 😅
Quafley
QuafleyOP•2y ago
I will add it just to be sure okay I managed to get it to work I added:
networks:
- "hypnosnet"
networks:
- "hypnosnet"
to all containers resulting in them all being in my own custom docker network
Quafley
QuafleyOP•2y ago
No description
Quafley
QuafleyOP•2y ago
now I need to fix my reverse proxy lol and that works as well good Alright, I can access the user interface and everything seems to be exactly the same (thank god lol). I will now test if things are still reporting the same issues hm
Quafley
QuafleyOP•2y ago
When I try to open images, it does not load them. Big chance these images are still in cache. At the same time the clip job is also failing, but I'm beginning to get the feeling it might be path related?
172.18.0.42 - - [05/May/2023:20:52:05 +0000] "POST /sentence-transformer/encode-image HTTP/1.1" 500 265 "-" "axios/0.26.1"
[2023-05-05 20:52:51,912] ERROR in app: Exception on /sentence-transformer/encode-image [POST]
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/opt/venv/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/venv/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/venv/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/src/app/src/main.py", line 49, in clip_encode_image
return model.encode(Image.open(assetPath)).tolist(), 200
File "/opt/venv/lib/python3.10/site-packages/PIL/Image.py", line 3236, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/photos/thumbs/b8fe339b-311d-46b2-8d14-fd5a818dc183/cfae805e-51cd-4a3b-99b1-a5473663659c.jpeg'
172.18.0.42 - - [05/May/2023:20:52:51 +0000] "POST /sentence-transformer/encode-image HTTP/1.1" 500 265 "-" "axios/0.26.1"
172.18.0.42 - - [05/May/2023:20:52:05 +0000] "POST /sentence-transformer/encode-image HTTP/1.1" 500 265 "-" "axios/0.26.1"
[2023-05-05 20:52:51,912] ERROR in app: Exception on /sentence-transformer/encode-image [POST]
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/opt/venv/lib/python3.10/site-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/venv/lib/python3.10/site-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/venv/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/src/app/src/main.py", line 49, in clip_encode_image
return model.encode(Image.open(assetPath)).tolist(), 200
File "/opt/venv/lib/python3.10/site-packages/PIL/Image.py", line 3236, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/photos/thumbs/b8fe339b-311d-46b2-8d14-fd5a818dc183/cfae805e-51cd-4a3b-99b1-a5473663659c.jpeg'
172.18.0.42 - - [05/May/2023:20:52:51 +0000] "POST /sentence-transformer/encode-image HTTP/1.1" 500 265 "-" "axios/0.26.1"
Quafley
QuafleyOP•2y ago
Same for within immich-server logs:
Error: ENOENT: no such file or directory, stat '/photos/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/09da1251-22bf-4a84-98d9-4813158fe0f4.webp'
[Nest] 1 - 05/05/2023, 8:55:28 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat '/photos/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/e88bed29-8e3f-4355-b043-67a2d331744f.webp'
Error: ENOENT: no such file or directory, stat '/photos/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/e88bed29-8e3f-4355-b043-67a2d331744f.webp'
[Nest] 1 - 05/05/2023, 8:55:28 PM ERROR [AssetService] Error serving VIDEO asset=1527d136-e768-448b-ae41-8e33563f44f9
[Nest] 1 - 05/05/2023, 8:55:31 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat '/photos/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/ea0f8c7c-9629-47ac-84ed-6abe6ca9de4c.jpeg'
Error: ENOENT: no such file or directory, stat '/photos/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/09da1251-22bf-4a84-98d9-4813158fe0f4.webp'
[Nest] 1 - 05/05/2023, 8:55:28 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat '/photos/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/e88bed29-8e3f-4355-b043-67a2d331744f.webp'
Error: ENOENT: no such file or directory, stat '/photos/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/e88bed29-8e3f-4355-b043-67a2d331744f.webp'
[Nest] 1 - 05/05/2023, 8:55:28 PM ERROR [AssetService] Error serving VIDEO asset=1527d136-e768-448b-ae41-8e33563f44f9
[Nest] 1 - 05/05/2023, 8:55:31 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat '/photos/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/ea0f8c7c-9629-47ac-84ed-6abe6ca9de4c.jpeg'
bit lost on how to resolve this one though haha. I did get a lot further now, and the job doesn't error out straight away like it did before. This seems to be a mapping issue. Would you happen to know how this can be easily resolved? It is mostlikely something within database right?
bo0tzz
bo0tzz•2y ago
Try running the generate thumbnails job first?
Quafley
QuafleyOP•2y ago
hm I could perhaps that helps but it doesn't open the image itself either I am wondering if it is still seeing the same path as expected
[Nest] 1 - 05/05/2023, 9:26:12 PM ERROR [MediaService] Failed to generate thumbnail for asset: f0a0ca0a-bb19-4ec4-8084-1cf1a674ec4e/IMAGE
Error: File not found - /photos/library/790ea9b9-404b-4233-ae86-48d54db701dc/2017/2017-05-30/IMG_2024+1.JPG
at BinaryExtractionTask.parser (/usr/src/app/node_modules/exiftool-vendored/dist/ExifToolTask.js:41:29)
at BinaryExtractionTask._Task_resolve (/usr/src/app/node_modules/batch-cluster/dist/Task.js:146:40)
[Nest] 1 - 05/05/2023, 9:26:12 PM ERROR [MediaService] Failed to generate thumbnail for asset: a7a93bc4-a8c2-4151-91a3-70926c000e31/IMAGE
Error: File not found - /photos/library/790ea9b9-404b-4233-ae86-48d54db701dc/2017/2017-07-31/IMG_2290+1.JPG
at BinaryExtractionTask.parser (/usr/src/app/node_modules/exiftool-vendored/dist/ExifToolTask.js:41:29)
at BinaryExtractionTask._Task_resolve (/usr/src/app/node_modules/batch-cluster/dist/Task.js:146:40)
[Nest] 1 - 05/05/2023, 9:26:12 PM ERROR [MediaService] Failed to generate thumbnail for asset: 6c980d6b-7ea6-4b91-ad2b-9a8762051285/IMAGE
Error: File not found - /photos/library/790ea9b9-404b-4233-ae86-48d54db701dc/2017/2017-08-07/IMG_2310.JPG
at BinaryExtractionTask.parser (/usr/src/app/node_modules/exiftool-vendored/dist/ExifToolTask.js:41:29)
at BinaryExtractionTask._Task_resolve (/usr/src/app/node_modules/batch-cluster/dist/Task.js:146:40)
[Nest] 1 - 05/05/2023, 9:26:12 PM ERROR [MediaService] Failed to generate thumbnail for asset: f0a0ca0a-bb19-4ec4-8084-1cf1a674ec4e/IMAGE
Error: File not found - /photos/library/790ea9b9-404b-4233-ae86-48d54db701dc/2017/2017-05-30/IMG_2024+1.JPG
at BinaryExtractionTask.parser (/usr/src/app/node_modules/exiftool-vendored/dist/ExifToolTask.js:41:29)
at BinaryExtractionTask._Task_resolve (/usr/src/app/node_modules/batch-cluster/dist/Task.js:146:40)
[Nest] 1 - 05/05/2023, 9:26:12 PM ERROR [MediaService] Failed to generate thumbnail for asset: a7a93bc4-a8c2-4151-91a3-70926c000e31/IMAGE
Error: File not found - /photos/library/790ea9b9-404b-4233-ae86-48d54db701dc/2017/2017-07-31/IMG_2290+1.JPG
at BinaryExtractionTask.parser (/usr/src/app/node_modules/exiftool-vendored/dist/ExifToolTask.js:41:29)
at BinaryExtractionTask._Task_resolve (/usr/src/app/node_modules/batch-cluster/dist/Task.js:146:40)
[Nest] 1 - 05/05/2023, 9:26:12 PM ERROR [MediaService] Failed to generate thumbnail for asset: 6c980d6b-7ea6-4b91-ad2b-9a8762051285/IMAGE
Error: File not found - /photos/library/790ea9b9-404b-4233-ae86-48d54db701dc/2017/2017-08-07/IMG_2310.JPG
at BinaryExtractionTask.parser (/usr/src/app/node_modules/exiftool-vendored/dist/ExifToolTask.js:41:29)
at BinaryExtractionTask._Task_resolve (/usr/src/app/node_modules/batch-cluster/dist/Task.js:146:40)
I'm beginning to think there is a difference in path with the official docker compose and unoffcial image The old compose had:
- "IMMICH_MEDIA_LOCATION=/photos"
- "IMMICH_MEDIA_LOCATION=/photos"
Whilst this one only has this:
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
When I upload new images, I am able to view them So my presumption is that something isn't right within the database, however I don't know how to resolve this issue.
bo0tzz
bo0tzz•2y ago
How old was your instance before this?
Quafley
QuafleyOP•2y ago
1 month? but there is something underlying with the paths of the files
bo0tzz
bo0tzz•2y ago
Hmm, database should be OK then. Make sure the mount path of your library is correct etc
Quafley
QuafleyOP•2y ago
it got uploaded in the correct place, which is good.
bo0tzz
bo0tzz•2y ago
I'm off to bed so can't help any further for now
Quafley
QuafleyOP•2y ago
No issue, I'm going to pause this for a bit as well. But it is odd to me how it completly seemed to have lost the other assets while the new upload goes in the exact same library. being media\library\0eecf5ad-50a8-4a0d-9bfc-10d807df6191\2023\2023-02-27 for this image Thanks though, appreciate you taking the time to help me out
Quafley
QuafleyOP•2y ago
as expected, the database has the wrong orginalPath set. https://i.imgur.com/klyuwbE.png I'm starting to wonder to what extent it is possible to reverse this. @Alex I'm tagging you as well, in the hopes you might've encountered this before. I am able to change the path, but my knowledge is limited when it comes to databases. I don't know to what extent I am able to mass edit this. The old path seems to be /photos/library/ The new path seems to be /upload/library As can be seen be the export I did on the db:
c72ab56e-5c9f-4290-87d9-2e38876e1a35,IMG_9931.jpg-1959226,790ea9b9-404b-4233-ae86-48d54db701dc,CLI,IMAGE,/photos/library/790ea9b9-404b-4233-ae86-48d54db701dc/2022/2022-01-21/IMG_9931.jpg,/photos/thumbs/790ea9b9-404b-4233-ae86-48d54db701dc/c72ab56e-5c9f-4290-87d9-2e38876e1a35.jpeg,2022-01-21 15:59:12+01,2022-01-21 21:05:08+01,f,image/jpeg,"0:00:00.000000",/photos/thumbs/790ea9b9-404b-4233-ae86-48d54db701dc/c72ab56e-5c9f-4290-87d9-2e38876e1a35.webp,,\xa06dc19e580b87dd9d924e098f08028bfbd54b2d,t,,2023-05-03 13:07:12.340164+02,2023-05-03 13:06:04.671901+02,f,IMG_9931

bb985f36-9660-4c90-bba4-73823dfa0838,web-f97nfb7wkska1.webp-1677524083768,"0eecf5ad-50a8-4a0d-9bfc-10d807df6191",WEB,IMAGE,upload/library/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/2023/2023-02-27/f97nfb7wkska1.webp,upload/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/bb985f36-9660-4c90-bba4-73823dfa0838.jpeg,2023-02-27 19:54:43.768+01,2023-02-27 19:54:43.768+01,f,image/webp,"0:00:00.000000",upload/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/bb985f36-9660-4c90-bba4-73823dfa0838.webp,,\xe61b32e672861ac0e8202712aa1fda7385969482,t,,2023-05-05 23:29:20.349096+02,2023-05-05 23:29:19.972756+02,f,f97nfb7wkska1
c72ab56e-5c9f-4290-87d9-2e38876e1a35,IMG_9931.jpg-1959226,790ea9b9-404b-4233-ae86-48d54db701dc,CLI,IMAGE,/photos/library/790ea9b9-404b-4233-ae86-48d54db701dc/2022/2022-01-21/IMG_9931.jpg,/photos/thumbs/790ea9b9-404b-4233-ae86-48d54db701dc/c72ab56e-5c9f-4290-87d9-2e38876e1a35.jpeg,2022-01-21 15:59:12+01,2022-01-21 21:05:08+01,f,image/jpeg,"0:00:00.000000",/photos/thumbs/790ea9b9-404b-4233-ae86-48d54db701dc/c72ab56e-5c9f-4290-87d9-2e38876e1a35.webp,,\xa06dc19e580b87dd9d924e098f08028bfbd54b2d,t,,2023-05-03 13:07:12.340164+02,2023-05-03 13:06:04.671901+02,f,IMG_9931

bb985f36-9660-4c90-bba4-73823dfa0838,web-f97nfb7wkska1.webp-1677524083768,"0eecf5ad-50a8-4a0d-9bfc-10d807df6191",WEB,IMAGE,upload/library/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/2023/2023-02-27/f97nfb7wkska1.webp,upload/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/bb985f36-9660-4c90-bba4-73823dfa0838.jpeg,2023-02-27 19:54:43.768+01,2023-02-27 19:54:43.768+01,f,image/webp,"0:00:00.000000",upload/thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/bb985f36-9660-4c90-bba4-73823dfa0838.webp,,\xe61b32e672861ac0e8202712aa1fda7385969482,t,,2023-05-05 23:29:20.349096+02,2023-05-05 23:29:19.972756+02,f,f97nfb7wkska1
Name of my test file is: f97nfb7wkska1.webp
Imgur
Quafley
QuafleyOP•2y ago
So basically it is replace photos with upload
bo0tzz
bo0tzz•2y ago
I thought this might be the case, but if your instance is only a month old, it should be new enough that this behavior doesn't exist anymore 🤔 Basically: those paths are absolute, nowadays we store them as relative
Quafley
QuafleyOP•2y ago
interesting The last line in my markdown was an upload I did just now and the other ones are from the unofficial image Meaning the first one is absolute and the second one relative? to what extent is this fixable for me Empty assets table? I will continue to look in to this tomorrow. Interesting one to solve
bo0tzz
bo0tzz•2y ago
admin
PostgreSQL Tutorial
PostgreSQL REPLACE
This tutorial introduces you to the PostgreSQL replace functions that search and replace a substring with a new substring in a string.
bo0tzz
bo0tzz•2y ago
Replacing "/photos/" with "" (empty string) I think that should work but I haven't checked thoroughly So be ready to restore a backup if it doesn't work :^)
Quafley
QuafleyOP•2y ago
rofl why empty and not /upload/ ? cuz it is relative?
bo0tzz
bo0tzz•2y ago
Because you want the relative path ideally
Quafley
QuafleyOP•2y ago
hm
bo0tzz
bo0tzz•2y ago
The correct absolute path should work too, but relative is more robust
Quafley
QuafleyOP•2y ago
But I uploaded a new file via web and that is using upload/library/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/2023/2023-02-27/f97nfb7wkska1.webp which seems like an absolute path
bo0tzz
bo0tzz•2y ago
Nope that's relative No leading /
Quafley
QuafleyOP•2y ago
ahh okay well, it doesn't now either way so UPDATE "assets" SET "originalPath" = REPLACE("originalPath", '/photos/', '');
Quafley
QuafleyOP•2y ago
No description
Quafley
QuafleyOP•2y ago
that seems to have done it now I need to repeat this for resizePath, webpPath and encodedVideoPath
dd42018d-de2f-4fff-a157-15c1110bbd46 20190803_203330.mp4-102243372 0eecf5ad-50a8-4a0d-9bfc-10d807df6191 CLI VIDEO library/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/2019/2019-08-03/20190803_203330.mp4 thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/dd42018d-de2f-4fff-a157-15c1110bbd46.jpeg 2019-08-03 20:33:47+02 2021-01-12 11:49:23+01 f video/mp4 00:00:15.104 thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/dd42018d-de2f-4fff-a157-15c1110bbd46.webp encoded-video/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/dd42018d-de2f-4fff-a157-15c1110bbd46.mp4 20 bytes t NULL 2023-04-22 17:39:54.396589+02 2023-04-22 17:37:56.359391+02 f 20190803_203330
dd42018d-de2f-4fff-a157-15c1110bbd46 20190803_203330.mp4-102243372 0eecf5ad-50a8-4a0d-9bfc-10d807df6191 CLI VIDEO library/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/2019/2019-08-03/20190803_203330.mp4 thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/dd42018d-de2f-4fff-a157-15c1110bbd46.jpeg 2019-08-03 20:33:47+02 2021-01-12 11:49:23+01 f video/mp4 00:00:15.104 thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/dd42018d-de2f-4fff-a157-15c1110bbd46.webp encoded-video/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/dd42018d-de2f-4fff-a157-15c1110bbd46.mp4 20 bytes t NULL 2023-04-22 17:39:54.396589+02 2023-04-22 17:37:56.359391+02 f 20190803_203330
good that worked now the paths are fixed in postgres @bo0tzz Are you sure about your earlier statement about it not needing upload/?
[Nest] 1 - 05/05/2023, 10:24:04 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/a5232b2c-5011-4d80-8459-c8e90c6816b4.webp'
Error: ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/a5232b2c-5011-4d80-8459-c8e90c6816b4.webp'
[Nest] 1 - 05/05/2023, 10:24:04 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/97bc8518-5d54-48ed-a790-deb1133a849c.webp'
Error: ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/97bc8518-5d54-48ed-a790-deb1133a849c.webp'
[Nest] 1 - 05/05/2023, 10:24:04 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/95504e98-7f74-483b-9442-a834f398397e.webp'
Error: ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/95504e98-7f74-483b-9442-a834f398397e.webp'
[Nest] 1 - 05/05/2023, 10:24:04 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/a5232b2c-5011-4d80-8459-c8e90c6816b4.webp'
Error: ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/a5232b2c-5011-4d80-8459-c8e90c6816b4.webp'
[Nest] 1 - 05/05/2023, 10:24:04 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/97bc8518-5d54-48ed-a790-deb1133a849c.webp'
Error: ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/97bc8518-5d54-48ed-a790-deb1133a849c.webp'
[Nest] 1 - 05/05/2023, 10:24:04 PM ERROR [ExceptionsHandler] ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/95504e98-7f74-483b-9442-a834f398397e.webp'
Error: ENOENT: no such file or directory, stat 'thumbs/0eecf5ad-50a8-4a0d-9bfc-10d807df6191/95504e98-7f74-483b-9442-a834f398397e.webp'
I have changed one of my assets to contain upload/ which fixed the issue yep, fixed it with:
UPDATE "assets"
SET "originalPath" = 'upload/' || "originalPath",
"resizePath" = 'upload/' || "resizePath",
"webpPath" = 'upload/' || "webpPath",
"encodedVideoPath" = 'upload/' || "encodedVideoPath";
UPDATE "assets"
SET "originalPath" = 'upload/' || "originalPath",
"resizePath" = 'upload/' || "resizePath",
"webpPath" = 'upload/' || "webpPath",
"encodedVideoPath" = 'upload/' || "encodedVideoPath";
all my data is available again Alright, now on to the one thing I actually made this ticket for. The diferent jobs not working.
Quafley
QuafleyOP•2y ago
A bit odd, both did not work when selecting missing however, when selecting all it did work
No description
Quafley
QuafleyOP•2y ago
+ I only have 18k images, so I have no clue what it is doing but I'm just going to let it run
Quafley
QuafleyOP•2y ago
bit confused as to why it is incrasing
No description
Quafley
QuafleyOP•2y ago
I killed the jobs as all of them were going above my amount of assets, and there seemed to be n slowing down. I will test again tomorrow Is this normal behavior? @bo0tzz
bo0tzz
bo0tzz•2y ago
Tag objects will be double your asset count
Quafley
QuafleyOP•2y ago
But I have 20k assets So it doesn't really add up I will just run all and see I suppose nothing can really go wrong It's so odd, as soon as I hit generate thumbnails tag objects and clip encodes go off as well But they go higher and higher in number waiting
bo0tzz
bo0tzz•2y ago
That's expected
Alex Tran
Alex Tran•2y ago
As thumbnail is needed for tag objects and clip encoding, so it would kick off the subsequent jobs as well
Quafley
QuafleyOP•2y ago
Ah sounds logical It does seem to work now, so that unofficial image has some quirks especially database related Got it all working now and it doesnt killing itself This is going to take a while lol All my findings are within the thread as I have documented everything I wonder why playback is so bad on firefox
Alex Tran
Alex Tran•2y ago
Codec issues I think, proprietary stuff
Quafley
QuafleyOP•2y ago
I wonder what other good browser I can use and yes, most likely Been using firefox for ages, but it's letting me down haha
bo0tzz
bo0tzz•2y ago
If it's a 4k video originally it could be that the transcode for it isn't done yet At least for me, playing a 4k original kills my browser lol
Alex Tran
Alex Tran•2y ago
either Brave, Chrome or Chromium should work I believe
Quafley
QuafleyOP•2y ago
yeah currently viewing on edge without any issue really
bo0tzz
bo0tzz•2y ago
there's basically just firefox or chrome(based) edge is based on chrome as well
Quafley
QuafleyOP•2y ago
yes I am however wondering why the coloring seems to be so off on some transcoded vids
Alex Tran
Alex Tran•2y ago
HDR
Quafley
QuafleyOP•2y ago
nope @Alex I just tested and it seems even on the official compose build, it does not encode the .avi files I mentioned before. They are in a unsupported format. When trying to playback on mobile the file keeps loading, within Chrome it does seem to play without issue. I don't see anything within logs on tablet. I will have to check the logs within the container. Just wanted to let you know, as that was one of the main points of thus thread. I will provide the logs later. :) It could also well be th3 case that it does encode, but it is not displayed within the ui. As I remember finding an mp4 format under encoded. I will have a more in depth look in the database as well. That way we have enough info to go on. I did some more digging. It seems that .avi IS getting encoded properly, when looking at the video it also does not display .avi extention. However, there are also .AVI videos, which are not getting transcoded anc throw a MIME error. These DO display .AVI when clicking on the I for information.
Alex Tran
Alex Tran•2y ago
bo0tzz
bo0tzz•2y ago
Probably just missing a .lower() when checking support?
Quafley
QuafleyOP•2y ago
I would assume, because both are essentially the exact same.

Did you find this page helpful?