Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4453100
Votes 0
Synopsis MulticastSocket's send() giving exception on Linux RH6.2 dual stack machine
Category java:classes_net
Reported Against 1.3.1 , merlin-beta
Release Fixed
State 6-Fix Understood, bug
Priority: 4-Low
Related Bugs 6713900
Submit Date 02-MAY-2001
Description
MulticastSocket's send() is giving exception on LinuxRH6.2 dual stack 
machine when tried to join Multicast IPv6 address and send with some multicast addresses. For example its giving the following exception with ff15::1234:1234:1234:1234 multicast address. It worked fine with 
ff02::1234:1234:1234:1234 and ff01::1234:1234:1234:1234 addresses

ERROR: mcastWriter.mcastWriter(): exception occurred:
java.io.IOException: Cannot assign requested address
java.io.IOException: Cannot assign requested address
        at java.net.PlainDatagramSocketImpl.send(Native Method)
        at java.net.DatagramSocket.send(DatagramSocket.java:503)
        at mcastWriter.<init>(mcastWriter.java:138)
        at mcastWriter.main(mcastWriter.java:92)

How to reproduce it:
---------------------

1. Take the attached mcastWriter.java

2. java mcastWriter -d -v -l 0 -m 10

3. Find the exception message.


Other Information:

1. Same code worked fine on Sol sparc 8 / Sol IA 8 dual stack machines.
2. On same machine I am able to join to a V4 multicast address and send without any problem.






java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)


MulticastSocket throws an error when invoking send() under Linux, it
works under Windows 2000 with this JVM:
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

The sourcecode to reproduce this bug is available in Tomcat/4.0-b6-dev
(http://jakarta. customer .org/cvsweb/index.cgi/jakarta-tomcat-
4.0/catalina/src/share/org/ customer /catalina/cluster/)

relevant files are:
org. customer .catalina.cluster.StandardCluster
org. customer .catalina.cluster.MulticastSender

An excerpt of the trace is as follows:

java.io.IOException: Invalid argument
        at java.net.PlainDatagramSocketImpl.send(Native Method)
        at java.net.DatagramSocket.send(DatagramSocket.java:321)
        at org. customer .catalina.cluster.MulticastSender.send
(MulticastSender.java:205)
        at org. customer .catalina.cluster.MulticastSender.send
(MulticastSender.java:192)
        at org. customer .catalina.session.DistributedManager.createSession
(DistributedManager.java:165)
(Review ID: 127038)
======================================================================
Work Around
N/A
Evaluation
This exception is coming on Redhat Linux dual stack machine with kernel 2.4.3.

  xxxxx@xxxxx    05/02/2001.

-----------------------------------------------------------

Seems to be a Linux kernel issue. The problem does not occur if you
add a Global Unicast address to the network interface: eg.
    /sbin/ifconfig eth0 add 2001:0:2:3:0:1:349:b154/64
I have attached a native C program which reproduces the issue
(senderV6.c). This occurs both with 2.2 and 2.4 kernel.

  xxxxx@xxxxx   2001-05-18
------------------------------------------------------------------


Current shipping kernel releases don't support the draft
RFC dealing with IPv6 source address selection
(draft-ietf-ipngwg-default-addr-select-05).
Partial support has been added in the latest snapshot of the
USAGI branch (usagi-20010917). We have tested with this
kernel and it allows us to send multicasts with a scope greater
than the scope of any local address.

  xxxxx@xxxxx   2001-09-21
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang