# Connect() failed (111: Connection refused) while connecting to upstream

**URL:** <https://openvidu.discourse.group/t/connect-failed-111-connection-refused-while-connecting-to-upstream/188>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [February 24, 2020, 10:06am UTC](https://openvidu.discourse.group/t/connect-failed-111-connection-refused-while-connecting-to-upstream/188 "2020-02-24T10:06:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tibinpaul](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/tibinpaul/32/104_2.png) [@tibinpaul](https://openvidu.discourse.group/u/tibinpaul)\
**Post date:** [February 24, 2020, 10:06am UTC](https://openvidu.discourse.group/t/connect-failed-111-connection-refused-while-connecting-to-upstream/188/1 "2020-02-24T10:06:00Z")

</div>

Hello,

I am deploying OpenVidu pro on Digitalocean and got the below status after running ansible.

![Screenshot 2020-02-24 at 3.27.52 PM](https://global.discourse-cdn.com/free1/uploads/openvidu/original/1X/c6439734b0925f4cac5b6a58a551337f05698efa.png)

After that, seeing the below message in the terminal.

`TASK [check-app-ready : check every 5 seconds for 60 attempts (5 minutes total) if openvidu is up and ready]`

Then, nothing happens for a while and later getting the below error.

 ![Screenshot 2020-02-24 at 3.33.24 PM](https://global.discourse-cdn.com/free1/uploads/openvidu/original/1X/477d72582e06454ea4fdd4281347be885aea37a2.png)

Also, I can see the below error in the `nginx.error` log file.

`connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: video.example.com, request: "GET /inspector/ HTTP/1.1", upstream: "http://IP_ADDRESS:5443/", host: "localhost"`

Could you help me to understand where it went wrong? Thanks.

---

<div class="post-metadata">

**Author:** ![tibinpaul](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/tibinpaul/32/104_2.png) [@tibinpaul](https://openvidu.discourse.group/u/tibinpaul)\
**Post date:** [February 24, 2020, 7:09pm UTC](https://openvidu.discourse.group/t/connect-failed-111-connection-refused-while-connecting-to-upstream/188/2 "2020-02-24T19:09:02Z")

</div>

KIbana is loading fine. The issue now is with the inspector and REST endpoints. The error is `connect() failed (111: Connection refused) while connecting to upstream` for both.

---

<div class="post-metadata">

**Author:** ![tibinpaul](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/tibinpaul/32/104_2.png) [@tibinpaul](https://openvidu.discourse.group/u/tibinpaul)\
**Post date:** [February 24, 2020, 7:41pm UTC](https://openvidu.discourse.group/t/connect-failed-111-connection-refused-while-connecting-to-upstream/188/3 "2020-02-24T19:41:57Z")

</div>

Seems like the issue was with the `group_vars` config. I have updated `kms_ips` correctly and the issues got resolved.
