Pinging from Openhab Docker Container

I have openHAB installed within a docker container. However I am unable to use aring to ping the Internet (eg. 8.8.8.8). The error message is:
No matching interface found. Pinging my router with arping 10.0.2.1 works however…

Any ideas?

Daniel

arping only works for devices on your LAN. It can not and will never work for internet services and the like.

What Rich said, but if you want to test/verify internet connectivity, the classic cli tool is ping. However, my preferred cli tool is mtr (My TraceRoute), with which you get information about every router on the path between your system and the target of your probe.

That is interesting. up until i switched to docker, this thing was working quite ok.

Thing network:pingdevice:google_ns [ hostname="8.8.8.8" ]

@scottk
How did you then integrate mtr into openHAB?

Hi, I also had some issues today resolving a host name in the openHAB docker container. I tried to set the influxdb service url via hostname instead of IP. Thanks to this topic I learned to use arping instead of ping for testing :slight_smile:
I realized that within the openHAB docker container, hostnames are converted to lowercase before trying to resolve them. I don’t know whether this is intentional or not.

for example:

wget http://InfluxDB:8086                                                                                                                                                                                                                                 
--2020-09-06 15:34:59--  http://influxdb:8086/                                                                                                                                                                                                              
Resolving influxdb (influxdb)... failed: Name or service not known.                                                                                                                                                                                         
wget: unable to resolve host address ‘influxdb’

arping InfluxDB works by the way. Setting the influxdb hostname to the lowercase variant resolves the issue. The wget test as well as the influxdb config work know.

I thought I just document this here for future reference.