Saturday, December 17, 2011

JBoss - Port Bind Error

Problem
    Are you getting a port bind error when starting a java process, like here is one I got when i started my JBoss.

16:19:06,578 ERROR [Http11Protocol] Error initializing endpoint
java.net.BindException: Address already in use: JVM_Bind:8080
        at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
        at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
        at org.apache.catalina.connector.Connector.initialize(Connector.java:928)
        at org.jboss.web.tomcat.tc5.StandardService.initialize(StandardService.java:688)
        at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)


Solution
    There is some other process running in the same port 8080 in the above case. Stop/Kill the process if that isnt required or change the port of that process or for JBoss. In case you decide to change the JBoss port, navigate to your JBoss servers conf/jboss-service.xml and search for server bindings and uncomment that section and make it point to ports-01 [8180] / ports-02 [8280] / ports-03 [8380]. The default in there would be ports-default which is again 8080 so you have to change it to 01/02/03. This is the best way to change JBoss ports dont just search for 8080 and change it to something else.

No comments:

Post a Comment