Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.net.PlainDatagramSocketImpl.join(Native Method), invalid argument

0 views
Skip to first unread message

Craig Rodrigues

unread,
Feb 22, 2014, 11:45:22 PM2/22/14
to
Hi,

I can reproduce the following problem pretty easily
on FreeBSD 9, 10, CURRENT.

(1) Install the devel/jenkins port

(2) Run:

service jenkins onestart

(3) In /var/log/jenkins.log, I see a traceback:

WARNING: UDP handling problem
java.net.SocketException: Invalid argument
at java.net.PlainDatagramSocketImpl.join(Native Method)
at
java.net.AbstractPlainDatagramSocketImpl.join(AbstractPlainDatagramSocketImpl.java:168)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:300)
at hudson.UDPBroadcastThread.run(UDPBroadcastThread.java:76)
Feb 22, 2014 5:21:00 PM hudson.WebAppMain$3 run



I reported this bug against Jenkins:

https://issues.jenkins-ci.org/browse/JENKINS-21727


but now I suspect that this is a FreeBSD bug or
implementation with respect to multicast.


Can someone help me debug this and isolate the problem?
It's been a while since I've debugged Java code.

Thanks.
--
Craig
_______________________________________________
freebs...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "freebsd-java...@freebsd.org"

Dan Daley

unread,
Feb 23, 2014, 9:53:02 AM2/23/14
to

I ran into this issue about a year and a half ago. If this is the same issue, it had something to do with the way an IPv4 address is bound to IPv6.
I also ran into the issue on some older flavors of linux, though it seems that the issue didn't happen on newer flavors.

Sorry, I don't remember more details now. But, maybe someone else can shed more light on the IPv4/IPv6 issue with UDP in Java.

Daniel Eischen

unread,
Feb 23, 2014, 10:25:43 AM2/23/14
to
On Sun, 23 Feb 2014, Dan Daley wrote:

>
> I ran into this issue about a year and a half ago. If this is the
> same issue, it had something to do with the way an IPv4 address is
> bound to IPv6. I also ran into the issue on some older flavors of
> linux, though it seems that the issue didn't happen on newer flavors.
>
> Sorry, I don't remember more details now. But, maybe someone else can
> shed more light on the IPv4/IPv6 issue with UDP in Java.

Sorry, I missed this thread. Craig, did you try forcing
IPv4 by setting java.net.preferIPv4Stack=true? You can
do it on the run line with -Djava.net.preferIPv4Stack=true
or setting it in the code with System.setProperty
("java.net.preferIPv4Stack", "true").

I have to do this for our own applications that use
multicast. I think the JRE recognizes that the OS
has IPv6 enabled and tries to use that instead of
IPv4.
--
DE
0 new messages