ML Service: Error: connect ECONNREFUSED 127.0.0.1:80
I am trying to enable ML service in Immich, but getting the aforementioned error.
For the context, I had it disabled (IMMICH_MACHINE_LEARNING_URL = false in .env + commented out ML service in Docker compose) during Immich setup and now (after I uploaded photos) I decided to enable it.
However, when I manually try to run "TAG OBJECTS" job, nothing really happens and in microservices log I can see the following:
2023-04-17T03:03:56.050184779Z Error: connect ECONNREFUSED 127.0.0.1:80
2023-04-17T03:03:56.050205003Z at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
2023-04-17T03:03:56.051006090Z [Nest] 1 - 04/16/2023, 8:03:56 PM ERROR [SmartInfoService] Unable run object detection pipeline: dae2e257-8dbd-43a0-9a68-885572f4b8a4
Looking at the ML service logs, it doesn't throw any errors, so this is what Im seeing in logs:
2023-04-17T03:02:01.713839951Z [2023-04-16 20:02:01 -0700] [1] [INFO] Starting gunicorn 20.1.0
2023-04-17T03:02:01.714949526Z [2023-04-16 20:02:01 -0700] [1] [INFO] Listening at: http://0.0.0.0:3003 (1)
2023-04-17T03:02:01.714967931Z [2023-04-16 20:02:01 -0700] [1] [INFO] Using worker: gthread
2023-04-17T03:02:01.723702923Z [2023-04-16 20:02:01 -0700] [13] [INFO] Booting worker with pid: 13
2023-04-17T03:02:01.821821420Z [2023-04-16 20:02:01 -0700] [14] [INFO] Booting worker with pid: 14
My setup is pretty standard except Postgres is hosted separately. But that should not have anything to do with ML as I understand.
2 Replies
Did you restart the whole stack after you enable machine learning container?
@Alex oh crah, my bad. I didn't pay much attention to the ENV param name I was setting to "false" during setup. I.e. to disable ML I did set IMMICH_MACHINE_LEARNING_URL=false. However when I decided to enable ML, instead of deleting that env entry, I simply flipped it to "true" 😅 : "IMMICH_MACHINE_LEARNING_URL=true" which basically overrides the service URL.. Removing it made ML service alive