7 Replies Latest reply on Jul 14, 2017 12:26 PM by sameer P

    java.net.BindException: Address already in use /127.0.0.1:8080

    Joseph Hwang Novice

      My development environment is

       

      OS : CentOS 6

      JBoss : 7.0.1 Final

      JDK : JavaEE 1.6

      Eclipse : 3.7 Indigo

       

      When I execute JBoss 7 ,Exception is thrown,

       

      14:43:51,415 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Error initializing endpoint: java.net.BindException: Address already in use /127.0.0.1:8080

          at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:1005)

          at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190)

          at org.apache.catalina.connector.Connector.init(Connector.java:976)

          at org.apache.catalina.core.StandardService.addConnector(StandardService.java:351)

          at org.jboss.as.web.WebServerService.addConnector(WebServerService.java:121)

          at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:223)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

          at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

       

      14:43:51,450 ERROR [org.apache.catalina.core.StandardService] (MSC service thread 1-1) Connector.initialize: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use /127.0.0.1:8080

          at org.apache.catalina.connector.Connector.init(Connector.java:978)

          at org.apache.catalina.core.StandardService.addConnector(StandardService.java:351)

          at org.jboss.as.web.WebServerService.addConnector(WebServerService.java:121)

          at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:223)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

          at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

       

      14:43:51,452 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Error starting endpoint: java.net.BindException: Address already in use /127.0.0.1:8080

          at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:1005)

          at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:1021)

          at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:218)

          at org.apache.catalina.connector.Connector.start(Connector.java:1051)

          at org.apache.catalina.core.StandardService.addConnector(StandardService.java:359)

          at org.jboss.as.web.WebServerService.addConnector(WebServerService.java:121)

          at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:223)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

          at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

       

      14:43:51,462 ERROR [org.apache.catalina.core.StandardService] (MSC service thread 1-1) Connector.start: LifecycleException:  service.getName(): "jboss.web";  Protocol handler start failed: java.net.BindException: Address already in use /127.0.0.1:8080

          at org.apache.catalina.connector.Connector.start(Connector.java:1058)

          at org.apache.catalina.core.StandardService.addConnector(StandardService.java:359)

          at org.jboss.as.web.WebServerService.addConnector(WebServerService.java:121)

          at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:223)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

          at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

          at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

       

      On windows 7, this exception does not occurs.But in Windows Server 2008 and CentOS 6, jboss 7 throws this exception.

      I am JBoss 7 beginner. Pls, inform me of your advices.

       

      Thanks in advance

        • 1. Re: java.net.BindException: Address already in use /127.0.0.1:8080
          jaikiran pai Master

          It looks like there's already another process which is listening on port 8080. Check which process that is. If you can shutdown that other process, then do so. Else you'll have to change the http port for AS7 (you can do that in the JBOSS_HOME/standalone/configuration/standalone.xml file).

          • 2. Re: java.net.BindException: Address already in use /127.0.0.1:8080
            Joseph Hwang Novice

            Thanks for your reply. I solved my problem.

            But 'netstat' command shows no process is listening on port 8080.

            I wonder why this exception was thrown by jboss 7!

            • 3. Re: java.net.BindException: Address already in use /127.0.0.1:8080
              Joseph Hwang Novice

              As you told me, I changed port number to 8088 in JBOSS_HOME/standalone/configuration/standalone.xml file.

              It worked during the first time. But Second I turn on the computer and execute jboss 7 through eclipse Indigo,

              then this time Jboss 7 threw same exception like below,

               

              Error initializing endpoint: java.net.BindException: Address already in use /127.0.0.1:8088

                  at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:1005)

                  at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190)

                  at org.apache.catalina.connector.Connector.init(Connector.java:976)

                  at org.apache.catalina.core.StandardService.addConnector(StandardService.java:351)

                  at org.jboss.as.web.WebServerService.addConnector(WebServerService.java:121)

                  at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:223)

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                  at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

               

              20:33:20,073 ERROR [org.apache.catalina.core.StandardService] (MSC service thread 1-1) Connector.initialize: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use /127.0.0.1:8088

                  at org.apache.catalina.connector.Connector.init(Connector.java:978)

                  at org.apache.catalina.core.StandardService.addConnector(StandardService.java:351)

                  at org.jboss.as.web.WebServerService.addConnector(WebServerService.java:121)

                  at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:223)

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                  at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

               

              20:33:20,078 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Error starting endpoint: java.net.BindException: Address already in use /127.0.0.1:8088

                  at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:1005)

                  at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:1021)

                  at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:218)

                  at org.apache.catalina.connector.Connector.start(Connector.java:1051)

                  at org.apache.catalina.core.StandardService.addConnector(StandardService.java:359)

                  at org.jboss.as.web.WebServerService.addConnector(WebServerService.java:121)

                  at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:223)

                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

                  at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

               

              Do i miss something during executing jboss 7 on eclipse Indigo?

              • 4. Re: java.net.BindException: Address already in use /127.0.0.1:8080
                jaikiran pai Master

                In that case, I believe that you have another instance of AS7 already running. Looks like it's not being shutdown before the second one is started.

                • 5. Re: java.net.BindException: Address already in use /127.0.0.1:8080
                  Michael Woldrich Newbie

                  Hi,

                  in the case a jboss instance (6.0.0) is already running, we want to check in our service, if a port is already in use or a BindException has occurred.
                  Then we can decide if we have to shutdoen current jboss.

                  So my preferred way seems to be a interceptor, who handles BindExceptions, or is there a other simple way?

                  • 6. Re: java.net.BindException: Address already in use /127.0.0.1:8080
                    Joseph Hwang Novice

                    I solved it! I found openJDK1.6 was running on my CentOS Linux as well as my installed JEE 6 and

                    installed JRE of eclipse indigo was connected to openJDK.So 2 JDKs were running!

                     

                    I removed openJDK from CentOS and set Installed JRE to JEE6 I installed. Then it works!!

                    • 7. Re: java.net.BindException: Address already in use /127.0.0.1:8080
                      sameer P Newbie

                      Hi,

                       

                      Is this possible to do with some configuration in jboss standalone.xml or something?