ECONNREFUSED error when using smart search
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
This has been fixed for me after pulling the latest image
@afermar was this also fixed for you?
No, still same error with v1.107.2
What tag are you using?
latest
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
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