# EHOSTUNREACH after changing ips

**URL:** <https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895>\
**Category:** General\
**Created:** [9 April 2021 06:19 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895 "2021-04-09T06:19:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Barry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/john_barry/32/28987_2.png) [@John\_Barry](https://discourse.nodered.org/u/John_Barry)\
**Post date:** [9 April 2021 06:19 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895/1 "2021-04-09T06:19:18Z")

</div>

Hi,

I'm setting up 2 x pi's to read values from RS232 scales.  
I've used the waveshare RS232 to ethernet converters  
[https://www.waveshare.com/rs232-485-to-eth.htm](https://www.waveshare.com/rs232-485-to-eth.htm)  
And followed the this link to get the ethernet and wifi working  
[Easy Raspberry Pi WiFi Bridge - Pi My Life Up](https://pimylifeup.com/raspberry-pi-wifi-bridge/)  
All this worked well and was saving the data into influx and I could access it from Grafana on another machine.  
I have to have a static IP to maintain the links between the devices and that worked yesterday but today I could see the pi's on the router devices but could not access node red on the browser or via SSH.  
I then changed it back to a dynamic IP and bound the IPs from the router.  
After doing that I cant install nodes from the palette, previously installed nodes such as influx returns errors and I cant even update the pi in the cli.  
I have rebooted several times and unbound the IPs from the router but still the same problem.

---

<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:** [9 April 2021 06:54 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895/2 "2021-04-09T06:54:34Z")

</div>

It is difficult to make suggestions based on such a vague description. Focus on one problem and work out what is going on. For example you you can't update from the cli. What sort of update is that? Show us what happens when you try. Copy/paste the result please, not a screen shot.

---

<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:** [9 April 2021 07:01 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895/3 "2021-04-09T07:01:20Z")

</div>

Have you restarted your router modem?

Can you check ping from PI to other local IP addresses?

Can you check ping from PI to 8.8.8.8?

Can you check ping from PI to [www.npmjs.com](http://www.npmjs.com)?

What exactly does CLI show when you try to perform updates?

---

<div class="post-metadata">

**Author:** ![John\_Barry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/john_barry/32/28987_2.png) [@John\_Barry](https://discourse.nodered.org/u/John_Barry)\
**Post date:** [9 April 2021 07:26 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895/4 "2021-04-09T07:26:02Z")

</div>

Hi Steve,  
I can ping from other devices also i can access node-red via 192.168.8.106:1880  
It seems the LAN is working but no internet connection to the PI's  
I'm currently replying to you from the network so the internet is good.  
I have rebooted the router and the pi shows its connected to the network  
This is what I get when running Sudo apt-get update

Cannot initiate the connection to [raspbian.raspberrypi.org:80](http://raspbian.raspberrypi.org:80) (2a00:1098:0:80: 1000:75:0:3). - connect (101: Network is unreachable) Could not connect to raspb [ian.raspberrypi.org:80](http://ian.raspberrypi.org:80) (93.93.128.193). - connect (113: No route to host)  
Err:2 [https://packages.grafana.com/oss/deb](https://packages.grafana.com/oss/deb) stable InRelease  
Cannot initiate the connection to [packages.grafana.com:443](http://packages.grafana.com:443) (2a04:4e42:4::729). - connect (101: Network is unreachable) Could not connect to packages.grafana.c om:443 (151.101.18.217). - connect (113: No route to host)  
Err:3 [https://repos.influxdata.com/debian](https://repos.influxdata.com/debian) buster InRelease  
Cannot initiate the connection to [repos.influxdata.com:443](http://repos.influxdata.com:443) (2600:9000:219c:b80 0:7:7790:e740:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to [repos.influxdata.com:443](http://repos.influxdata.com:443) (2600:9000:219c:c400:7:7790:e740:93a1).

pi@raspberrypi:~ $ ping 8.8.8.8  
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.  
From 192.168.0.10 icmp\_seq=1 Destination Host Unreachable  
From 192.168.0.10 icmp\_seq=2 Destination Host Unreachable  
From 192.168.0.10 icmp\_seq=3 Destination Host Unreachable  
From 192.168.0.10 icmp\_seq=4 Destination Host Unreachable  
From 192.168.0.10 icmp\_seq=5 Destination Host Unreachable  
^C  
--- 8.8.8.8 ping statistics ---  
9 packets transmitted, 0 received, +5 errors, 100% packet loss, time 300ms  
pipe 4

* * *

2021-04-09T07:22:13.277Z Install : node-red-contrib-telegrambot 9.2.1

2021-04-09T04:35:43.326Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-telegrambot@9.2.1  
2021-04-09T04:35:48.336Z [err] npm  
2021-04-09T04:35:48.337Z [err]  
2021-04-09T04:35:48.337Z [err] ERR! code  
2021-04-09T04:35:48.337Z [err] EHOSTUNREACH  
2021-04-09T04:35:48.337Z [err] npm  
2021-04-09T04:35:48.337Z [err]  
2021-04-09T04:35:48.337Z [err] ERR!  
2021-04-09T04:35:48.338Z [err] errno  
2021-04-09T04:35:48.338Z [err] EHOSTUNREACH  
2021-04-09T04:35:48.363Z [err] npm  
2021-04-09T04:35:48.363Z [err] ERR! request to [https://registry.npmjs.org/node-red-contrib-telegrambot](https://registry.npmjs.org/node-red-contrib-telegrambot) failed, reason: connect EHOSTUNREACH 104.16.23.35:443  
2021-04-09T04:35:48.378Z [err]  
2021-04-09T04:35:48.378Z [err] npm  
2021-04-09T04:35:48.378Z [err] ERR!  
2021-04-09T04:35:48.378Z [err] A complete log of this run can be found in:  
2021-04-09T04:35:48.378Z [err] npm  
2021-04-09T04:35:48.378Z [err] ERR!  
2021-04-09T04:35:48.378Z [err] /home/pi/.npm/\_logs/2021-04-09T04\_35\_48\_366Z-debug.log  
2021-04-09T04:35:48.392Z rc=1

 ![Untitled](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/7/f73abf0440eb676d3c1c2f534d6c2705c67b9ba9.png)

---

<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:** [9 April 2021 07:31 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895/5 "2021-04-09T07:31:42Z")

</div>

I've seen something similar - was an issue related to ipv6. Try temporarily disabling IPv6

To **disable IPv6** input 3 commands...

```auto
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

```

You can check if it worked using...

```auto
ip a

```

(uou should not see any IPv6 entries)

---

<div class="post-metadata">

**Author:** ![John\_Barry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/john_barry/32/28987_2.png) [@John\_Barry](https://discourse.nodered.org/u/John_Barry)\
**Post date:** [15 April 2021 05:46 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895/6 "2021-04-15T05:46:51Z")

</div>

Hi,

Sorry for the vague description on this thread but the problem wasn't to do with Node-red.  
I found that i had to set the priorities for the adapters what happened was it was choosing the eth0 network over the wlan0 network so simply adding in metric 300 and metric 200 solved the issue  
Thanks for the help  
 ![Raspberry pi priorities](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/4/447c2ddd97b2bd8321858358134fb076089b15f6.jpeg)

---

<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:** [15 April 2021 08:12 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895/7 "2021-04-15T08:12:49Z")

</div>

Possibly a better way to solve that would be to setup static routes so there is no ambuity. Tell it to use one router one range of addresses and the other for the rest.

---

<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:** [29 April 2021 08:13 UTC](https://discourse.nodered.org/t/ehostunreach-after-changing-ips/43895/8 "2021-04-29T08:13:47Z")

</div>

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