Openhabian on RaspberryPi2ModelB gets IP but error: no network!

Hi,
I am new to home-automation and fairly inexperienced with linux. I tried to install openhabian on a raspberrypi 2 model B and 8Gb micro-SD. I had ubuntu on it before, with openhab 1.8 which I could connect to through my browser or ssh (but had problems with my bindings).
After first and every boot of the OpenHabian image, the installation hangs on ‘no connection…’. But I can connect to the Pi with ssh (openhasbian/openhasbian).
I flashed using Etcher like advised, the check did not result in errors.
I rebooted several times, reflashed several times, I tried a different more expansive power adapter, I tried a 32Gb microSD, with or without the USB Z-stick, but no success. The Pi does get an IP, I can connect to it using putty, but it won’t connect to the internet to get the installation files.

Off topic:

I also tried using raspbian and manual install, but no matter what I do, I can not get a ssh connection that way. I know it is turned off by default and you can turn it on through the config tool. But this did not work for me.<

So what can I check or do to get this working?
Thanks for helping!

Hello Guido, welcome to openHABian! :wave:

Sounds like you did everything right so far. To ensure (or support) a long lifetime of your system I’d recommend to work with the 32GB or a 16GB SD card.

The described problem is new to me.
I’m not sure what you mean with “no connection…”. Please go through this section of the documentation: http://docs.openhab.org/installation/openhabian.html#successful - Afterwards please send a screenshot or copy of the error message you are seeing.

Good luck! Happy Hacking :wink:

Ok, I get the following after (re)booting:

2017-04-10_09:59:10_UTC [openHABian] Starting the openHABian initial setup. This might take a few minutes.
2017-04-10_09:59:10_UTC [openHABian] If you see this message more than once, something went wrong!
2017-04-10_09:59:10_UTC [openHABian] Storing configuration… OK
2017-04-10_09:59:10_UTC [openHABian] Changing default username and password… OK
2017-04-10_09:59:11_UTC [openHABian] Setting up Wifi connection… SKIPPED
2017-04-10_09:59:11_UTC [openHABian] Ensuring network connectivity… 2017-04-10_09:58:48_UTC [openHABian] Starting the openHABian initial setup. This might take a few minutes.
2017-04-10_09:58:48_UTC [openHABian] If you see this message more than once, something went wrong!
2017-04-10_09:58:48_UTC [openHABian] Storing configuration… OK
2017-04-10_09:58:48_UTC [openHABian] Changing default username and password… SKIPPED
2017-04-10_09:58:48_UTC [openHABian] Setting up Wifi connection… SKIPPED
2017-04-10_09:58:48_UTC [openHABian] Ensuring network connectivity…
2017-07-02_11:48:55_UTC [openHABian] Network unreachable, can’t continue. Please reboot and let me try again.
2017-07-02_11:48:55_UTC [openHABian] Initial setup exiting with an error.
2017-07-02_12:14:39_UTC [openHABian] Starting the openHABian initial setup. This might take a few minutes.
2017-07-02_12:14:39_UTC [openHABian] If you see this message more than once, something went wrong!
2017-07-02_12:14:39_UTC [openHABian] Storing configuration… OK
2017-07-02_12:14:39_UTC [openHABian] Changing default username and password… SKIPPED
2017-07-02_12:14:39_UTC [openHABian] Setting up Wifi connection… SKIPPED
2017-07-02_12:14:39_UTC [openHABian] Ensuring network connectivity… 2017-07-02_12:17:12_UTC [openHABian] Starting the openHABian initial setup. This might take a few minutes.
2017-07-02_12:17:12_UTC [openHABian] If you see this message more than once, something went wrong!
2017-07-02_12:17:12_UTC [openHABian] Storing configuration… OK
2017-07-02_12:17:12_UTC [openHABian] Changing default username and password… SKIPPED
2017-07-02_12:17:12_UTC [openHABian] Setting up Wifi connection… SKIPPED
2017-07-02_12:17:12_UTC [openHABian] Ensuring network connectivity…
2017-07-02_12:43:20_UTC [openHABian] Network unreachable, can’t continue. Please reboot and let me try again.
2017-07-02_12:43:20_UTC [openHABian] Initial setup exiting with an error.
2017-07-07_04:17:10_UTC [openHABian] Starting the openHABian initial setup. This might take a few minutes.
2017-07-07_04:17:10_UTC [openHABian] If you see this message more than once, something went wrong!
2017-07-07_04:17:10_UTC [openHABian] Storing configuration… OK
2017-07-07_04:17:10_UTC [openHABian] Changing default username and password… SKIPPED
2017-07-07_04:17:10_UTC [openHABian] Setting up Wifi connection… SKIPPED
2017-07-07_04:17:10_UTC [openHABian] Ensuring network connectivity…
2017-07-12_17:09:47_UTC [openHABian] Network unreachable, can’t continue. Please reboot and let me try again.
2017-07-12_17:09:47_UTC [openHABian] Initial setup exiting with an error.
2017-07-12_21:11:34_UTC [openHABian] Starting the openHABian initial setup. This might take a few minutes.
2017-07-12_21:11:34_UTC [openHABian] If you see this message more than once, something went wrong!
2017-07-12_21:11:34_UTC [openHABian] Storing configuration… OK
2017-07-12_21:11:34_UTC [openHABian] Changing default username and password… SKIPPED
2017-07-12_21:11:34_UTC [openHABian] Setting up Wifi connection… SKIPPED
2017-07-12_21:11:34_UTC [openHABian] Ensuring network connectivity…

