# Issue with NR - Losing connection on Azure Cloud

**URL:** <https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357>\
**Category:** General\
**Created:** [5 September 2022 14:56 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357 "2022-09-05T14:56:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [5 September 2022 14:56 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/1 "2022-09-05T14:56:51Z")

</div>

Hi ,

I have NR based on docker.  
Its on Azure Cloud.  
No internet access.

The Editor keeps giving lost connection.  
We removed all flows and made it empty. Yet process starts and in few minutes we get "Lost Connection".

Any insight ?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [5 September 2022 15:37 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/2 "2022-09-05T15:37:02Z")

</div>

The Lost Connection notification in the editor happens when the websocket connection between the editor and runtime is broken. If you are running behind any sort of proxy, make sure it is configured to allow websocket connections through.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [5 September 2022 16:42 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/3 "2022-09-05T16:42:46Z")

</div>

Thank You Nick for the super quick feedback. I will check this.

Also - based on what i read online - another way is to make it https ? We are already using https - FYI and still issue occurs.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 September 2022 19:11 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/4 "2022-09-05T19:11:07Z")

</div>

https would only help if it got you through whatever is causing the issue so it was worth trying anyway.

Just a side-note - if you are accessing node-red over the Internet, you really MUST use https along with a login (which you can use Azure AD for when working with Azure services). If you had a login but didn't have https, please change your password ASAP in case anything harvested it.

For the issue, if you open the dev tools on your browser and go to the network tab, you will be able to see the websocket connection - if it is failing, you should see the error code and may get some other info (or may not depending on the issue). Here is an example of it working - note the code 101 which indicates that the websocket has done a successful handshake and "upgraded" the connection to wss: in this case, ws: if not using https.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/d/4d9b531aad9e738a41b38156cd347d17c1041192.png)

If that had worked for you, clicking on the "messages" tab within the network entry would show you all of the messages being exchanged between the Editor and your browser.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [5 September 2022 19:51 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/5 "2022-09-05T19:51:54Z")

</div>

Thank You @TotallyInformation .  
I will work with out folks . This is useful.

Will update how it goes.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [6 September 2022 14:54 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/6 "2022-09-06T14:54:27Z")

</div>

Hi,

I checked it with my team.

1. There is proxy involved. No internet.
2. Below is a snapshot from DevTools in Chrome.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/46a1acc889fe195ec74d4ce64cff7fead5329b78.png)

Any further insights ?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [6 September 2022 20:08 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/7 "2022-09-06T20:08:31Z")

</div>

> [@SandeepA](#):
>
> Any further insights ?

You will need to monitor the websocket and see when it dies, see if you can spot any patterns. Also check the logs and performance of the proxy.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [6 September 2022 22:20 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/8 "2022-09-06T22:20:48Z")

</div>

Noted. Will check. There is no proxy .  
Thanks.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [6 September 2022 22:27 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/9 "2022-09-06T22:27:42Z")

</div>

I just realised that earlier I said there is proxy when there is not.

My apologies.

There is no proxy.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [7 September 2022 21:32 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/10 "2022-09-07T21:32:26Z")

</div>

Guys - anything ?

---

<div class="post-metadata">

**Author:** ![lu4t](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lu4t/32/32276_2.png) [@lu4t](https://discourse.nodered.org/u/lu4t)\
**Post date:** [9 September 2022 16:45 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/11 "2022-09-09T16:45:57Z")

</div>

I think your NR host, and the box you're using to render the editor do not have a clean connection.

I would review the azure nw config to debug whats going on.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [17 September 2022 09:47 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/12 "2022-09-17T09:47:03Z")

</div>

Checked . We are at our wits end. There is no proxy involved .  
And yet editor keeps disconnecting . Any logs we can check which can give us any clues ?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 September 2022 12:43 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/13 "2022-09-17T12:43:51Z")

</div>

You will need to look at networking between the client and the server. I think it likely that something is either periodically flooding the network or your client device is periodically flooding the devices network card (check for anything else that is running and double check for malware). Or it could be something on the server that is periodically flooding its network card (again check for malware or a process that shouldn't be running not just checking the normal processes).

---

<div class="post-metadata">

**Author:** ![lu4t](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lu4t/32/32276_2.png) [@lu4t](https://discourse.nodered.org/u/lu4t)\
**Post date:** [17 September 2022 18:27 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/14 "2022-09-17T18:27:14Z")

</div>

if the editor is closing connection, I guess the logs you want to see are the ones you will find on the Web Dev Tools page. You want to understand why the websocket connection is closed.  
I am guessing the node-red engine is not crashing... 🤔

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [4 October 2022 15:51 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/15 "2022-10-04T15:51:37Z")

</div>

I am back.

Seeking your help again. The issue is not yet sorted.  
On further invesitgation we see the below  
It looks like the handshake between https and wss is not happening and causing the disconnect.

Any leads - based on below ?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/09905ec316b3061072d01863123fbca06b2aef2d.png)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [4 October 2022 17:35 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/16 "2022-10-04T17:35:39Z")

</div>

You've blanked out the URL, but if you access the editor at `example.com` then I'd expect that url to be `example.com/comms`. Is that the case here?

We can see from those headers the request has made it to Node-RED (the `X-Powered-By: Express` is a clue unless you have other Express powered webservers in your environment). But for that to return 404 means the path is wrong.

So maybe your nginx config is incorrect for mapping through the request... not sure really.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [4 October 2022 17:40 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/17 "2022-10-04T17:40:04Z")

</div>

> [@knolleary](#):
>
> You've blanked out the URL, but if you access the editor at `example.com` then I'd expect that url to be `example.com/comms`. Is that the case here?

Yes thats the case.  
Editor is : [http://example.com](http://example.com)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 October 2022 19:34 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/18 "2022-10-04T19:34:13Z")

</div>

You said previously that no proxy was involved but it clearly does have an NGINX reverse proxy in play.

So if you can reach the editor on `https://example.local/` (e.g. no port number so using port 443 and no additional path), you need to check the NGINX config because you probably are not proxying other paths on that domain correctly. If you know the IP address, try that instead (as a test - most likely with `:1880` port added). And double-check your settings.js file to see whether you've forgotten that you moved the admin or other paths around.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [6 October 2022 19:14 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/19 "2022-10-06T19:14:35Z")

</div>

Guys - All -

Thank You so much for helping with this issue. The issue was indeed with NGINX . Once configured for ingress it started working .

(I am not the one doing the actual installation and am a go between for those guys - so sometimes the info provided to me was not correct/accurate. I regret sharing such info here before ).

Thank You again to the forum for its strength in helping with these issues.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 October 2022 19:15 UTC](https://discourse.nodered.org/t/issue-with-nr-losing-connection-on-azure-cloud/67357/20 "2022-10-20T19:15:29Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
