Validation error ``ML Backend health check failed''

Question:

My ml backend is up and running but still I am not able to connect it with my label studio.
Both ml backend and label studio running on docker.
image

Answer:

Try using the following url: http://host.docker.internal:9090

host.docker.internal is used to access the host from within a docker container. This is necessary because your machine learning backend and Label Studio are running in their own separate docker containers. By using http://host.docker.internal:9090 , you’re telling Label Studio to look for the ML backend on the same machine but outside of its own container.

Same problem as above, but running on directly on linux, no docker.
Validation error

  • Can’t connect to ML backend http://localhost:9090, health check failed. Make sure it is up and your firewall is properly configured. Learn more about how to set up an ML backend. Additional info: HTTPConnectionPool(host=‘localhost’, port=9090): Max retries exceeded with url: /health (Caused by NewConnectionError(‘: Failed to establish a new connection: [Errno 111] Connection refused’))

Version: 1.13.2.dev0

Also, it was working a couple hours ago, and all of a sudden I can’t connect anymore. Restarted the ml backend and label studio several times, but no luck.

1 Like

I had the same problem with non-docler ML backend.
I had to start label studio first with
label-studio start
and only later start the ml backend with
label-studio-ml start segment_anything_2_image

I guess the http://localhost:9090 was occupied somwhow.
Also check your ml-model page by refreshing the page, so it is up.
Terveisin, Markus