And it keeps repeating this when I reboot. So apparently, the raspi can not connect to internet. But I can ssh to it so there is some connection, and I do not have any rules in my router concerning this ip (I even just checked this again to back this up).

I have no idea what to do next, please help.

Hello @Guido_van_Haasteren,
this is strange. Could you please do some testing? As you can see here the system is trying to ping a commonly used google server to ensure internet availability. Would you please check if you can ping the server from ssh?
I’m confused as to why your system is rebooting. As you can see, there should be an error message in case your system doesn’t detect an internet connection.

Hell @ThomDietrich,
I tryed to ‘ping 8.8.8.8’ both from my laptop and through ssh from the raspberrypi. Bith 100% unseccessfull.
It turns out I can not ping anything outside my lan. Not even 216.58.211.131, which is the google site I can reach with my browser. This must therefore be something with my router. I will put the raspberry in DeMiliterizedZone and try again.

Thanks for your help, I will report later.

Seams to be not as simple as I thought. My router is Tp-link Archer C7 and it blocks ping, no matter how you configure it. Is it possible to just skip this test? It is doing more harm than help I think.

Turns out the option to let ping pass the Archer C7 router was added in my firmware version, but not in my documentation. Openhabian is running! Thank you very much for pointing me in the right direction!

1 Like

Glad you got it working. An alternative to ping for the online check would be an http request. If anyone runs into the same issue and reports here, I’ll reconsider it. :wink: Best!

I have a similar issue. While I can ping various URLs such as google.com or IPs such as 216.58.196.142 with no problems, I cannot ping 8.8.8.8.

traceroute gives the following:

traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
 1  router.asus.com (192.168.1.1)  0.415 ms  0.445 ms  0.468 ms
 2  103-9-40-37.flip.co.nz (103.9.40.37)  12.205 ms  12.851 ms  13.254 ms
 3  * * *
 4  * * *
 ...

Likewise for 8.8.4.4, so my ISP must be choosing not to provide access to the Google DNS servers for some reason.

After editing /boot/first-boot.sh to ping google.com rather than 8.8.8.8 the setup continued successfully

Okay we need to do something here. I’d like to stay with IP addresses. Maybe pinging multiple needs to be considered… Are you able to ping 4.2.2.2?

To solve both your problems how about this solution: https://superuser.com/a/769248
@SamB and @Guido_van_Haasteren wdyt?

1 Like

Ha, Nice gif! It did feel that way!
But I solved it by finding out that, contrary to lots of google posts, there was a setting in my router preventing pinging the big bad world. I have never heard of a provider preventing pings to the internet. I think @SamB will in the end find some setting somewhere too that solves the probem. That said, a better check with less problems would be very hepfull for lots of people. No matter whether the ping-problem can be solved by the users or not.
If the mictosoft way is a good way, then by all means!

Just thinking out loud, not hindered by any sort of knodlegde :wink: Why test the network at all? Why not just start downloading and if this does not succeed within say 1 minute, give up? Isn’t that the real test?

Seems like a good approach. I can ping 4.2.2.2, but making an HTTP request seems more robust since it’s less likely to be blocked

