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

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: / Operation not permitted (sendto failed) Operation not permitted (sendto failed)
at Method) ~[?:?]
at [?:?]
at org.jupnp.transport.impl.DatagramIOImpl.send( [173:org.jupnp:2.3.0]
at org.jupnp.transport.impl.DatagramIOImpl.send( [173:org.jupnp:2.3.0]
at org.jupnp.transport.RouterImpl.send( [173:org.jupnp:2.3.0]
at org.jupnp.protocol.async.SendingSearch.execute( [173:org.jupnp:2.3.0]
at [173:org.jupnp:2.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
at java.util.concurrent.ThreadPoolExecutor$ [?:?]
at [?:?]

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 (build 1.8.0_181-b122)
OpenJDK Client VM (Zulu (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
   client4 upnp accept dst

The first line allows outgoing IGMP requests DST= PROTO=2, the second one allows outgoing UPNP DST= 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