# Validation error \`\`ML Backend health check failed''

**URL:** <https://community.labelstud.io/t/validation-error-ml-backend-health-check-failed/209>\
**Category:** Label Studio Support\
**Tags:** faq, docker\
**Created:** [May 23, 2024, 3:50pm UTC](https://community.labelstud.io/t/validation-error-ml-backend-health-check-failed/209 "2024-05-23T15:50:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sajarin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.labelstud.io/sajarin/32/56_2.png) [@sajarin](https://community.labelstud.io/u/sajarin)\
**Post date:** [May 23, 2024, 3:50pm UTC](https://community.labelstud.io/t/validation-error-ml-backend-health-check-failed/209/1 "2024-05-23T15:50:23Z")

</div>

#### 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](https://canada1.discourse-cdn.com/flex035/uploads/labelstudio/original/1X/55046418c37b20e4bcbb274edfbb8f9802fc1e0d.png)  
> ![image (1)](https://canada1.discourse-cdn.com/flex035/uploads/labelstudio/original/1X/57bf4087a75893e923295ab55dcf1ca4a2bb0fcd.png)

#### 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.

---

<div class="post-metadata">

**Author:** ![confused77](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@confused77](https://community.labelstud.io/u/confused77)\
**Post date:** [September 12, 2024, 9:43pm UTC](https://community.labelstud.io/t/validation-error-ml-backend-health-check-failed/209/2 "2024-09-12T21:43:22Z")

</div>

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

- Can’t connect to ML backend [http://localhost:9090](http://localhost:9090), health check failed. Make sure it is up and your firewall is properly configured. [Learn more](https://labelstud.io/guide/ml.html) 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.

---

<div class="post-metadata">

**Author:** ![paapu88](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@paapu88](https://community.labelstud.io/u/paapu88)\
**Post date:** [December 17, 2024, 12:44pm UTC](https://community.labelstud.io/t/validation-error-ml-backend-health-check-failed/209/3 "2024-12-17T12:44:02Z")

</div>

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](http://localhost:9090) was occupied somwhow.  
Also check your ml-model page by refreshing the page, so it is up.  
Terveisin, Markus
