imagegenius / docker-immich

Monolithic (Single) Docker Container for Immich
GNU General Public License v3.0
619 stars 28 forks source link

Error: Cannot find ffprobe #391

Closed MoSattler closed 4 months ago

MoSattler commented 4 months ago

Fresh install of the immich image gives me this error:

text  error  warn  system  array  login  

[Nest] 1545  - 07/03/2024, 2:22:02 AM     LOG [Api:RouterExplorer] Mapped {/api/users/profile-image, DELETE} route
[Nest] 1545  - 07/03/2024, 2:22:02 AM     LOG [Api:RouterExplorer] Mapped {/api/users/:id/profile-image, GET} route
[Nest] 1545  - 07/03/2024, 2:22:02 AM     LOG [Api:NestApplication] Nest application successfully started
[Nest] 1545  - 07/03/2024, 2:22:02 AM     LOG [Api:Bootstrap] Immich Server is listening on http://[::1]:80 [v1.107.2] [PRODUCTION] 
[Nest] 1507  - 07/03/2024, 2:30:59 AM   ERROR [Microservices:JobService] Unable to run job handler (metadataExtraction/metadata-extraction): Error: Cannot find ffprobe
[Nest] 1507  - 07/03/2024, 2:30:59 AM   ERROR [Microservices:JobService] Error: Cannot find ffprobe
[Nest] 1545  - 07/03/2024, 2:26:26 AM     LOG [Api:EventRepository] Websocket Connect:    1RvtUhTW_C_Xk1vwAAAB    at /app/immich/server/node_modules/fluent-ffmpeg/lib/ffprobe.js:145:31
    at /app/immich/server/node_modules/fluent-ffmpeg/lib/capabilities.js:194:9

    at /app/immich/server/node_modules/fluent-ffmpeg/lib/capabilities.js:186:13
    at /app/immich/server/node_modules/fluent-ffmpeg/lib/capabilities.js:123:9
    at /app/immich/server/node_modules/fluent-ffmpeg/lib/capabilities.js:116:11
    at /app/immich/server/node_modules/fluent-ffmpeg/lib/utils.js:223:16
    at F (/app/immich/server/node_modules/fluent-ffmpeg/node_modules/which/which.js:68:16)
    at E (/app/immich/server/node_modules/fluent-ffmpeg/node_modules/which/which.js:80:29)
    at /app/immich/server/node_modules/fluent-ffmpeg/node_modules/which/which.js:89:16
    at /app/immich/server/node_modules/isexe/index.js:42:5
[Nest] 1507  - 07/03/2024, 2:30:59 AM   ERROR [Microservices:JobService] Object:
[Nest] 1545  - 07/03/2024, 2:27:05 AM     LOG [Api:SystemConfigService~icmcenx7] LogLevel=log (set via system config){

  "id": "1801db64-7e7f-4696-a847-932b85595a10",
  "source": "upload"
}

[Nest] 1507  - 07/03/2024, 2:31:00 AM   ERROR [Microservices:JobService] Unable to run job handler (metadataExtraction/metadata-extraction): Error: Cannot find ffprobe
[Nest] 1507  - 07/03/2024, 2:31:00 AM   ERROR [Microservices:JobService] Error: Cannot find ffprobe
[Nest] 1545  - 07/03/2024, 2:27:05 AM     LOG [Api:MapRepository~icmcenx7] Initializing metadata repository    at /app/immich/server/node_modules/fluent-ffmpeg/lib/ffprobe.js:145:31
    at proto._getFfprobePath (/app/immich/server/node_modules/fluent-ffmpeg/lib/capabilities.js:144:14)

    at proto.ffprobe (/app/immich/server/node_modules/fluent-ffmpeg/lib/ffprobe.js:141:10)
    at FfmpegCommand.ffprobe (/app/immich/server/node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js:221:20)
    at node:internal/util:431:7
    at new Promise (<anonymous>)
    at node:internal/util:417:12
    at MediaRepository.probe (/app/immich/server/dist/repositories/media.repository.js:72:31)
    at MetadataService.handleMetadataExtraction (/app/immich/server/dist/services/metadata.service.js:186:65)
[Nest] 1545  - 07/03/2024, 2:27:05 AM     LOG [Api:MetadataService~icmcenx7] Initialized local reverse geocoder    at async /app/immich/server/dist/services/job.service.js:148:36
[Nest] 1507  - 07/03/2024, 2:31:00 AM   ERROR [Microservices:JobService] Object:
{

  "id": "4bdb01f3-931f-43ce-965b-92aaeac12c56",
  "source": "upload"
}

