# ECONNREFUSED error on starting Node Red

**URL:** https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339
**Category:** General
**Created:** [7 May 2021 12:55 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339 "2021-05-07T12:55:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![icare88](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/icare88/32/41420_2.png) [@icare88](https://discourse.nodered.org/u/icare88)
#### Post date: [7 May 2021 12:55 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339/1 "2021-05-07T12:55:40Z")

</div>

Hi guys, I was installing a new node when "access to server lost appeared" in the browser. Since then, I couldn't have Node Red work properly, and the following error is showing in the logs:

Error: connect ECONNREFUSED 127.0.0.1:6668  
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16) {  
errno: 'ECONNREFUSED',  
code: 'ECONNREFUSED',  
syscall: 'connect',  
address: '127.0.0.1',  
port: 6668  
}

So I guess my Raspberry Pi is not connecting to the port? Is it safe to open the port? My Pi is connected to a rooter which is behind my internet modem. I prefer to ask since I've got almost no clue in network security 😅

Thanks for your help!

Hugo

---

<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: [7 May 2021 13:08 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339/2 "2021-05-07T13:08:31Z")

</div>

> [@icare88](#):
>
> I was installing a new node

what node did you install?

Or was it a demo flow you pasted in?

Either way, it has possibly crashed node-red.

Assuming you installed node-red using the official script, try this...

- `node-red-stop`
- `node-red --safe`
- refresh your browser (F5)
- remove the bad flow / node
- deploy
- exit the running `node-red` (CTRL+C)
- start node-red service `node-red-start`

---

<div class="post-metadata">

### Author: ![icare88](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/icare88/32/41420_2.png) [@icare88](https://discourse.nodered.org/u/icare88)
#### Post date: [7 May 2021 13:20 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339/3 "2021-05-07T13:20:51Z")

</div>

It worked perfectly. Thanks. The node is "node-red-contrib-apple-tv-x". I will try a second install, and if no luck I will report. Thanks for you quick 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: [7 May 2021 14:42 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339/4 "2021-05-07T14:42:28Z")

</div>

Did you see the install instructions in the readme? Also it has not been updated in two years and there are several unanswered issues on the node's github page, so I would not be surprised if it no longer works.

---

<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: [7 May 2021 15:10 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339/5 "2021-05-07T15:10:47Z")

</div>

Colin, I think you are referring to "node-red-contrib-apple-tv" not "node-red-contrib-apple-tv-x" like the op mentioned. node-red-contrib-apple-tv-x doesn't mention the prerequisites and was published/updated 2 days ago

---

<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: [7 May 2021 15:45 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339/6 "2021-05-07T15:45:39Z")

</div>

> [@Steve-Mcl](#):
>
> Colin, I think you are referring to "node-red-contrib-apple-tv

Yes, you are quite right, zero marks to me for paying attention.

---

<div class="post-metadata">

### Author: ![icare88](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/icare88/32/41420_2.png) [@icare88](https://discourse.nodered.org/u/icare88)
#### Post date: [7 May 2021 16:15 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339/7 "2021-05-07T16:15:38Z")

</div>

No worries 👍 The issue is reported. Thanks for your help guys!

---

<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: [21 May 2021 16:15 UTC](https://discourse.nodered.org/t/econnrefused-error-on-starting-node-red/45339/8 "2021-05-21T16:15:57Z")

</div>

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