Cha*_*ani 51 java web-applications jboss7.x
我使用./standalone.sh在独立模式下运行JBoss AS7.这将JBOSS绑定到localhost.有没有办法将它绑定到所有主机,我的意思是0.0.0.0.
旧版本有-b选项传递0.0.0.0,我找不到任何在这里使用的选项.
sti*_*vlo 101
编辑standalone/configuration/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-address/>
</interface>
</interfaces>
Run Code Online (Sandbox Code Playgroud)
在公共接口中,我用any-address更改了原始的inet -address.重新启动后,您将能够通过网络浏览JBoss端口8080.
Fra*_*ois 18
感谢上面的提示,仅供参考,我发现使用<any-address/>可能导致
10:31:22,605 ERROR [org.apache.catalina.core.StandardService] (MSC service thread 1-2) Connector.start: LifecycleException: service.getName(): "jboss.web"; Protocol handler start failed: java.net.SocketException: Protocol family not supported
at org.apache.catalina.connector.Connector.start(Connector.java:1058)
Run Code Online (Sandbox Code Playgroud)
比照 http://community.jboss.org/thread/168789?tstart=120
您可以通过替换它来解决它 <any-ipv4-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)
您还可以执行以下操作:
<interfaces>
<interface name="management">
<inet-address value="127.0.0.1"/>
</interface>
<interface name="public">
<inet-address value="0.0.0.0"/>
</interface>
</interfaces>
Run Code Online (Sandbox Code Playgroud)
或者如果要绑定到特定地址,请将ip替换为0.0.0.0.
| 归档时间: |
|
| 查看次数: |
53634 次 |
| 最近记录: |