Mih*_*nut 10 java wildfly server
我刚刚安装Wildfly并尝试连接它:
\wildfly-11.0.0.Final\bin>jboss-cli.bat -c
Run Code Online (Sandbox Code Playgroud)
但是给了我以下错误:
无法连接到控制器:控制器在 localhost:9990 上不可用:java.net.ConnectException:WFLYPRT0053:无法连接到远程+ http://localhost:9990。连接失败:WFLYPRT0053:无法连接到远程+ http://localhost:9990。连接失败:连接被拒绝:没有更多信息
我尝试了很多解决方案,但对我不起作用。
当 Widlfly 运行时,即 (standalone.bat),使用 --controller 选项来定义它的位置:
jboss-cli.bat -c --controller=localhost:9990
Run Code Online (Sandbox Code Playgroud)
在 Wildfly 版本 16 上遇到同样的错误
错误
无法连接到控制器:控制器在 localhost:: java.net.ConnectException 处不可用:WFLYPRT0053:无法连接到远程+ http://localhost :。连接失败:WFLYPRT0053:无法连接到远程+ http://localhost :。连接失败:连接被拒绝
并完成以下操作并成功解决
步骤01
注释(或者您可以删除)/bin/jboss-cli.xml 中的以下行
default-protocol use-legacy-override="true">remote+https</default-protocol
Run Code Online (Sandbox Code Playgroud)
正确的协议例如:
<default-protocol use-legacy-override="true">remote+http</default-protocol>
<!-- The default controller to connect to when 'connect' command is executed w/o arguments -->
<default-controller>
<protocol>remote+http</protocol>
<host>localhost</host>
<port>9990</port>
</default-controller>
Run Code Online (Sandbox Code Playgroud)
步骤02
就我而言,我已经创建了一个管理用户,因此,我使用以下命令启动了 CLI
./jboss-cli.sh --user="<user>" --password="<password>" --controller=remote+http:<your IP>:<port> --connect
Run Code Online (Sandbox Code Playgroud)
例子 :
./jboss-cli.sh --user="Admin" --password="Password" --controller=remote+http://19.199.115.172:9990 --connect
Run Code Online (Sandbox Code Playgroud)
确保您的 Wildfly 已启动并正在运行。如果您为管理控制台使用了不同的端口,则应添加它。