# Local Connections work but Remote Connections do not

**URL:** <https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137>\
**Category:** General\
**Created:** [18 November 2020 13:14 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137 "2020-11-18T13:14:02Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![intmech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/intmech/32/18283_2.png) [@intmech](https://discourse.nodered.org/u/intmech)\
**Post date:** [18 November 2020 13:14 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/1 "2020-11-18T13:14:02Z")

</div>

I'm using a vpn tunnel through a 4g lte connection to access node-red running on a Windows10 machine. The browser on the local machine can bring up the flow editor @ 127.0.0.1:1880 however remote machines connecting in through the vpn can not. The browser on a remote machine will throw these errors in the web console:

Loading failed for the with source “[http://192.168.70.125:1880/vendor/vendor.js”](http://192.168.70.125:1880/vendor/vendor.js%E2%80%9D).  
Loading failed for the with source “[http://192.168.70.125:1880/red/red.min.js”](http://192.168.70.125:1880/red/red.min.js%E2%80%9D).  
Uncaught ReferenceError: $ is not defined  
[http://192.168.70.125:1880/red/main.min.js:16](http://192.168.70.125:1880/red/main.min.js:16)

When I go to get the vendor.js file from the remote machine and compare it to the local one it appears that it does not finish loading.

[vendorLocal.txt](https://discourse.nodered.org/uploads/short-url/gTHdQhXmc33J6zMVweeh8jFJbd8.txt) (1.0 MB) [vendorRemote.txt](https://discourse.nodered.org/uploads/short-url/r3h0O5RDInwg7GYRt6grOQJRTDW.txt) (910.2 KB)

I'm not sure what I'm up against here. I've tried completely removing node.js and node-red and reinstalling, I've tried both Node.js 12x and 14x, i've tried with the modules I need installed and without. I've created my own secret key for the credientials in the settings file. I've tried extending timeouts in the settings file.

[settings.txt](https://discourse.nodered.org/uploads/short-url/fzZJbo8IpuiDrbH5tuNgtuCNNwm.txt) (12.9 KB)

Here's my console output:

# Welcome to Node-RED

18 Nov 05:56:58 - [info] Node-RED version: v1.2.3  
18 Nov 05:56:58 - [info] Node.js version: v12.19.0  
18 Nov 05:56:58 - [info] Windows\_NT 10.0.17763 x64 LE  
18 Nov 05:57:02 - [info] Loading palette nodes  
18 Nov 05:57:04 - [debug] Module: node-red-contrib-bitunloader 0.3.7  
18 Nov 05:57:04 - [debug] \Users\user.node-red\node\_modules\node-red-contrib-bitunloader  
18 Nov 05:57:04 - [debug] Module: node-red-contrib-google-sheets 0.1.0  
18 Nov 05:57:04 - [debug] \Users\user.node-red\node\_modules\node-red-contrib-google-sheets  
18 Nov 05:57:04 - [debug] Module: node-red-contrib-modbus 5.13.3  
18 Nov 05:57:04 - [debug] \Users\user.node-red\node\_modules\node-red-contrib-modbus  
18 Nov 05:57:04 - [debug] Module: node-red-contrib-simpletime 2.10.0  
18 Nov 05:57:04 - [debug] \Users\user.node-red\node\_modules\node-red-contrib-simpletime  
18 Nov 05:57:04 - [debug] Module: node-red-node-rbe 0.2.9  
18 Nov 05:57:04 - [debug] C:\Users\user\AppData\Roaming\npm\node\_modules\node-red\node\_modules\node-red-node-rbe  
18 Nov 05:57:04 - [debug] Module: node-red-node-tail 0.1.1  
18 Nov 05:57:04 - [debug] C:\Users\user\AppData\Roaming\npm\node\_modules\node-red\node\_modules\node-red-node-tail  
18 Nov 05:57:11 - [info] Settings file : C:\Users\user.node-red\settings.js  
18 Nov 05:57:11 - [info] Context store : 'default' [module=memory]  
18 Nov 05:57:11 - [info] User directory : \Users\user.node-red  
18 Nov 05:57:11 - [warn] Projects disabled : editorTheme.projects.enabled=false  
18 Nov 05:57:11 - [info] Flows file : \Users\user.node-red\flows\_DESKTOP-17JDQKF.json  
18 Nov 05:57:12 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
18 Nov 05:57:12 - [debug] loaded flow revision: 046e5fc8cbac13d47ca2a4fc7f4d34ce  
18 Nov 05:57:12 - [debug] red/runtime/nodes/credentials.load : user provided key  
18 Nov 05:57:12 - [debug] red/runtime/nodes/credentials.load : keyType=user  
18 Nov 05:57:12 - [info] Starting flows  
18 Nov 05:57:12 - [debug] red/nodes/flows.start : starting flow : global  
18 Nov 05:57:12 - [debug] red/nodes/flows.start : starting flow : bf718b9e.88b41  
18 Nov 05:57:12 - [debug] red/nodes/flows.start : starting flow : be8c8591.07bae8  
18 Nov 05:57:12 - [debug] red/nodes/flows.start : starting flow : 5de50897.664488  
18 Nov 05:57:12 - [debug] red/nodes/flows.start : starting flow : 16a51d54.913093  
18 Nov 05:57:12 - [debug] red/nodes/flows.start : starting flow : f5b9a037.b2e2a  
18 Nov 05:57:13 - [info] Started flows

Thanks in advance for any help.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 November 2020 13:44 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/2 "2020-11-18T13:44:12Z")

</div>

Can you bring up the editor locally using the full ip address? Try it on the machine running node-red and from another machine on the local network, if you have one.

---

<div class="post-metadata">

**Author:** ![intmech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/intmech/32/18283_2.png) [@intmech](https://discourse.nodered.org/u/intmech)\
**Post date:** [18 November 2020 15:08 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/3 "2020-11-18T15:08:59Z")

</div>

Yes the machine running node-red responds at both 127.0.0.1:1880 and at 192.168.70.125:1880. There are no other devices that have web browsers on that LAN to check with.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 November 2020 15:26 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/4 "2020-11-18T15:26:40Z")

</div>

> [@intmech](#):
>
> When I go to get the vendor.js file from the remote machine

How are you doing that?

---

<div class="post-metadata">

**Author:** ![intmech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/intmech/32/18283_2.png) [@intmech](https://discourse.nodered.org/u/intmech)\
**Post date:** [18 November 2020 15:54 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/5 "2020-11-18T15:54:33Z")

</div>

Following the URL in the Browser's Developer Tools Web Console

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 November 2020 21:01 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/6 "2020-11-18T21:01:35Z")

</div>

Is this a new VPN setup?  
Does the VPN work perfectly for other things?  
What do you see if you run (remotely)  
`wget http://192.168.70.125:1880/vendor/vendor.js`  
Copy/paste the result, using the `</>` button at the top of the forum text window when pasting it here.  
Run it a few times and see if you get different results

---

<div class="post-metadata">

**Author:** ![intmech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/intmech/32/18283_2.png) [@intmech](https://discourse.nodered.org/u/intmech)\
**Post date:** [18 November 2020 21:31 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/7 "2020-11-18T21:31:01Z")

</div>

It is a new vpn but it has been working for a few weeks, it does work perfectly for several other things.

```auto
wget http://192.168.70.125:1880/vendor/vendor.js
--2020-11-18 16:25:10-- http://192.168.70.125:1880/vendor/vendor.js
Connecting to 192.168.70.125:1880... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1087724 (1.0M) [application/javascript]
Saving to: ‘vendor.js’

vendor.js 100%[=========================================>] 1.04M 13.1KB/s in 78s     

2020-11-18 16:26:28 (13.6 KB/s) - ‘vendor.js’ saved [1087724/1087724]

wget http://192.168.70.125:1880/vendor/vendor.js
--2020-11-18 16:27:10-- http://192.168.70.125:1880/vendor/vendor.js
Connecting to 192.168.70.125:1880... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1087724 (1.0M) [application/javascript]
Saving to: ‘vendor.js’

vendor.js 100%[=========================================>] 1.04M 12.5KB/s in 78s     

2020-11-18 16:28:29 (13.6 KB/s) - ‘vendor.js’ saved [1087724/1087724]

wget http://192.168.70.125:1880/vendor/vendor.js
--2020-11-18 16:29:28-- http://192.168.70.125:1880/vendor/vendor.js
Connecting to 192.168.70.125:1880... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1087724 (1.0M) [application/javascript]
Saving to: ‘vendor.js’

vendor.js 100%[=========================================>] 1.04M 12.6KB/s in 78s     

2020-11-18 16:30:47 (13.6 KB/s) - ‘vendor.js’ saved [1087724/1087724]

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 November 2020 22:08 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/8 "2020-11-18T22:08:00Z")

</div>

Well it has fetched ok, but your connection only seems to be running at 0.136Mbps which suggests you have a fundamental problem somewhere. Is it as slow as that if you use the vpn for other stuff or is it only node-red?  
In a terminal on the node red machine run whatever tool shows you cpu performance etc in Windows and see if anything is hogging the processor or something.

---

<div class="post-metadata">

**Author:** ![intmech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/intmech/32/18283_2.png) [@intmech](https://discourse.nodered.org/u/intmech)\
**Post date:** [19 November 2020 00:30 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/9 "2020-11-19T00:30:23Z")

</div>

CPU usage is reliably under 30% with node-red running.

```auto
Microsoft Windows [Version 10.0.17763.1577]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\user>typeperf "\Processor(_Total)\% Processor Time"

"(PDH-CSV 4.0)","\\DESKTOP-17JDQKF\Processor(_Total)\% Processor Time"
"11/18/2020 17:23:40.362","29.118851"
"11/18/2020 17:23:41.364","23.590350"
"11/18/2020 17:23:42.365","28.196667"
"11/18/2020 17:23:43.367","34.506008"
"11/18/2020 17:23:44.370","29.897576"
"11/18/2020 17:23:45.373","27.633275"
"11/18/2020 17:23:46.376","24.445369"
"11/18/2020 17:23:47.380","28.339866"
"11/18/2020 17:23:48.383","33.013400"
"11/18/2020 17:23:49.385","29.757693"
"11/18/2020 17:23:50.386","25.149626"
"11/18/2020 17:23:51.389","23.666508"

The command completed successfully.

```

The lte connection could actually be that slow due to cell service in the area. But sometimes I get a decent speedtest

```auto
   Speedtest by Ookla

     Server: CenturyLink - Orlando, FL (id = 10161)
        ISP: T-Mobile USA
    Latency: 41.95 ms (2.57 ms jitter)
   Download: 7.04 Mbps (data used: 11.6 MB)
     Upload: 9.70 Mbps (data used: 13.9 MB)
Packet Loss: 0.0%
 Result URL: https://www.speedtest.net/result/c/36549a34-1d8a-45c6-8ec9-cd18d6f5
0567

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 November 2020 07:39 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/10 "2020-11-19T07:39:03Z")

</div>

What speed do you get if you try and copy a file from the node red machine, not using node red, just a file copy.

---

<div class="post-metadata">

**Author:** ![intmech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/intmech/32/18283_2.png) [@intmech](https://discourse.nodered.org/u/intmech)\
**Post date:** [19 November 2020 09:38 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/11 "2020-11-19T09:38:41Z")

</div>

12KB/s

```auto
scp user@192.168.70.125:/C:/Users/user/Downloads/ookla-speedtest-1.0.0-win64.zip ~/Downloads/scpTest/speedtest.zip
user@192.168.70.125's password: 
ookla-speedtest-1.0.0-win64.zip 100% 777KB 12.6KB/s 01:01

```

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 November 2020 10:50 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/12 "2020-11-19T10:50:15Z")

</div>

So what speed is that showing, and is it what you expect?

---

<div class="post-metadata">

**Author:** ![intmech](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/intmech/32/18283_2.png) [@intmech](https://discourse.nodered.org/u/intmech)\
**Post date:** [19 November 2020 11:30 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/13 "2020-11-19T11:30:08Z")

</div>

that is showing the speed at which a .zip file was copied through ssh from the windows machine through the vpn. The speed is slow and variable, but it is sufficient to do the other tasks I need it to. I can get away with just running the node-red editor on the windows machine, I just wanted to see if there was something I could do to configure node-red to get it to put up with a slow connection.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 November 2020 11:59 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/14 "2020-11-19T11:59:29Z")

</div>

OK, I don't know whether it is the fact that you only have 140kbps available that is causing the problem, but that is incredibly low. Looking at the network traffic I can see that my dashboard is about 3MB total, which would take about 3.5 minutes to download, so I suspect what is happening is that the connection is timing out. I don't know whether there is anything you can do about that.

> [@intmech](#):
>
> sometimes I get a decent speedtest

That suggests that it isn't your cellular connection that is causing the problem but something to do with the VPN.

---

<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:** [18 January 2021 11:59 UTC](https://discourse.nodered.org/t/local-connections-work-but-remote-connections-do-not/36137/15 "2021-01-18T11:59:35Z")

</div>

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