Name: skR10017 Date: 06/12/2000
Test engr/net/MulticastTest from testbase_js suite fails on IBM ThinkPad 390E.
I've used two various ethernet cards and test fails on both.
( Rover card RC-RE450CT NE2000 compatible and CNet 40 PC Card )
Also I've tested dummy ethernet linux module which is used to emulate real
ethernet adaptor but test fails with dummy module not only on notebook but on other machines too.
If you find it hard to reproduce the original failure you can see what
happenes with the dummy ethernet module, I think that this failures
are similar.
The following test is failed part of MulticastTest:
Failure is that exception is thrown during invocation
of MulticastSocket.joinGroup method
--------------------------test.java-----------------
import java.io.*;
import java.net.*;
public class test{
static int serverPort=4590;
static InetAddress server_maddr;
static InetAddress interFace;
public static void main(String[] a) {
try {
server_maddr = InetAddress.getByName("234.6.6.6");
interFace = InetAddress.getLocalHost();
System.out.println("Address:"+server_maddr);
System.out.println("Interface:"+interFace);
MulticastSocket s = new MulticastSocket(serverPort);
s.setInterface(interFace);
s.joinGroup(server_maddr);
}
catch(Exception e)
{
System.out.println("Exception:"+e);
}
}
}
-----------------------output------------------------------
IBM ThinkPad, test fails, there should be no exception:
[root@linux-8 MulticastTest]# /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:AD:A0:24:AE
inet addr:129.144.234.218 Bcast:129.144.234.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10628 errors:0 dropped:0 overruns:0 frame:457
TX packets:2206 errors:0 dropped:0 overruns:0 carrier:0
collisions:378 txqueuelen:100
Interrupt:3 Base address:0x300
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:267 errors:0 dropped:0 overruns:0 frame:0
TX packets:267 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
[root@linux-8 MulticastTest]# java test
Address:234.6.6.6/234.6.6.6
Interface:linux-8/129.144.234.218
Exception:java.net.SocketException: error setting options
[root@linux-8 MulticastTest]#
Desktop PC:
Test passes with normal ethernet card:
[root@linux-7 MulticastTest]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:D0:B7:16:1B:E7
inet addr:129.144.234.217 Bcast:129.144.234.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:125318 errors:4 dropped:0 overruns:0 frame:0
TX packets:42890 errors:0 dropped:0 overruns:0 carrier:0
collisions:24955 txqueuelen:100
Interrupt:10 Base address:0xe800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:11202 errors:0 dropped:0 overruns:0 frame:0
TX packets:11202 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
[root@linux-7 MulticastTest]# java test
Address:234.6.6.6/234.6.6.6
Interface:linux-7/129.144.234.217
[root@linux-7 MulticastTest]#
And fails with dummy ethernet adaptor:
[root@linux-7 MulticastTest]# more /etc/conf.modules
alias eth0 eepro100
alias dummy0 dummy
[root@linux-7 MulticastTest]# /sbin/modprobe dummy
[root@linux-7 MulticastTest]# ifconfig eth0 down
[root@linux-7 MulticastTest]# ifconfig dummy0 192.168.1.1 arp multicast up
[root@linux-7 MulticastTest]# ifconfig
dummy0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:11202 errors:0 dropped:0 overruns:0 frame:0
TX packets:11202 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
[root@linux-7 MulticastTest]# java test
Address:234.6.6.6/234.6.6.6
Interface:linux-7/129.144.234.217
Exception:java.net.SocketException: error setting options
[root@linux-7 MulticastTest]#
--------------------------------------------------------------
======================================================================
- duplicates
-
JDK-4342535 Linux: java.net.MulticastSocket.joinGroup does not work on Linux
-
- Closed
-