Skip to content
Advertisement

Getting error as “initializing endpoint: java.net.BindException: Address already in use /127.0.0.1:8080” while installing JBoss AS7

Here I’ve installed JBoss AS 7.1 in AWS ec-2 linux instance.

Please help before marking it as duplicate as many SO questions are already available but nothing helped me here.

The server is running successfully

[root@ip-172-31-20-18 ~]# service jboss status
jboss-as is running (pid 10251)

It’s only accessible for http://localhost:8080 and from the other machines, here I want to access with instance public IP

Yes the server log says

06:55:04,657 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:983) [jbossweb-7.0.13.Final.jar:]
        at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.13.Final.jar:]
        at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.13.Final.jar:]
        at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]

06:55:04,706 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.web.connector.http: org.jboss.msc.service.StartException in service jboss.web.connector.http: JBAS018007: Error starting web connector
        at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:271)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_80]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
Caused by: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use /127.0.0.1:8080

But I don’t know why because already I’ve modified the standalone.xml in cofiguration dir.

<interfaces>
        <interface name="management">
            <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
        </interface>
        <interface name="public">
            <inet-address value="${jboss.bind.address:0.0.0.0}"/>
        </interface>
        <!-- TODO - only show this if the jacorb subsystem is added  -->
        <interface name="unsecure">
            <!--
              ~  Used for IIOP sockets in the standard configuration.
              ~                  To secure JacORB you need to setup SSL
              -->
            <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
        </interface>
    </interfaces>

But here the port 8080 is listening for all IPs

[root@ip-172-31-20-18 jboss]# netstat -tulpn

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:9999            0.0.0.0:*               LISTEN      10251/java
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      10251/java
.. ... ... ... ...      ....    .....        .......                .....          ........

not at localhost.

Pls correct me if I’m wrong.

Someone help me out, how to access it from other machine. I’m not able to understand where to change the configuration?

Advertisement

Answer

Oh Sorry. The configuration of the server is all set and I was wasting my day to solving the issue in configuration.

All I needed to do is the creatation Security rule with port 8080 to the Security group of AWS ec2 instance.

And the server is accessible from remote machines.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement