'Data transmission over the UDP protocol has stopped working

There are two simple applications written in Java that transmit data over the UDP protocol between two computers (PC1 and PC2). I've shortened the code a bit, for clarity.

PC1 - sends data

private final static String IP_ADDR = "224.1.1.201";
DatagramSocket socket;
public void sending() {
    socket = new DatagramSocket();
    group = InetAddress.getByName(IP_ADDR);
    sendingDataBuffer = parserData(dataBuffer);
    DatagramPacket packet 
    = new DatagramPacket(sendingDataBuffer, sendingDataBuffer.length, group, SERVICE_PORT);
    socket.send(packet);
}

PC2 - accepts data

private final static String IP_ADDR = "224.1.1.201";
MulticastSocket socket;
public void received() {
    socket = new MulticastSocket(SERVICE_PORT);
    InetAddress group = InetAddress.getByName(IP_ADDR);
    socket.joinGroup(group);
    DatagramPacket packet = new DatagramPacket(receivingDataBuffer, receivingDataBuffer.length);
    socket.receive(packet);             
}

Everything once worked, the code did not change. I'm launching now and there's silence on the receiving side. If you run these applications on the same host, for example PC1, then everything works. I don't understand what could be the problem?

Maybe the administrators changed the network settings and it somehow affected. Maybe they blocked something, but they won't admit it themselves. But how can I check where the problem is? How to detect it? PC2 ping from PC1 side goes fine.

IP_ADDR is not an ip address, it is a group address.

The main problem is that I can't use network utilities. Because it is forbidden to install third-party software at our work.

Maybe Java has tools to check which packets go to and come from the network.

Launched wireshark, added a filter

udp.port in {51491}

And wireshark shows nothing on this port. I don't understand why? Locally , the exchange is underway.

And there is nothing on this port in wireshark, even when I run both applications on the same host and when the exchange between them works.

Maybe someone has a working example of data exchange over UDP in Multicast mode?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source