# \[error\] Error: getaddrinfo ENOTFOUND ws://localhost:1880/ws/data at GetAddrInfoReqWrap.onlookup \[as oncomplete\] (node:dns:71:26)

**URL:** <https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979>\
**Category:** General\
**Created:** [3 August 2022 14:55 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979 "2022-08-03T14:55:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lbfabiano](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@lbfabiano](https://discourse.nodered.org/u/lbfabiano)\
**Post date:** [3 August 2022 14:55 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/1 "2022-08-03T14:55:15Z")

</div>

Hello everybody. I have the below error when I try to start node-red on Windows 10 even after uninstalling everything.

[error] Error: getaddrinfo ENOTFOUND ws://localhost:1880/ws/data  
in GetAddrInfoReqWrap.onlookup [as full] (node:dns:71:26)

I saw some post that it is necessary to correct the address as shown below. But it wasn't necessary. Can anybody help me. Thank you very much.

# This file was automatically generated by WSL. To stop the automatic generation of this file, add the following entry to /\># [network]

#geraHosts = false  
127.0.0.1 location  
127.0.1.1 home.localdomain home

# The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback  
fe00::0 ip6-localnet  
ff00::0 ip6-mcastprefix  
ff02::1 ip6-allnodes  
ff02::2 ip6-all routers  
More about the original textYou must provide the original text to see more information about the translation  
Send feedback  
side panels

---

<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:** [3 August 2022 15:37 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/2 "2022-08-03T15:37:03Z")

</div>

Welcome to the forum @lbfabiano

> [@lbfabiano](#):
>
> I have the below error when I try to start node-red on Windows 10 even after uninstalling everything

If you have uninstalled node-red how can you start it? Please explain in more detail what you have done.

---

<div class="post-metadata">

**Author:** ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)\
**Post date:** [3 August 2022 16:06 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/3 "2022-08-03T16:06:10Z")

</div>

In my experience of running Node-RED on a Windows PC and a second instance of Node-RED running in WSL on the same PC, I found using `localhost` or `127.0.0.1` can be problematic. Using the actual IP of the device (or WSL in this case) has less conflicts like this.

NOTE: I do use `http://127.0.0.1:PORT` only as the bookmark for my WSL instance, because the IP changes every time the PC is restarted. But this is only for the browser on that same PC (for obvious reasons).

I've been working on a multi-platform flow to create a context variable to resolve this problem with nodes that use an IP:PORT in one of their properties. You can read more about it [here](https://discourse.nodered.org/t/does-this-flow-work-on-your-install).

---

<div class="post-metadata">

**Author:** ![lbfabiano](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@lbfabiano](https://discourse.nodered.org/u/lbfabiano)\
**Post date:** [3 August 2022 16:52 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/4 "2022-08-03T16:52:08Z")

</div>

I'm sorry because i'm not complete the details. Yes I uninstalled and after that I installed again everythings and even after the problem continues.

---

<div class="post-metadata">

**Author:** ![HaroldPetersInskipp](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/haroldpetersinskipp/32/42319_2.png) [@HaroldPetersInskipp](https://discourse.nodered.org/u/HaroldPetersInskipp)\
**Post date:** [3 August 2022 17:03 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/5 "2022-08-03T17:03:42Z")

</div>

The problem is your Node-RED flow is trying to reach `ws://localhost:1880/ws/data` but it is unable to reach it, or it doesn't exist. However `ws://ipaddress:1880/ws/data` might work if you replace `ipaddress` with the correct one.

---

<div class="post-metadata">

**Author:** ![lbfabiano](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@lbfabiano](https://discourse.nodered.org/u/lbfabiano)\
**Post date:** [3 August 2022 17:34 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/6 "2022-08-03T17:34:17Z")

</div>

Thank you ! But how can i do this on Windows 10?

---

<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:** [3 August 2022 19:51 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/7 "2022-08-03T19:51:55Z")

</div>

You must remember that WSL is a virtual environment inside Windows. Therefore it gets its own virtual network with a different IP address.

localhost and 127.0.01 is purely a LOCAL address. If you did a wget to the localhost address from the WSL command line against node-red running in the same WSL instance, it would work.

When WSL starts up, it should tell you what its "external" ip address is:

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

That is the address you must use from your Windows browser.

---

<div class="post-metadata">

**Author:** ![lbfabiano](https://avatars.discourse-cdn.com/v4/letter/l/9e8a1a/32.png) [@lbfabiano](https://discourse.nodered.org/u/lbfabiano)\
**Post date:** [4 August 2022 18:56 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/8 "2022-08-04T18:56:58Z")

</div>

My friends solved the problem. When uninstalling nodejs and Node-Red I forgot to delete some files (.node and .node-red) from my user (older files) and when trying to re-install the new "NODE-RED" it searched for the oldest files ( to reference). After this action the red node is ok.

Thank you all.

---

<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 August 2022 18:57 UTC](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979/9 "2022-08-18T18:57:33Z")

</div>

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