ravi k
ravi k

Reputation: 1

Tomcat Getting multiple ports on startup

enter image description here

When I start the tomcat server, it starts with multiple ports but the application stops working after some time. But then, tomcat remains in running state despite this.

I would really appreciate help on this.

Upvotes: 0

Views: 275

Answers (1)

Christopher Schultz
Christopher Schultz

Reputation: 20862

On Windows, Java's NIO uses TCP (which can be surprising to anyone who hasn't seen that before). For each Selector, you'll get a pair of ports opened, communicating with each other.

If you look at netstat or similar you should see that those additional ports are connected to each other in pairs. Those ports should be stable across the life of the process (assuming you aren't dynamically starting and stopping Connectors) and aren't something you can get rid of.

I can't seem to find a great reference for this, but here is a not-great one: https://developer.jboss.org/thread/268935

Upvotes: 1

Related Questions