JBoss EAP 6.1无法通过命令关闭

时间:2016-11-21 12:31:59

标签: jboss

我无法使用以下命令关闭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

1 个答案:

答案 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>