openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
821 stars 251 forks source link

Network lost upon restart #143

Closed 1activegeek closed 7 years ago

1activegeek commented 7 years ago

On occasion, I've had a need to restart the system. It seems I'm running into an odd issue though that only strikes on reboots where power isn't lost to the system. If I was to totally power off the system, then start it again, I have no issue.

If I issue a shutdown -r now command, the system will reboot. Since I have a WiFi connection, I'm able to get connected again, but it's not coming up on the wired network connection. If I go and manually unplug, then replug, the ethernet cable - it will then come back online without an issue.

Hardware: Pine64 1GB openHABian Image version: xenial-20170317

Happy to help provide any logs that might be deemed necessary or relevant if this can be investigated and figured out. It's been quite an annoyance to need to manually go down into the basement to reset this so that everything get's the best connectivity via the hardwire. Wifi is really intended as my backup and/or for when I need to battery power the Pine64 to walk around and do ZWave inclusion.

ThomDietrich commented 7 years ago

Hey @1activegeek , sorry for the delay. Is this problem still present? This sounds like a rather strange behavior. You'll need to take this issue up to https://github.com/longsleep/build-pine64-image though, which is the base image for the openHABian image. It might be interesting to see if the latest version of the longsleep image has this problem as well. Would you be able to test this (with a second sd card)?

1activegeek commented 7 years ago

@ThomDietrich - I believe it is indeed. I haven't tested lately, but nothing else has changed, so I have no reason to believe it has changed. I tend not to like "testing" it often unless necessary due other the fact that it hangs my OpenHAB setup (HomeKit and Hue) don't like the switch from the physical NIC to the Wifi NIC. Due to the physical not lighting up properly, everything is then advertised from the Wifi NIC. Those 2 bindings specifically are a bit finicky with this scenario.

I will look at opening an issue on the larger build. I know there was an issue addressed similarly upon regular startup, but it seems this bug creeps into the restart now instead. When I updated the image originally this got rid of the first issue.

ThomDietrich commented 7 years ago

Heyho, any news?

1activegeek commented 7 years ago

I did post an issue on the Longsleep image github as you suggested. Have not heard anything back however. Haven't gotten around to testing out a core build yet. Hoping to try this at some point this week - but can confirm this is still an issue in the current build. I had a different issue the required a reboot, and so I tested, no dice. Had to fully shutdown and restart n fact this time.

ThomDietrich commented 7 years ago

I'll release a new openHABian image based on the latest longsleep hopefully today. You can use this one for your test if you like...

1activegeek commented 7 years ago

@ThomDietrich Aha! Ok that will make things easier, as I'm used to the OpenHABian interface at this point. Running stock Debian might be a bit of a learning curve again to pull out my necessary skills for things like getting the WiFi connected again. 😉 I likely won't get around to testing until Thursday anyhow, so I'll try and get you feedback as soon as I can.

FulvioSpelta commented 7 years ago

Hi all, sorry for the noob question: where i can find the new image to test ? In the official release i've found the 1.2 that have the problem.

thx

LeDumpier commented 7 years ago

Hi @ThomDietrich,

Openhabian has really come along nicely, your work is much appreciated.

I wonder if you can help me here. When I install with the WiFi credentials input in openhabian.config in the boot area, the system boots up fine and connects to WiFi. All good. However, as soon as I restart the pi (sudo reboot), the Pi is never seen on the network again :(

So that's got me a bit stumped. The credentials are definitely fine as it connects on first boot but never again. Any idea what may be wrong?

1activegeek commented 7 years ago

@FulvioSpelta - I don't know that @ThomDietrich has indeed uploaded the new version yet. I'm sure as we often do, he got tangled up in something or roped into something that pulled him away from being able to get this put together.

LeDumpier commented 7 years ago

It looks like there is an update on the openhabian-config menu as it is broken down into sections now. I've faced this issue for 2 weeks now. I've moved to a different guesthouse so maybe it's a router issue maybe?

ThomDietrich commented 7 years ago

Hey guys! @1activegeek is eyactly right. I've finished all big changes on Monday but since than didn't have the time to release & announce. I'll do that today! "tangled up in something or roped into something" - you could do say that 😃 1, 2 The build for the PineA64 took a few more minutes as there bugs in the upstream project. Anyhow that's settled now and I've prepared a PR there. I'd be happy to get first reviews by you guys as soon as the image is available.

@1activegeek I'd also be interested in your opinion about #158

@LeDumpier The configuration tool is already up to date. The image also received slight improvements but these are not interesting for users who already have a working system. Regarding your Wi-Fi problem, I'll be sure to test rebooting right away but I didn't encounter anything like it in the past days.

1activegeek commented 7 years ago

Thanks @ThomDietrich - I don't blame you for getting tangled up in that kind of fun! 😉 I'll wait to see the new image and hopefully get a chance this weekend to test it out.

I also posted in #158 with my two cents. Although I'm a bit confused as I thought the MAC was already static.

1activegeek commented 7 years ago

So I finally got around to running the new image. I have 2 boards, and it's possible this board I'm testing with has some type of power problem. I think I actually fried something at one point. I'm getting intermittent results with even coming back up (which I did experience on occasion on the other as well). Without any setup/customization, it is receiving the same IP so I would assume the static piece is working. Additionally, when it does manage to restart and come back up, it does come back up with Ethernet working and a proper IP.

I used an HDMI cable to validate/view the status of the board actually coming online vs having some type of failure.

I think it's safe to say this issue does look to be resolved at it's core. Whether it was from the static IP setting or from the updates in long sleep image - I don't care 😛 - it works. I'll try testing on my actual running openhabian board and move my data over. Hopefully get done before the weekend is out. I'll let you know how it goes but I think I'll mark this closed now as I think you resolved it!

ThomDietrich commented 7 years ago

Great news @1activegeek !! Enjoy moving, hope everything works out fine. Because you are one of the active openHABianPine users it would btw be great if you stayed in contact and e.g. proposed improvements or similar. My productive system is a RPi, might just be I'll miss out on stuff ;)

FulvioSpelta commented 7 years ago

Hi all. Just to confirm that i've downloaded 1.3 for PINE64 and tried it. Again i found problems on power cycle so I've added serial console and tracked out some logs.

Step to reporoduce: 1) created a new sd writing with w32DiskImager the 1.3 release (file: openhabianpine64-xenial-201706161506-git7ff273e-crcadda6dbb.img) 2) Power on and wait for first boot complete (ok) 3) Tried "sudo reboot" - ok 4) "sudo shutdown now" and wait for power off 5) Cycle to power on - no more boot

Attached you can find 3 logs of 3 different boot attempt. Thanks for your collaboration pine.zip

1activegeek commented 7 years ago

@FulvioSpelta - are you saying no more boot, as in it won't start at all? Or that it boots, but won't bring up the network?

The issue here was the network not coming back up. If you are having an issue getting the device to even power up, that sounds like an issue outside the scope here. I have this odd situation occur at times on mine as well, it generally just requires attempting to unplug/re-plug. I can't isolate what it is, but isn't the same issue here and I have a feeling isn't specific to openHABian.