I don’t believe this has anything to do with my router or local network - I can ping any other IP or hostname fine, and traceroute shows that requests to 8.8.8.8 (of any sort, not just ping) stall at my ISP, not at my local router. So the request is leaving my network, and being blocked externally.

In fact, I have just checked my ISP knowledge base and they explicitly say that Google’s DNS is blocked to implement some sort of child-safe-browsing mode (which I don’t use, but am obviously being affected by!)

Good that the http-refference works.
@SamB: Sorry I commented on your problem as if you would have done something wrong. That was my case, not yours. I didn’t mean anything personal.

Hey guys,
I’ve created an issue for this task: https://github.com/openhab/openhabian/issues/192 - please add your idea and comments :wink:

That is also done in the next step of the script. I thought it might be beneficial to go at it step by step. Ruling out the internet connection before ruling out the repositories (yes there are ISPs blocking certain repos)…

@ThomDietrich: it is only usefull to do a two-step approach if there is a clear feed back to the user. You could do the ping check, and if it fails, go on with download attempt, while mentining a warning: 'could not ping google-dns, proceding with download…'
Or let the user decide: ignore/stop.
Then at least the user knows which step is failing. And if only ping fails, you still have a chance to successfully install.

Hey guys!
Happy to report that I’ve just tackled the issue. See: https://github.com/openhab/openhabian/commit/9cf502b793bb67c644bb01b9ba30415a01fab5c1
I’ll release a new version of the openHABian image in the next 1-2 days. It would be a huge help if either or both of you could test the new image to see if the problem still exists. Thanks!

If you are using the v 1.3 image, edit the first-boot.sh file and change 8.8.8.8 to 9.9.9.9.

I tested OpenHasbian1.4 today on rspberrypi 2B.
I had to plug in ethernet since the wifi support from openhabian.conf is only for rpi3 models with wifi on board. Then everything went fine.
After oh-installation compleets, I had to change the keyboard layout using dpkg-reconfigure keyboard-configuration. That is succeded.
Now I need to get my wifi dongle up.
Iwconfig tells me the adapter is seen. I can also scan for ssid’s: sudo iwlist scan.
I managed to create a file wlan0 in /etc/network/interfaces.d/ using the forbidden ‘sudo su’, but couldnt otherwise.
I added my psk doing wpa_passphrase SSID MYPSKEY > /etc/network/interfaces.d/wlan0
And then with nano I added some thong I found in the wili from debian:
auto wlan0
Iface wlan0 inet dhcp
wpa-…
wpa-…

Saved and exited.
Then: ifup wlan0
But I get this error:
Wpa_supplicant: sbin/wpa_supplicant daemon failed to start
Run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Ifup: failef to bring up wlan0

I retried as normal user, but then I get a permissipn denied.

How should I bring up my wifi. Did I do wrong with all above?

hello !

i have allready the same problem :

2018-02-18_19:41:35_UTC [openHABian] Starting the openHABian initial setup.
2018-02-18_19:41:35_UTC [openHABian] Storing configuration… OK
2018-02-18_19:41:35_UTC [openHABian] Changing default username and password… SKIPPED
2018-02-18_19:41:35_UTC [openHABian] Setting up Ethernet connection… OK
2018-02-18_19:41:35_UTC [openHABian] Ensuring network connectivity… FAILED
2018-02-19_00:26:29_UTC [openHABian] The public internet is not reachable. Please check your network.
2018-02-19_00:26:29_UTC [openHABian] Initial setup exiting with an error!

i check my internet connection and all is right, the iso file is
openhabianpi-raspbian-201712171718-git30faec3-crccc053823.img

i can ping 9.9.9.9 or 8.8.8.8
i can connect on ssh with putty the raspberry have an ip adresse 192.168.1.48

have you got an idea.

thanks

Hi,

I also have exactly the same problem (as described by bruce) and same iso file

Looking at your solution #192 I noticed you were pinging 8.8.8.8 as part of the tests but looking in my first-boot.sh file I noticed that the ping was 9.9.9.9.

Similarly to bruce directly pinging 9.9.9.9 or 8.8.8.8 worked and the get command returned the correct string so I would expect either would work.

I changed the 9.9.9.9 to 8.8.8.8 and it now appears to be working in that it appears to be loading

Hopefully, this will help