获取错误"初始化端点:java.net.BindException:地址已在使用/127.0.0.1:8080"安装JBoss AS7时

时间:2018-01-22 06:54:41

标签: linux amazon-ec2 ip jboss7.x

我已经在JBoss AS 7.1 linux实例中安装了AWS ec-2

请在将其标记为重复之前提供帮助,因为很多SO问题已经可用,但这里没有任何帮助。

服务器正在成功运行

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

只有http://localhost:8080和其他机器才能访问,我想在instance public IP

访问

是服务器日志说

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

但我不知道为什么,因为我已经修改了cofiguration目录中的standalone.xml

<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>

但是端口 8080 正在侦听所有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
.. ... ... ... ...      ....    .....        .......                .....          ........

不在localhost

如果我错了,请纠正我。

有人帮助我,如何从其他机器访问它。我无法了解更改配置的位置?

1 个答案:

答案 0 :(得分:0)

哦对不起。服务器的configuration已全部设置,我在浪费我的一天来解决配置问题。

我需要做的就是创建Security rule,端口 8080 Security group AWS ec2 instance

可以从远程计算机访问服务器。