JBoss CLI 连接到错误的端口,即使它指定正确

JBoss CLI connects to the wrong port, even though its specified right

我正在使用 JBoss 版本 7.0.9。

当我启动它时,它会将此行写入控制台:

<date> <loginfo> WFLYSRV0051: <german description that says, that this is the admin console>: http://127.0.0.1:9995

现在我想使用以下命令连接到 CLI:

jboss-cli.bat -c --controller:127.0.0.1:9995

jboss-cli.bat -c --controller:localhost:9995

两者都抛出以下

Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0053: Konnte keine Verbindung mit http-remoting://localhost:9990 herstellen. Die Verbindung ist fehlgeschlagen: WFLYPRT0053: Konnte keine Verbindung mit http-remoting://localhost:9990 herstellen. Die Verbindung ist fehlgeschlagen: Connection refused: no further information

如您所见,它尝试连接到 localhost:9990,即使我说控制器是 localhost:9995

为什么会这样?

应该使用等号 (=) 而不是冒号 (:) 来分配 command-line 参数:

 jboss-cli.bat --connect --controller=localhost:9995
 #                                    ^
 #                                    Here