2017-02-01 69 views
-2

雖然我用的是連接語句,它顯示了以下錯誤JBoss服務器沒有連接

The controller is not available at localhost:9999: java.net.ConnectException: JBAS012174: 
Could not connect to remote://localhost:9999. The connection failed: JBAS012174: Could not 
connect to remote://localhost:9999. The connection failed: Connection refused 
[disconnected /] 

回答

0

實際的本地管理結合(HOST:PORT)在JBoss的配置文件中被定義爲接口名稱=「管理「和套接字綁定名稱=」管理本地「。默認情況下,它們使用localhost和9999.

安裝系統服務時,如果管理綁定已更新,則必須指定正確的/控制器主機:端口值。

在日誌中下面的錯誤指示關閉時CLI命令行不能連接到管理接口:

無法連接到遠程://本地主機:9999。連接失敗

確認配置系統服務時使用的/ controller參數與JBoss配置文件(standalone.xml/domain.xml和host.xml)中的管理接口和套接字綁定定義相匹配。

在配置系統服務,如果沒有指定,控制器的默認配置是:

/controller HOST:PORT The host and port of the management interface. If omitted, the default is localhost:9999. 

更改這個參數相匹配的JBoss的配置文件中的管理界面和插座綁定設置:

<interfaces> 
    <interface name="management"> 
     <inet-address value="192.168.0.1"/> 
    </interface> 
...... 
</interfaces> 

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> 
    <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/> 

使用上述配置,您需要指定/如下所示安裝系統服務

service.bat install /startup /controller=192.168.0.1:9999 /config standalone-customized-1.xml 

如果設置了jboss.socket.binding.port-offset,確認實際端口號(偏移後)傳入/ controller參數中。例如,如果jboss.socket.binding.port偏移被設置爲standalon.xml 300,您需要用10299(默認值9999 + 300)端口號來安裝系統服務:

service.bat install /startup /controller=192.168.0.1:10299 /config standalone-customized-2.xml 
1

我在端口9999上連接到本地管理接口的問題以及我最終需要做的事情是通過將以下內容添加到standalone.XML文件來啓用該接口:

<management-interfaces> 
    <native-interface security-realm="ManagementRealm"> 
     <socket-binding native="management-native"/> 
    </native-interface> 
     : 
<management-interfaces>