# N-RED server (raspberry ZW) still off after reconnect to wifi

**URL:** https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693
**Category:** General
**Created:** [18 August 2020 14:10 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693 "2020-08-18T14:10:49Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![danielbgc](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@danielbgc](https://discourse.nodered.org/u/danielbgc)
#### Post date: [18 August 2020 14:10 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/1 "2020-08-18T14:10:49Z")

</div>

In summary, I run a node-red server on a raspberry pi (zero w in desktop OS), almost everything works perfectly.

My only problem is the internet at my house, sometimes it goes down and reconnects. After that happens and the rasp manages to reconnect to the internet, but the server apparently remains offline.

I can even access the page of the nodes through the raspberry (using the monitor, since I use Desktop OS), but it no longer responds to commands that I send from outside and I can no longer access the page of the nodes by the IP address.

So, every time this happens I need to restart my raspberry to get it back to normal.

I thought about restart raspberry if lost connection to the internet, but I don't know how I could do that.

I appreciate any 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: [18 August 2020 14:58 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/2 "2020-08-18T14:58:50Z")

</div>

When you you say it is not accessible via its ip address is that the ip address on the local network or is it only access via the router's external ip address that does not work?

---

<div class="post-metadata">

### Author: ![danielbgc](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@danielbgc](https://discourse.nodered.org/u/danielbgc)
#### Post date: [18 August 2020 17:43 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/3 "2020-08-18T17:43:21Z")

</div>

I cant access from my PC using rasp IP:1880 and the server no longer responds to commands that i send from my pc ou smartphone.

---

<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: [18 August 2020 18:14 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/4 "2020-08-18T18:14:53Z")

</div>

By rasp IP do you mean the ip on the internal network? If you ping that address does it reply?  
What does  
`ifconfig`  
show on the pi before and after the problem?

---

<div class="post-metadata">

### Author: ![danielbgc](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@danielbgc](https://discourse.nodered.org/u/danielbgc)
#### Post date: [18 August 2020 19:02 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/5 "2020-08-18T19:02:29Z")

</div>

When its working i can get normal reply from ping, but after internet goes down i will no to test, cant say it for sure.

and about the ip, sorry i dont undestant that much, i think its the internal network, its my raspberry ip from my router.

---

<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: [18 August 2020 19:48 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/6 "2020-08-18T19:48:21Z")

</div>

> [@danielbgc](#):
>
> but after internet goes down i will no to test, cant say it for sure.

Sorry, I don't understand what that means. We need an answer to that question as it will tell us whether the pi is responding at all to the network.

Also run the command  
`ifconfig`  
in a terminal on the pi. Copy and paste the output somewhere. When it fails run that command again and then post both here.

What is the ip address you are using to access it?

---

<div class="post-metadata">

### Author: ![danielbgc](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@danielbgc](https://discourse.nodered.org/u/danielbgc)
#### Post date: [18 August 2020 20:11 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/7 "2020-08-18T20:11:16Z")

</div>

i will need to test\*, sorry.

i save the ifconfig when its running normal. When it goes down again i will check to see the result.

---

<div class="post-metadata">

### Author: ![danielbgc](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@danielbgc](https://discourse.nodered.org/u/danielbgc)
#### Post date: [18 August 2020 23:14 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/8 "2020-08-18T23:14:42Z")

</div>

Sorry for the confusion. I found out more about it. In fact, what was offline was not the node red server, but the internet connection of the raspberry pi itself.  
How can I make the raspberry test the internet every 5 minutes for example, in case it is offline, it does a reboot?

---

<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: [19 August 2020 06:32 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/9 "2020-08-19T06:32:09Z")

</div>

I would first try and understand what is failing, it should automatically reconnect. Do you mean that the pi cannot access the internet (can you browse to [google.com](http://google.com) on the pi?) Or do you mean you cannot access the pi from the internet?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [19 August 2020 06:48 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/10 "2020-08-19T06:48:52Z")

</div>

> [@danielbgc](#):
>
> How can I make the raspberry test the internet every 5 minutes for example, in case it is offline, it does a reboot?

That can get nasty.

Say the internet **IS** down. You don't want the RasPi rebooting every 5 minutes.

I too have a RasPi zero (W). It is painful when the WAP goes down.  
WAP - how that machine talks to the internet.

Reading your posts some things come to mind needing answering.

# So what I believe:

All working fine.

Internet goes down.

Internet comes back up.

The RasPi is _non responsive_.

You still haven't said if it is the RasPi or Node-Red  
If you can ping the RasPi from another machine that is good.

But I am seeing you say:

> [@danielbgc](#):
>
> I cant access from my PC using rasp IP:1880 and the server no longer responds to commands that i send from my pc ou smartphone.

To me that means Node-red isn't running.

Which is a whole other thing.

First thing to do:  
`ssh` to the RasPi.  
`sudo systemctl status nodered.service`

What does that say?

It will be either `running` or `stopped` (I think.)  
(Isn't too hard to get the take on what it is doing.)

> [@danielbgc](#):
>
> I can even access the page of the nodes through the raspberry (using the monitor, since I use Desktop OS), but it no longer responds to commands that I send from outside and I can no longer access the page of the nodes by the IP address.

Argh!

So it isn't headless. (Yeah, my bad.)  
Then it (the RasPi) may not be connected to your WAP.

As said a few times by @Colin: On the RasPi:  
`ifconfig` and see if `wlan0` is doing.

My Zero has a real bad time when my WAP goes down.  
And WAP is very different to internet.

Though when the internet goes down the WAP seems to go down in sympathy. (Annoying)

Honestly, you could save a lot of pain and get a RasPi 3b and connect it via ethernet.  
That will get rid of a lot of the problems you are having.

Unless you want the portability the Zero offers. Though a 3B is not much bigger. So really that isn't a reason.

All that stuff about `ssh`.... Well, if you have a monitor: open a terminal (CLI) and type the command.

---

<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: [19 August 2020 07:19 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/11 "2020-08-19T07:19:44Z")

</div>

> [@Trying\_to\_learn](#):
>
> To me that means Node-red isn't running.

It has already been established that node-red is running.

As I said, the first thing to determine is where the connection is failing, so we need the answer to the questions I asked in my previous post.

@danielbgc It would also be useful to see the results of the `ifconfig` command before and after the failure.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [19 August 2020 07:33 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/12 "2020-08-19T07:33:48Z")

</div>

Fair enough.

And again I have a very similar - if not the same problem - with a RasPi Z (W) but mine is headless.

Sometimes it _goes offline_ as far as my system is concerned, but when it is rebooted, (powered down and back up) it was running NR and _working_ up until that time.

---

<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: [19 August 2020 07:42 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/13 "2020-08-19T07:42:46Z")

</div>

> [@Trying\_to\_learn](#):
>
> not the same problem

Best to start a new thread then But first look in the log on the pi to see what happened. For example has the wifi disconnected?

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [19 August 2020 08:02 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/14 "2020-08-19T08:02:54Z")

</div>

I'm not too worried I was just mentioning that I have a similar problem and offering suggestions.

---

<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 October 2020 08:03 UTC](https://discourse.nodered.org/t/n-red-server-raspberry-zw-still-off-after-reconnect-to-wifi/31693/15 "2020-10-18T08:03:02Z")

</div>

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