Java error jupnp at openhab startup

  • Platform information:
    • Hardware: Raspnerry Pi 2
    • OS: CentOS 7
    • Java Runtime Environment: zulu latest
    • openHAB version: 2.3.0

Hi,
after every startup of the openhab service i have following errors in openhab.log:

2018-10-06 00:48:11.033 [ERROR] [.jupnp.transport.impl.DatagramIOImpl] - Exception sending datagram to: /239.255.255.250: java.io.IOException: Operation not permitted (sendto failed)
java.io.IOException: Operation not permitted (sendto failed)
at java.net.PlainDatagramSocketImpl.send(Native Method) ~[?:?]
at java.net.DatagramSocket.send(DatagramSocket.java:693) [?:?]
at org.jupnp.transport.impl.DatagramIOImpl.send(DatagramIOImpl.java:156) [173:org.jupnp:2.3.0]
at org.jupnp.transport.impl.DatagramIOImpl.send(DatagramIOImpl.java:149) [173:org.jupnp:2.3.0]
at org.jupnp.transport.RouterImpl.send(RouterImpl.java:300) [173:org.jupnp:2.3.0]
at org.jupnp.protocol.async.SendingSearch.execute(SendingSearch.java:90) [173:org.jupnp:2.3.0]
at org.jupnp.protocol.SendingAsync.run(SendingAsync.java:52) [173:org.jupnp:2.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
at java.lang.Thread.run(Thread.java:748) [?:?]

Can anybody help to get this away?

what is the output of java -version ?

CentOS on rPi2? nice :slight_smile:

Jep CentOS :slight_smile:

Output is:

java -version
openjdk version “1.8.0_181”
OpenJDK Runtime Environment (Zulu 8.31.1.122-linux_aarch32hf) (build 1.8.0_181-b122)
OpenJDK Client VM (Zulu 8.31.1.122-linux_aarch32hf) (build 25.181-b122, mixed mode, Evaluation)

Ok… has to be with the use of multicast in openhab and active iptables
Can multicast be disabled in openhab? Otherwise i have to found some sufficient rules to pass the multicast traffic.

Maybe openhab should catch this exception and only print a single error/warn in log?

I observe the same problem for some time now (on Debian stretch amd64 with OpenJDK as well as with Zulu).

I also think that it’s a problem with iptables (I use firehol on the server), but didn’t find a way to work around this annoying error messages in the log.

@xoxys Did you find a iptables rule to get rid of the errors?

Did some more testing with this and found out, that in firehol the following two lines solve this issue, when added to every local interface:

   client4 all accept dst 224.0.0.22
   client4 upnp accept dst 239.255.255.250

The first line allows outgoing IGMP requests DST=224.0.0.22 PROTO=2, the second one allows outgoing UPNP DST=239.255.255.250 PROTO=udp DPT=1900.

With these two settings the list of errors in my openhab.log shrunk extremly and is now readable again.

@RoRo sorry for the late response. Yes i have implemented a “workaround” for this on my server but as i remember its more widely open as is should be :slight_smile:

I will have a look on my config if i am at home and post an update