Ole8700 / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
1 stars 0 forks source link

Networkhealth binding does not use ICMP on Linux when running openhab as non-root #233

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce the problem
1. Run openhab as non root
2. Configure network health binding to a host with a ping configuration (no 
port defined)
3. Configure host to only respond to pings (if necessary, block port 7 on 
firewall to the host)

Further details: Issue is described here: 
http://bordet.blogspot.com/2006/07/icmp-and-inetaddressisreachable.html

Implications: if the host only supports icmp requests (like some embedded 
solutions), openhab report the host as being offline

Applies to all versions of the product on Linux. Windows environment has not 
been tested, but should have the issue.

A possible alternatives are described here: 
https://github.com/lisa-lab/pings/blob/master/client/IcmpPinger.java
http://www.0x13.de/index.php/code-snippets/74-icmp-ping-in-java.html

I am not proficient in Java, but could try to implement a fix if you would 
advise on the best approach.

Original issue reported on code.google.com by tomazh.s...@gmail.com on 9 Apr 2013 at 6:42

GoogleCodeExporter commented 9 years ago
I think this is a duplicate of issue 134, right?

Original comment by kai.openhab on 9 Apr 2013 at 4:26

GoogleCodeExporter commented 9 years ago
Yes, you are right, sorry ... Could you advise on the best approach, and I 
would try to fix this.

Original comment by tomazh.s...@gmail.com on 9 Apr 2013 at 6:04

GoogleCodeExporter commented 9 years ago
I do not see any best approach as all suggested solutions require native code 
execution, either through calling the CLI or by using JNI. So I do not see any 
pure-Java, platform-independent way to solve this issue.

Original comment by kai.openhab on 9 Apr 2013 at 7:38