我有2个VM Windows Server 2016主机的问题。 服务器1:192.168.80.150(主服务器) 服务器2:192.168.80.151(从站) 域控制器在server1(主服务器)上运行
Server1'master'正常启动:
bin / domain.bat --host-config = host.xml -Djboss.bind.address.management = 192.168.80.150
INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0062: Http management interface listening on http://192.168.80.150:9990/management and https://192.168.80.150:-1/management
INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0053: Admin console listening on http://192.168.80.150:9990 and https://192.168.80.150:-1
INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 14.0.1.Final (WildFly Core 6.0.2.Final) (Host Controller) started in 5789ms - Started 82 of 85 services (26 services are lazy, passive or on-demand)
server1(主服务器)上的host.xml:
<host xmlns="urn:jboss:domain:8.0" name="master">
..
<management-interfaces>
<http-interface security-realm="ManagementRealm">
<http-upgrade enabled="true"/>
<socket interface="management" port="9990"/>
</http-interface>
</management-interfaces>
</management>
<domain-controller>
<local/>
</domain-controller>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:192.168.80.150}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:192.168.80.150}"/>
</interface>
</interfaces>
....
启动从站时,我收到以下消息:
\ bin \ domain.bat --host-config = host.xml -Djboss.bind.address.management = 192.168.80.151 -Djboss.domain.master.address = 192.168.80.150
INFO [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0003: Creating http management service using network interface (management) port (9990) securePort (-1)
INFO [org.xnio] (MSC service thread 1-2) XNIO version 3.6.5.Final
INFO [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.6.5.Final
INFO [org.jboss.as.patching] (MSC service thread 1-4) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
WARN [org.jboss.as.domain.management.security] (MSC service thread 1-3) WFLYDM0111: Keystore C:\u4fin\wildfly\domain\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
INFO [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 5.0.8.Final
INFO [org.jboss.as.remoting] (MSC service thread 1-1) WFLYRMT0001: Listening on 192.168.80.151:9999
WARN [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0001: Could not connect to remote domain controller remote://192.168.80.150:9990: java.net.ConnectException: WFLYPRT0023: Could not connect to remote://192.168.80.150:9990. The connection timed out at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:130) at org.jboss.as.host.controller.RemoteDomainConnection.lambda$openConnection$0(RemoteDomainConnection.java:223) at org.wildfly.common.context.Contextual.runExceptionAction(Contextual.java:108) at org.wildfly.security.auth.client.AuthenticationContext.run(AuthenticationContext.java:273) at org.jboss.as.host.controller.RemoteDomainConnection.openConnection(RemoteDomainConnection.java:223) at org.jboss.as.host.controller.RemoteDomainConnection$InitialConnectTask.connect(RemoteDomainConnection.java:592) at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70) at org.jboss.as.host.controller.RemoteDomainConnection.connect(RemoteDomainConnection.java:147) at org.jboss.as.host.controller.RemoteDomainConnectionService.register(RemoteDomainConnectionService.java:288) at org.jboss.as.host.controller.DomainModelControllerService.connectToDomainMaster(DomainModelControllerService.java:965) at org.jboss.as.host.controller.DomainModelControllerService.boot(DomainModelControllerService.java:703) at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:372) ......
WARN [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0147: No domain controller discovery options remain.
ERROR [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0002: Could not connect to master. Error was: java.lang.IllegalStateException: WFLYHC0120: Tried all domain controller discovery option(s) but unable to connect
FATAL [org.jboss.as.host.controller] (Controller Boot Thread) WFLYHC0178: Aborting with exit code 99
[org.jboss.as] (MSC service thread 1-2) WFLYSRV0050: WildFly Full 14.0.1.Final (WildFly Core 6.0.2.Final) stopped in 40ms
Server2上的host.xml(从属)
<host xmlns="urn:jboss:domain:8.0" name="slave">
...
<security-realms>
<security-realm name="ManagementRealm">
<server-identities>
<secret value="cGFzc3dvcmQx"/>
</server-identities>
....
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket interface="management" port="${jboss.management.native.port:9999}"/>
</native-interface>
<http-interface security-realm="ManagementRealm">
<http-upgrade enabled="true"/>
<socket interface="management" port="9990"/>
</http-interface>
</management-interfaces>
</management>
<domain-controller>
<remote protocol="remote" host="192.168.80.150" port="9990" username="slave" security-realm="ManagementRealm" />
</domain-controller>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:192.168.80.151}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:192.168.80.151}"/>
</interface>
</interfaces>
...
..
在Server1上,域控制器我可以与jboss-cli连接 c:\ u4fin \ wildfly \ bin> jboss-cli --connect controller = 192.168.80.150:9990 [domain@192.168.80.150:9990 /]
在Server2上,我收到消息: C:\ u4fin \ wildfly \ bin> jboss-cli --connect控制器= 192.168.80.150:9990 针对安全领域进行身份验证:ManagementRealm 用户名:slave 密码:
Failed to connect to the controller: The controller is not available at 192.168.80.150:9990: java.net.ConnectException: WFLYPRT0023: Could not connect to remote+http://192.168.80.150:9990. The connection timed out: WFLYPRT0023: Could not connect to remote+http://192.168.80.150:9990. The connection timed out
Press any key to continue . . .
But I'm able to connect with a browser on Server2 to the domain controler:
http://192.168.80.150:9990/console/index.html#runtime;path=domain-browse-by~hosts!host~host-master
如何解决“ WFLYPRT0023”错误?