Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Port Already in Use Error On Server Startup : Process gets Started twice in same Port at Same time

 
Ramesh Jothimani
Ranch Hand
Posts: 70
Android Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I start my JBoss server , I am always getting Port already in use error. I tried changing Port nos in server.xml in JBoss but what ever port number I mention in server.xml , the same error "Port already in use :: <Port No> " is being displayed in my eclipse console. Using TCP viewer I found that the same process gets run twice in same port on server startup but one for V4 & one for V6 .Mine is 64 Bit Operating System - WIndows 7.

Please help me to solve this problem.

Thanks !
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is V4 and V6?

Could you post a screen shot of TCP View that shows which ports and processes you are having the issue with? Posting the exact text form the console log would also help.

Also, I assume that if you don't use Eclipse, and start JBoss AS manually, then you don't run into any problems? (Eclipse is notorious for messing things up in it misguided attempts to be helpful, which is why I never use it for any tasks beyond editing text files.)
 
Ramesh Jothimani
Ranch Hand
Posts: 70
Android Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply !

I guess V4 & V6 refer to IPV4 and IPV6 . I have attached the screenshot of TCP Viewer showing the processes running on same ports. I am using eclipse and the error displayed in the console is as follows,

22:38:32,688 ERROR [Http11BaseProtocol] Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8081
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
at org.jboss.web.tomcat.tc5.StandardService.initialize(StandardService.java:688)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
at org.apache.catalina.startup.Catalina.start(Catalina.java:543)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
Port.jpg
[Thumbnail for Port.jpg]
TCP Viewer Output
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which exact version of JBoss AS? And does it work outside of the IDE, if you start from the command prompt?
 
Ramesh Jothimani
Ranch Hand
Posts: 70
Android Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using jboss- version 4.0.5 and it works fine in other PC which is running 32 bit Windows XP .
 
Ramesh Jothimani
Ranch Hand
Posts: 70
Android Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found that there are two Port Nos in server.xml (deploy\jbossweb-tomcat55.sar directory) , connector port & redirect port. Both Port Nos has been mentioned as same earlier & I have made it different . My JBoss is getting started properly , now.

<!-- A HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" address="${jboss.bind.address}"
maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="false"
protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
/>


Thanks !
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't expect the redirect port value to play a role while binding the ports. The redirect port is there to redirect secure traffic from the non secure port (8080). It's a bit surprising that this was causing an issue.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic