MulticastSocket.receive() hangs when I try to receive packets from a server on a network with an IP that is not 192.168.X.X

StackOverflow https://stackoverflow.com/questions/15165881

Question

I'm having this issue on my Windows 7 machine where a call to MulticastSocket.receive() in Java will hang indefinitely (it never receives the packets) when I try to listen in on a server connected to a non-192.168.X.X network. Provided that the server is connected on the 192.168.X.X network, MulticastSocket.receive() will not hang. I'm fairly sure that this is a configuration issue on my Windows 7 machine, as it works on the other development systems at my workplace running Windows XP and Ubuntu 10.04.

Any help would be appreciated.

Update:

I figured out why MulticastSocket.receive() was hanging indefinitely. What happened was that Windows Firewall was blocking the incoming packets from the network corresponding to my server. A quick fix to this problem was to disable Windows Firewall on that network (in my case, I disabled Windows Firewall on my Public Network). After that, the MulticastSocket.receive() was able to get the incoming packets.

Was it helpful?

Solution

"non-192.168.X.X network" implies that the listening machine is on a 192.168.X.X network. If that's the case, then it's probably a situation where multicast traffic is not being routed between the networks (it usually isn't). Are the other development machines that you mention on the same network as the Windows 7 machine? Or are they dual-homed (attached to two network segments)?

You can see if your network admins can configure their routers to pass this traffic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top