[Nest] 1507  - 07/03/2024, 2:31:01 AM   ERROR [Microservices:JobService] Unable to run job handler (faceDetection/face-detection): Error: Machine learning request to "http://127.0.0.1:3003" failed with Error: connect ECONNREFUSED 127.0.0.1:3003
[Nest] 1507  - 07/03/2024, 2:31:01 AM   ERROR [Microservices:JobService] Error: Machine learning request to "http://127.0.0.1:3003" failed with Error: connect ECONNREFUSED 127.0.0.1:3003
[Nest] 1507  - 07/03/2024, 2:27:05 AM     LOG [Microservices:SystemConfigService] LogLevel=log (set via system config)    at /app/immich/server/dist/repositories/machine-learning.repository.js:19:19

    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MachineLearningRepository.predict (/app/immich/server/dist/repositories/machine-learning.repository.js:18:21)
    at async MachineLearningRepository.detectFaces (/app/immich/server/dist/repositories/machine-learning.repository.js:33:26)
    at async PersonService.handleDetectFaces (/app/immich/server/dist/services/person.service.js:275:52)
    at async /app/immich/server/dist/services/job.service.js:148:36
    at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)
    at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 1507  - 07/03/2024, 2:31:01 AM   ERROR [Microservices:JobService] Object:
[Nest] 1545  - 07/03/2024, 2:27:05 AM     LOG [Api:SystemConfigService~icmcenx7] LogLevel=log (set via system config)
{
  "id": "80fb8b9f-492a-4cbc-b691-e072d4aace3b",
  "source": "upload"
}
[Nest] 1545  - 07/03/2024, 2:27:05 AM     LOG [Api:SystemConfigService~icmcenx7] LogLevel=log (set via system config)
[Nest] 1507  - 07/03/2024, 2:31:01 AM   ERROR [Microservices:JobService] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request to "http://127.0.0.1:3003" failed with Error: connect ECONNREFUSED 127.0.0.1:3003

[Nest] 1507  - 07/03/2024, 2:31:01 AM   ERROR [Microservices:JobService] Error: Machine learning request to "http://127.0.0.1:3003" failed with Error: connect ECONNREFUSED 127.0.0.1:3003
    at /app/immich/server/dist/repositories/machine-learning.repository.js:19:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async MachineLearningRepository.predict (/app/immich/server/dist/repositories/machine-learning.repository.js:18:21)
    at async MachineLearningRepository.encodeImage (/app/immich/server/dist/repositories/machine-learning.repository.js:42:26)
    at async SmartInfoService.handleEncodeClip (/app/immich/server/dist/services/smart-info.service.js:91:27)
[Nest] 1545  - 07/03/2024, 2:27:05 AM    WARN [Api:ServerInfoRepository~78rzbfuc] Failed to read build-lock.json    at async /app/immich/server/dist/services/job.service.js:148:36
    at async Worker.processJob (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:394:28)

    at async Worker.retryIfFailed (/app/immich/server/node_modules/bullmq/dist/cjs/classes/worker.js:581:24)
[Nest] 1507  - 07/03/2024, 2:31:01 AM   ERROR [Microservices:JobService] Object:
{
  "id": "80fb8b9f-492a-4cbc-b691-e072d4aace3b",
  "source": "upload"
[Nest] 1545  - 07/03/2024, 2:29:47 AM    WARN [Api:AuthService~yuulm584] Failed login attempt for user dhcxwxr85r@privaterelay.appleid.com from ip address ::ffff:127.0.0.1
}

