Some errors in openhab.log

  • Platform information: Linux
    • Hardware: Intel 64
    • OS: ubuntu 16.04

I found two errors in my openhab.log which I wanna solve and I could not find soemthing by googling.

First one, ok it is a warning:

 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "arping" (in directory "."): error=2, No such file or directory)

Second one:
note: my mqtt is running in a docker container:

 [ERROR] [penhab.io.transport.mqtt.MqttService] - Error starting broker connection
org.eclipse.paho.client.mqttv3.MqttException: Verbindung zu Server kann nicht hergestellt werden
	at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:79) [205:org.openhab.io.transport.mqtt:1.11.0]
	at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:650) [205:org.openhab.io.transport.mqtt:1.11.0]
	at java.lang.Thread.run(Thread.java:748) [?:?]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:?]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:?]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:?]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
	at java.net.Socket.connect(Socket.java:589) ~[?:?]
	at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:70) ~[?:?]
	... 2 more

most of the time my usage of mqtt is working, temperature values are displayed in a chart …
but sometimes I am facing issues

Many thanks in advance

The first one comes from the Network binding. It is looking for the arping program but you apparently do not have it installed. You don’t have to install it but arping works pretty well for detecting devices that go to sleep and so not respond to regular pings, like iPhones.

There only way I know to get rid of the error us to install arping. See the Network binding readme for details.

The second problem has something to do with dropped connections to the MQTT broker.

1 Like

Any idea where and how I could go for a search for this root cause?

Look at the broker’s logs and compare to openhab.log when the error occurs. Do you have any other clients that connect to the broker? Are they using a unique client ID when they connect?

I found the mqtt error it is running again. Thanks for your help

One question on arping, should it be added to the docker container or installed on root system?

Thanks

It would help the community if you post what the problem was and how you fixed it.

It you are running in Docker there is an open issue to add ping and arping to the base image.

I’ve not had time to work on it. If you have the skills to submit the PR for this that would be awesome. I can help with the github PR process if you need it.

To answer your question, the arping needs to be made available to OH so it needs to be in the container.

1 Like

I know but it was such a stupid mistake i am ashamed of me and do not dare to write that I missed in my mqtt container the restart always command. It was simply not running

It is the posts about mistakes like these that can be the most useful. We all make foolish mistakes like this and sometimes they are the hardest to find.

1 Like

I am not good with this Dockerfile and so on. But I found this one. And now my simple mind is thinking we just have to add it to Dockerfile and use this .sh?!

In a way yes. To add arping and ping to the docker container we just need to update the Dockerfile to install them. So it is as simple as adding them to the apt-get install in the Dockerfile, like you see in that Docker. The changes necessary is simple, but the changes need to be tested and that is where I’ve not had time.

The arping.sh does nothing for us. That docker container is designed to start running arping as soon as it starts running, hence the script. The Network binding will be the one calling arping in our case.