JBoss AS 7不接受远程连接

Ton*_*ony 39 java deployment jboss jboss7.x

我正在使用JBoss AS 7并尝试使用IP(来自Intranet中的计算机)连接到我的应用程序.它不起作用.如果我从具有服务器的计算机进行测试,我可以看到系统正在运行,如果我通过localhost(http:// localhost:8080/MySystem ....)但不是如果我尝试使用IP(http://: 8080/MySystem ....).

有帮助吗?

Ton*_*ony 83

答案是编辑standalone.xml并插入标记any-address而不是绑定到127.0.0.1的inet-address

<interfaces>
    <interface name="management">
        <inet-address value="127.0.0.1"/>
    </interface>
    <interface name="public">
       <any-ipv4-address/>
    </interface>
</interfaces>
Run Code Online (Sandbox Code Playgroud)

  • `<any-address />`工作,`<any-ipv4-address />`在我的情况下不起作用. (11认同)
  • 我也一样; <any-address />有效.我有7.1.1版本.但是,这个也有效:<inet-address value ="$ {jboss.bind.address:0.0.0.0}"/> (2认同)

Eri*_*ric 22

我在standalone.xml中将127.0.0.1(localhost)更改为0.0.0.0.有用.请注意安全性.

<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:0.0.0.0}"/>
    </interface>
</interfaces>
Run Code Online (Sandbox Code Playgroud)


Pet*_*zov 9

您是否在配置文件中配置了IP地址?

在没有配置ip地址的情况下启动jboss会将jboss的默认地址设置为localhost,这适合开发或者生产服务器,其中apache用作jboss的代理并驻留在同一台机器上.

设置JBoss的ip地址:

To a specific IP address
run.sh -b 10.62.31.31
To localhost or the IP address assigned to the server
run.sh -b 0.0.0.0
Run Code Online (Sandbox Code Playgroud)

您也可以在该<interfaces>部分下的配置文件中进行更改.

  • 在JBoss AS7中,它根本不运行:-)它是独立服务器的standalone.sh和域服务器的domain.sh.在Windows上只需将sh更改为bat. (4认同)
  • 如果你在Windows中,shell脚本是`run.bat` (3认同)
  • 你绝对不想改变standalone.bat.从CLI启动服务器时,您可以执行/interface=public:write-attribute(name=inet-address,value="${jboss.bind.address:xxx.xxx.xxx.xxx}")来设置IP .它在Web控制台上更容易.只需查看界面下的配置文件即可. (2认同)