在standalone.xml文件中找到标签<interfaces>,加入以下内容:
<interface name=”any”>
<any-ipv4-address/>
</interface>
将以下三行内容中的
interface– public修改成any
interface– public修改成any
<socket-binding-group name=”standard-sockets”
default-interface=”public”
port-offset=”${jboss.socket.binding.port-offset:0}”>
default-interface=”public”
port-offset=”${jboss.socket.binding.port-offset:0}”>
<socket-binding name=”management-http”
interface=”management”
port=”${jboss.management.http.port:9990}”/>
<socket-binding name=”management-https”
interface=”management”
port=”${jboss.management.https.port:9993}”/>
interface=”management”
port=”${jboss.management.http.port:9990}”/>
<socket-binding name=”management-https”
interface=”management”
port=”${jboss.management.https.port:9993}”/>
修改后如下:
<socket-binding-group name=”standard-sockets”
default-interface=”any”
port-offset=”${jboss.socket.binding.port-offset:0}”>
default-interface=”any”
port-offset=”${jboss.socket.binding.port-offset:0}”>
<socket-binding name=”management-http”
interface=”any”
port=”${jboss.management.http.port:9990}”/>
<socket-binding name=”management-https”
interface=”any”
port=”${jboss.management.https.port:9993}”/>
interface=”any”
port=”${jboss.management.http.port:9990}”/>
<socket-binding name=”management-https”
interface=”any”
port=”${jboss.management.https.port:9993}”/>
重启服务器,发现控制台输出如下:
11:24:47,123 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012: Started FileSystemDeploymentService for directory G:\wildfly-8.0.0.Final\wildfly-8.0.0.Final\standalone\deployments
11:24:47,172 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS017519: Undertow HTTP listener default listening on
/0.0.0.0:8080
11:24:47,373 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
11:24:47,551 INFO [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBoss Web Services – Stack CXF Server 4.2.3.Final
11:24:47,711 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on
http://0.0.0.0:9990/management
11:24:47,712 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on
http://0.0.0.0:9990
11:24:47,713 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.0.0.Final “WildFly” started in 5176ms – Started 182 of 233 services (81 services are lazy, passive or on-demand)
11:24:47,172 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) JBAS017519: Undertow HTTP listener default listening on
/0.0.0.0:8080
11:24:47,373 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
11:24:47,551 INFO [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBoss Web Services – Stack CXF Server 4.2.3.Final
11:24:47,711 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on
http://0.0.0.0:9990/management
11:24:47,712 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on
http://0.0.0.0:9990
11:24:47,713 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.0.0.Final “WildFly” started in 5176ms – Started 182 of 233 services (81 services are lazy, passive or on-demand)
此时以localhost或者127.0.0.1或者本级实际ip都能正常访问wildfly控制台或者部署在上边的应用。