This is a discussion on Problem receiving multicast data - Networking ; Hi! I've got some strange problems with multicasts on my Linux machine. My application (written in Java) joins some multicast groups and tries to receive some data. I can see with tcpdump that the host transmits some IGMP packets regarding ...
I've got some strange problems with multicasts on my Linux machine.
My application (written in Java) joins some multicast groups and tries
to receive some data. I can see with tcpdump that the host transmits
some IGMP packets regarding those groups.
But nothing comes at all, while those groups are pretty active and my
application should receive data constantly.
Then, I start a pimd daemon, and boom - my application suddenly starts
Then, I close my application (it leaves all the groups before quiting,
closes all the sockets and so on), start it again.. and it doesn't
work again (but this time the pimd daemon was started).
Then, I *stop* the pimd daemon and boom - suddenly my application
starts receiving data, again.
It's extremely weird to me. In fact it wouldn't be really problematic
if it were deterministic, so I could always start or stop (depending
if it was started or stopped already) automatically the pimd deamon
after starting my application.
But the problem is that sometimes, after some longer time passes, the
data stops coming suddenly and I need to do the pimd magic again.
Sometimes I can run my app for 8 hours and it functions properly, but
sometimes it happens after 1 hour.
Also, what's even worse, it seems that even if my app is able to
receive data in the groups it joined at the beginning, then (but only
sometimes) it's not able to receive any data from other groups it
joins later during the runtime (and yet it still keeps receiving data
from the groups it joined at the beginning). Unfortunately I need to
join some other high-traffic groups on demand during the runtime and
leave them when I don't need them anymore, to save the bandwidth. As
you can guess, restarting the pimd daemon after joining those new
My questions are:
- Why do I need to have pimd running at all? I thought that it's
needed only when I want to forward multicasts from one interface to
another or so. It's not the case with my app..
- Anyone ran across similar problems? I would appreciate any help. At
the moment I'm "flipping" the pimd daemon (starting it if it was
stopped, or doing the reverse) at the moment I'm starting my app, and
then I'm restarting pimd from time to time in hope that my app will be
able to receive the data from multicast groups it joins later during
the runtime. Yea, ridiculous as it sounds.
I don't need to send any multicast data.
The OS is Ubuntu with a stock kernel 2.6.20-16-server.
The host also has two ethernet interfaces: one with Internet access,
and second connected directly to the router (Cisco 18xx or something,
I'm not sure) which is connected to the network (via some VPN)
providing the multicast data.
Thanks in advance!