Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The netstat output with the tomcat process(pid: 28899) is as followed:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0  *               LISTEN      28899/java      
tcp        0      0  *               LISTEN      28899/java        
tcp        0      0*               LISTEN      28899/java 

So why can one process listen on three tcp ports? Is it because that 8009 and 8005 are listened by two child-processes of tomcat and netstat only display the parent process ID?

share|improve this question
What makes you think there's a limit to the number of sockets/ports a single process can open and listen to? – growse Nov 6 '12 at 21:05

The short answer is "because the process asked the kernel to let it bind to three ports". There's no implicit bar on this; here's my apache, merrily listening to two ports:

[madhatta@lory mail]$ sudo netstat -apn|grep http
tcp        0      0*                   LISTEN      1753/httpd          
tcp        0      0 :::80                       :::*                        LISTEN      1753/httpd          
share|improve this answer

More specifically, 8009 is the default AJP connector port for Tomcat (for, say, mod_ajp in Apache to communicate with Tomcat) and localhost:8005 is the default shutdown port. Presumably, you're using 8000 as the HTTP connector port. You should be able to find a more in depth discussion in the Tomcat documentation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.