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

linux multicast

87 views
Skip to first unread message

Cristian Zamfir

unread,
May 10, 2003, 7:02:34 AM5/10/03
to
I am trying to write a program that uses multicast and I have tested the
example from Sun's tutorial first.
On Windows it runs ok but it does not on Linux (Slack 9.0).
I have written a UDP client server program in C that runs perfectly on the
Linux machine, but
it did not use multicast.

I am running both client and server on the same machine.
I know this is more likely a Linux problem, but I appreciate any help.

Here is the exception from the client:

java MulticastClient
Exception in thread "main" java.net.SocketException: No such device
at java.net.PlainDatagramSocketImpl.join(Native Method)
at
java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:134)
at java.net.MulticastSocket.joinGroup(MulticastSocket.java:274)
at MulticastClient.main(MulticastClient.java:11)

and here is the one from the server:
java.io.IOException: Network is unreachable
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:572)
at MulticastServerThread.run(MulticastServerThread.java:29)

Here is the code, form the tutorial:
http://java.sun.com/docs/books/tutorial/networking/datagrams/example-1dot1/M
ulticastServer.java
http://java.sun.com/docs/books/tutorial/networking/datagrams/example-1dot1/M
ulticastServerThread.java
http://java.sun.com/docs/books/tutorial/networking/datagrams/example-1dot1/M
ulticastClient.java

Thank you very much.

Cristian Zamfir

unread,
May 10, 2003, 9:29:30 AM5/10/03
to
Replying myself for the archive:
The problem was that multicast was not enabeled on my interface.

ifconfig eth0 multicast
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

"Cristian Zamfir" <zam...@fx.ro> wrote in message
news:b9im8l$jcudg$1...@ID-167733.news.dfncis.de...

0 new messages