JBoss AS 7不接受远程连接

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

任何帮助?

答案是编辑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> 

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

你configurationIP地址到configuration文件?

在不configurationIP地址的情况下启动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 

您也可以在<interfaces>部分的configuration文件中更改它。

不要忘记防火墙!

如果您修复了绑定地址,仍然无法连接到JBoss,请尝试解决服务器的防火墙问题。

要在Linux RHEL上停止防火墙,请使用以下命令:

 /etc/init.d/iptables stop 

更新:在没有安装iptables的RHEL7上,您可以使用:

 systemctl stop firewalld