We have a JBoss EAP 7.0 running on Windows server. Once in a while, we are experiencing the port exhaustion issue. When we took the netstat logs and analysed it, we could see a lot of connections from Java.exe process like below.
[java.exe] TCP 127.0.0.1:6440 127.0.0.1:6442 ESTABLISHED [java.exe] TCP 127.0.0.1:6441 127.0.0.1:6440 ESTABLISHED [java.exe] TCP 127.0.0.1:6442 127.0.0.1:6440 ESTABLISHED [java.exe] TCP 127.0.0.1:6443 127.0.0.1:6444 ESTABLISHED [java.exe] TCP 127.0.0.1:6444 127.0.0.1:6443 ESTABLISHED [java.exe] TCP 127.0.0.1:6457 127.0.0.1:6458 ESTABLISHED [java.exe] TCP 127.0.0.1:6458 127.0.0.1:6457 ESTABLISHED [java.exe] TCP 127.0.0.1:6459 127.0.0.1:6460 ESTABLISHED
As you can see, the connections are back and forth between two ephemeral ports. For example port 6457 is the source and 6458 is the destination port in one connection whereas its swapped in the next connection. What does this mean ? I can see almost 50000 such connections in the netstat logs. What could be causing this ?
Source: Windows Questions