hola
hola copied to clipboard
Fails on Raspian Jessie since 0.2.2 with SocketException
After I updated my dependencies from hola 0.2.1 to 0.2.2 my app is running into following Exception when run on my Rasperry Pi 3 with Jessie:
java.net.SocketException: bad argument for IP_MULTICAST_IF: address not bound to any interface at java.net.PlainDatagramSocketImpl.socketSetOption0(Native Method) at java.net.PlainDatagramSocketImpl.socketSetOption(PlainDatagramSocketImpl.java:74) at java.net.AbstractPlainDatagramSocketImpl.setOption(AbstractPlainDatagramSocketImpl.java:309) at java.net.MulticastSocket.setInterface(MulticastSocket.java:471) at net.straylightlabs.hola.sd.Query.openSocket(Query.java:186) at net.straylightlabs.hola.sd.Query.runOnceOn(Query.java:122) at net.straylightlabs.hola.sd.Query.runOnce(Query.java:107) ...
It trys to find a service running on the same machine. It works on my Windows 64bit machine, but does not once deployed to the Raspberry. Going back to 0.2.1 fixed the issue for me.
Java, write once, debug everywhere...
Had same problem on Ubuntu 18.04 with 0.2.2. 0.2.1 fixed it.
Same here on Ubuntu... going back from 0.2.3 to 0.2.1 made it work for me as well.
Appears to be one of these two commits that broke it: https://github.com/fflewddur/hola/commit/3dac52ee98ec9c0b8e0fa35dc6b18bc120f9d531 https://github.com/fflewddur/hola/commit/233c0c4a13dc034b1523f47ec71d85e872916b9f
Probably a combination of the two, since they are both changing what happens in the RunOnce where it fails.
fixed in the above commit on my fork, if you need a release, see https://github.com/Sagebits/hola/releases/tag/v0.2.4-sagebits
also published to maven central as
<dependency>
<groupId>net.sagebits</groupId>
<artifactId>hola</artifactId>
<version>0.2.4-sagebits</version>
</dependency>