users@glassfish.java.net

why so many TCP connections?

From: <glassfish_at_javadesktop.org>
Date: Thu, 28 Oct 2010 11:23:11 PDT

I am seeing many TCP connections established by Glassfish to itself (both ends of the connection are owned by the Glassfish process) that are never closed and the port numbers are > 30k. Further these connections keep increasing over time until the OS runs out of TCP ports

Observe it with Glassfish v2.1.1 and v3.0.1 on Windows Server 2003.

Please help. This problem is forcing me to consider other app servers.

Below is the output from netstat. Glassfish PID is 3272

Active Connections

  Proto Local Address Foreign Address State PID
  TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:4272 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:4273 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:4274 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:4700 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:4848 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:8676 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:27086 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:27091 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:27092 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:27094 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:27095 0.0.0.0:0 LISTENING 3272
  TCP 0.0.0.0:27096 0.0.0.0:0 LISTENING 3272
  TCP 127.0.0.1:27081 0.0.0.0:0 LISTENING 3272
  TCP 127.0.0.1:27084 127.0.0.1:27085 ESTABLISHED 3272
  TCP 127.0.0.1:27085 127.0.0.1:27084 ESTABLISHED 3272
  TCP 127.0.0.1:27107 127.0.0.1:27108 ESTABLISHED 3272
  TCP 127.0.0.1:27108 127.0.0.1:27107 ESTABLISHED 3272
  TCP 127.0.0.1:27110 127.0.0.1:27111 ESTABLISHED 3272
  TCP 127.0.0.1:27111 127.0.0.1:27110 ESTABLISHED 3272
  TCP 127.0.0.1:27113 127.0.0.1:27114 ESTABLISHED 3272
  TCP 127.0.0.1:27114 127.0.0.1:27113 ESTABLISHED 3272
  TCP 127.0.0.1:27127 127.0.0.1:27128 ESTABLISHED 3272
  TCP 127.0.0.1:27128 127.0.0.1:27127 ESTABLISHED 3272
  TCP 127.0.0.1:27130 127.0.0.1:27131 ESTABLISHED 3272
  TCP 127.0.0.1:27131 127.0.0.1:27130 ESTABLISHED 3272
  TCP 127.0.0.1:27133 127.0.0.1:27134 ESTABLISHED 3272
[Message sent by forum member 'llraj']

http://forums.java.net/jive/thread.jspa?messageID=486447