# \[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:** 1\
**Showing post:** 3

<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).

---

_[View the full topic](https://discourse.nodered.org/t/error-error-getaddrinfo-enotfound-ws-localhost-1880-ws-data-at-getaddrinforeqwrap-onlookup-as-oncomplete-node71-26/65979)._
