hola icon indicating copy to clipboard operation
hola copied to clipboard

Fails on Raspian Jessie since 0.2.2 with SocketException

Open ledan87 opened this issue 6 years ago • 4 comments

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...

ledan87 avatar Mar 03 '18 21:03 ledan87

Had same problem on Ubuntu 18.04 with 0.2.2. 0.2.1 fixed it.

jconlon avatar Aug 31 '18 00:08 jconlon

Same here on Ubuntu... going back from 0.2.3 to 0.2.1 made it work for me as well.

darmbrust avatar Jan 03 '20 22:01 darmbrust

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.

darmbrust avatar Jan 03 '20 22:01 darmbrust

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>

darmbrust avatar Apr 22 '20 02:04 darmbrust