# Node-RED does not start when the internet is blocked

**URL:** https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028
**Category:** General
**Created:** [3 January 2022 09:32 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028 "2022-01-03T09:32:29Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)
#### Post date: [3 January 2022 09:32 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/1 "2022-01-03T09:32:29Z")

</div>

Hi there,

I use Node-RED behind a firewall, which blocks all data traffic from and to the Internet. The block is only temporarily lifted for individual URLs if necessary, for example to install updates. The firewall simply terminates the connections to the Internet. No status and no response is sent back from the firewall. This behavior cannot be changed either.

Now I had to find out that Node-RED no longer starts if the URL [https://registry.npmjs.org](https://registry.npmjs.org) is blocked by the firewall during the start process.

I would have expected that Node-RED would carry out error handling at this point and skip the NPM registry check.

The start process stops in the log after the operating system version has been output. As soon as I deactivated the firewall and restart Node-RED, Node-RED starts successfully.

If I set the logging to Debug or Trace (settingsfile-\> logging.console: trace), no error message is output.

The blocking of the Internet does not cause any problems during operation, because I have deactivated the public node catalog of node-red. The only major problem for me is the blocking of the Internet during the start-up process.

Is there a way to skip the npm registry check without changing the url in the npm configuration?

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [3 January 2022 09:43 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/2 "2022-01-03T09:43:33Z")

</div>

How exactly are you starting Node-RED?

Also please include the output of the startup log (so we can see the version information)

And just to help try and reproduce this, how exactly is the firewall closing the connection, is it just dropping packets or replying with a reject?

---

<div class="post-metadata">

### Author: ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)
#### Post date: [3 January 2022 09:54 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/3 "2022-01-03T09:54:24Z")

</div>

Node-RED has the version 1.2.9. An update to 2.1.4 is being planned.

I start Node-RED via a batch file that is registered as a Windows service. The batch file contains the following:

```auto
node-red --settings C:\node-red\settings.js -u C:\node-red\instance

```

The output looks like this:

```auto
C:\node-red>D:\node-red\node-red --settings C:\node-red\settings.js -u C:\node-red\instance 
3 Jan 09:05:56 - [info] 

Welcome to Node-RED
===================

3 Jan 09:05:56 - [info] Node-RED version: v1.2.9
3 Jan 09:05:56 - [info] Node.js version: v14.17.2
3 Jan 09:05:56 - [info] Windows_NT 10.0.14393 x64 LE

```

The firewall terminates the connection without any response

---

<div class="post-metadata">

### Author: ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)
#### Post date: [3 January 2022 09:59 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/4 "2022-01-03T09:59:55Z")

</div>

When I try to call the named URL on the server using PowerShell, the following is displayed:

```auto
PS C:\> Invoke-WebRequest https://registry.npmjs.org
Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ Invoke-WebRequest https://registry.npmjs.org
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

```

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [3 January 2022 10:23 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/5 "2022-01-03T10:23:28Z")

</div>

If you wait 3 minutes it will proceed.

Alternatively....

> [@Node-RED v0.19.4 3 minute delay during startup on windows](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/15):
>
> Finally - node-red startup 3 minutes faster! For anyone behind a proxy having a 3 minute delay starting node-red... Using notepad/text editor, open node-red.cmd (look in you NPM Global folder) Add the following line to the top of the file (before any other command) SET NO\_UPDATE\_NOTIFIER=1 Start node-red using the cmd file node-red.cmd Enjoy the extra 3 mins slight_smileThanks to @hotNipi, @KarnanKurup for pointing me in the right direction .

---

<div class="post-metadata">

### Author: ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)
#### Post date: [3 January 2022 10:33 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/6 "2022-01-03T10:33:46Z")

</div>

On December 29th, 2021 there was an unplanned restart. Node-RED had not continued the startup process until this morning.

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [3 January 2022 10:43 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/7 "2022-01-03T10:43:08Z")

</div>

I've seen that where the console (CMD) is paused & required a keyboard input. Not saying that is definitely what happened to you but that these things do happen.

In other words, the issue you see today looks more like the 3m delay issue & the issue you had in Dec may be a different issue?

Where your console output shows node-red loading & waiting on line  
`3 Jan 09:05:56 - [info] Windows_NT 10.0.14393 x64 LE` is where `updateNotifier.checkNpm()` occurs.

So my point still stands, try it, it should solve your issue for this 3rd Jan start up issue

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [3 January 2022 13:16 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/8 "2022-01-03T13:16:19Z")

</div>

I was 90% sure we had fixed this, but looks like we might want to add an option to disable the update check when just asking npm for it's version.

> <https://github.com/node-red/node-red/blob/91cb6ba73b521c1334b6559dc69ee165f34cb931/packages/node_modules/@node-red/registry/lib/installer.js#L581>

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [3 January 2022 14:41 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/9 "2022-01-03T14:41:52Z")

</div>

@NetHans Can you please test with the `NO_UPDATE_NOTIFIER=1` environment variable set as I'm struggling to reproduce here at the at moment.

Running `SET NO_UPDATE_NOTIFIER=1` before `node-red --settings C:\node-red\settings.js -u C:\node-red\instance` should be what you need.

Also can you supply the output from `npm -v` so we know what version of npm you have installed.

Thanks,

---

<div class="post-metadata">

### Author: ![NetHans](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nethans/32/2843_2.png) [@NetHans](https://discourse.nodered.org/u/NetHans)
#### Post date: [10 January 2022 11:31 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/10 "2022-01-10T11:31:47Z")

</div>

Hello hardillb,

Thank you for the hint with the environment variable. Setting this worked fine.

The NPM version 6.14.13 is currently still installed on the system.

```auto
C:\>npm -v
6.14.13

```

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [10 January 2022 12:22 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/11 "2022-01-10T12:22:31Z")

</div>

> [@NetHans](#):
>
> Setting this worked fine.

Like I said it would 🤔 😂😂

Did you read the info in the link I posted in post no 5 above?

---

<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: [11 March 2022 12:22 UTC](https://discourse.nodered.org/t/node-red-does-not-start-when-the-internet-is-blocked/56028/12 "2022-03-11T12:22:43Z")

</div>

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