[Nest] 1545  - 07/03/2024, 2:29:50 AM     LOG [Api:EventRepository] Websocket Connect:    WfykUj9pg0Urno9BAAAD
[Nest] 1507  - 07/03/2024, 2:31:01 AM     LOG [Microservices:MediaService] Successfully generated JPEG image preview for asset 80fb8b9f-492a-4cbc-b691-e072d4aace3b
[Nest] 1507  - 07/03/2024, 2:31:01 AM     LOG [Microservices:MediaService] Successfully generated WEBP image thumbnail for asset 80fb8b9f-492a-4cbc-b691-e072d4aace3b
[Nest] 1545  - 07/03/2024, 2:31:09 AM    WARN [Api:ServerInfoRepository~ns1yzrcr] Failed to read build-lock.json
[Nest] 1545  - 07/03/2024, 2:31:43 AM    WARN [Api:ServerInfoRepository~st3747ip] Failed to read build-lock.json
[Nest] 1545  - 07/03/2024, 2:32:39 AM     LOG [Api:EventRepository] Websocket Disconnect: WfykUj9pg0Urno9BAAAD
[Nest] 1545  - 07/03/2024, 2:33:11 AM    WARN [Api:ServerInfoRepository~a6jmhqn1] Failed to read build-lock.json
[Nest] 1545  - 07/03/2024, 2:33:25 AM    WARN [Api:ServerInfoRepository~vihzxbdp] Failed to read build-lock.json
[Nest] 1545  - 07/03/2024, 2:34:48 AM     LOG [Api:EventRepository] Websocket Disconnect: 1RvtUhTW_C_Xk1vwAAAB
seanob86 commented 4 months ago

Same issue here. looks like using tag 1.107.1 is a workaround for now. 1.107.2 aka latest introduced this issue.

martabal commented 4 months ago

Sorry guys, please run this inside your container until the image is re-built with the fix:

ldconfig /usr/lib/jellyfin-ffmpeg/lib && \
ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin && \
ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin
MoSattler commented 4 months ago

@martabal no worries, thank you for the hot-fix. Appreciate your work here!

martabal commented 4 months ago

Should be fixed. Can you try with the latest update?

MoSattler commented 4 months ago

Yes, works now!

seanob86 commented 4 months ago

@martabal This is still not working with latest. I ensured I pulled latest and scanned external library.


[Nest] 309  - 07/04/2024, 6:57:58 AM   ERROR [Microservices:JobService] Unable to run job handler (metadataExtraction/metadata-extraction): Error: Cannot find ffprobe
[Nest] 309  - 07/04/2024, 6:57:58 AM   ERROR [Microservices:JobService] Error: Cannot find ffprobe
    at /app/immich/server/node_modules/fluent-ffmpeg/lib/ffprobe.js:145:31
    at proto._getFfprobePath (/app/immich/server/node_modules/fluent-ffmpeg/lib/capabilities.js:144:14)
    at proto.ffprobe (/app/immich/server/node_modules/fluent-ffmpeg/lib/ffprobe.js:141:10)
    at FfmpegCommand.ffprobe (/app/immich/server/node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js:221:20)
    at node:internal/util:431:7
    at new Promise (<anonymous>)
    at node:internal/util:417:12
    at MediaRepository.probe (/app/immich/server/dist/repositories/media.repository.js:72:31)
    at MetadataService.handleMetadataExtraction (/app/immich/server/dist/services/metadata.service.js:186:65)
    at async /app/immich/server/dist/services/job.service.js:148:36
[Nest] 309  - 07/04/2024, 6:57:58 AM   ERROR [Microservices:JobService] Object:
{
  "id": "263370e2-04a5-4e16-b458-66e9a1d3d680",
  "source": "upload"
}

Also, tried the below commands as a workaround, which did work in the previous image, but no longer works in latest.

Sorry guys, please run this inside your container until the image is re-built with the fix:

ldconfig /usr/lib/jellyfin-ffmpeg/lib && \
ln -s /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin && \
ln -s /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin && \
martabal commented 4 months ago

Ok, it looks like the :latest image didn't build with the base-image changes but :openvino and :cuda did as I can see the symlinks in /usr/bin:

lrwxrwxrwx 1 root root          31 Jul  3 12:22  ffmpeg -> /usr/lib/jellyfin-ffmpeg/ffmpeg
lrwxrwxrwx 1 root root          32 Jul  3 12:22  ffprobe -> /usr/lib/jellyfin-ffmpeg/ffprobe

@hydazz Did you build the :latest image with the updated base-image?

martabal commented 4 months ago

@seanob86 I just tested it and it works fine. Can you restart Immich and retry the command without the last && \ ?

seanob86 commented 4 months ago

Thanks it’s working now. Not sure what fixed it. Have had other issues on my server since having power cut.

I did run those commands without && \ before and at the time didn’t work so i just stopped immich. Resolved the other issues on the server and started immich and worked without issuing those commands again. So i’m assuming it’s working now since I ran those commands previously before i stopped immich.

hydazz commented 4 months ago

@hydazz Did you build the :latest image with the updated base-image?

It should have been rebuilt with the other branches