Friday, August 19, 2011

java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind

Came across the exception in subject when starting a java application via wrapper. The java app never started. Found the below article as a solution in lot of forums.



http://support.microsoft.com/kb/196271

This article suggests to set the MaxUserPort in Windows  registry to 65534. This setting may solve the problem, however I have couple of questions here.
  1. The exception is occurring because of no TCP ports available at that point of time, so if you do a Server reboot, all the TCP port will be cleared up and java app can be started. 
  2. Is there any way to check (Windows Event log/ application log ) in Windows level when the java app trying to open the TCP socket it is failing. So that I can justify that the cause.
-Krishna.