我无法使用以下命令关闭jboss服务器。
JBOSS_HOME/bin/jboss-cli.sh --connect controller=$SERVER_IP_ADDRESS:$SERVER_PORT command=:shutdown
每次我杀死服务器重启都不是一个好的过程。当我们转向PROD环境时,我们应该使用shutdown命令来停止服务器而不是杀死 我收到以下错误。请帮忙。
jboss@devkopmdmh01.corp.ybusa.net::/usr/local/prod/jboss/jboss-eap-6.1/jboss-as/bin > ./shutdownMDM.sh
org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:280)
Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at 10.0.15.162:8080
at org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:951)
... 8 more
Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://10.0.15.162:8080. The connection timed out
at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
... 11 more
Caused by: java.net.ConnectException: JBAS012144: Could not connect to remote://10.0.15.162:8080. The connection timed out
at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:131)
... 13 more
答案 0 :(得分:0)
JBoss CLI正在尝试连接到运行JBoss的本机管理端点并发送shutdown命令。看起来它正试图发送到10.0.15.162:8080,这不是正确的端口(最有可能)。
查看bin / jboss-cli.xml文件,该文件应包含要连接的主机和端口。例如:
<default-controller>
<host>localhost</host>
<port>9999</port>
</default-controller>