docker-immich icon indicating copy to clipboard operation
docker-immich copied to clipboard

ECONNREFUSED error when using smart search

Open afermar opened this issue 1 year ago • 7 comments

I get this in the logs:

[Nest] 539  - 07/01/2024, 9:15:08 PM   ERROR [Api: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.encodeText (/app/immich/server/dist/repositories/machine-learning.repository.js:47:26)
    at async SearchService.searchSmart (/app/immich/server/dist/services/search.service.js:96:27)~femsl0jr] Failed to search smart
[Nest] 539  - 07/01/2024, 9:15:08 PM   ERROR [Api: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.encodeText (/app/immich/server/dist/repositories/machine-learning.repository.js:47:26)
    at async SearchService.searchSmart (/app/immich/server/dist/services/search.service.js:96:27)~femsl0jr] Error: Machine learning request to "http://127.0.0.1:3003" failed with Error: connect ECONNREFUSED 127.0.0.1:3003

afermar avatar Jul 01 '24 19:07 afermar

This has been fixed for me after pulling the latest image

MoSattler avatar Jul 03 '24 16:07 MoSattler

@afermar was this also fixed for you?

hydazz avatar Jul 08 '24 04:07 hydazz

No, still same error with v1.107.2

afermar avatar Jul 08 '24 12:07 afermar

What tag are you using?

hydazz avatar Jul 08 '24 12:07 hydazz

latest

afermar avatar Jul 10 '24 12:07 afermar

I have the same problem with the latest update 1.130.3. Before this update, it worked fine without any issues.

I see the following error in the logs

[Nest] 2481  - 04/01/2025, 9:46:53 AM    WARN [Microservices:MachineLearningRepository] Machine learning request to "http://127.0.0.1:3003" failed: fetch failed
[Nest] 2481  - 04/01/2025, 9:46:53 AM   ERROR [Microservices:{"id":"fd41448c-b1c1-41ea-98f7-98175c819f20"}] Unable to run job handler (smartSearch/smart-search): Error: Machine learning request '{"clip":{"visual":{"modelName":"ViT-B-32__openai"}}}' failed for all URLs

Nafania avatar Apr 01 '25 06:04 Nafania

I'm on 2.2.0 and was having this issue, I fixed mine by changing the machine learning IP in settings from 127.0.0.1:3003 to 0.0.0.0:3003

Whatsmename avatar Nov 01 '25 09:11 Whatsmename