无法阻止Jboss7

时间:2014-09-15 11:05:04

标签: java jboss

我无法阻止JBoss AS 7.我就是这样做的:

sudo sh /usr/local/jboss-eap-6.2/bin/jboss-cli.sh --connect command=:shutdown

但是控制台说:

  

org.jboss.as.cli.CliInitializationException:无法连接到   调节器           在org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:284)           在org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:250)           在org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)           at java.lang.reflect.Method.invoke(Method.java:606)           在org.jboss.modules.Module.run(Module.java:292)           在org.jboss.modules.Main.main(Main.java:455)引起:org.jboss.as.cli.CommandLineException:控制器不可用   在localhost:9999           在org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:969)           在org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:808)           在org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:784)           在org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:282)           ... 8更多引起:java.io.IOException:java.net.ConnectException:JBAS012144:无法连接到   远程://本地主机:9999。连接超时           at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)           在org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)           在org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:947)           ... 11更多引起:java.net.ConnectException:JBAS012144:无法连接到remote:// localhost:9999。连接超时           at org.jboss.as.protocol.ProtocolConnectionUtils.connectSync(ProtocolConnectionUtils.java:131)           at org.jboss.as.protocol.ProtocolConnectionManager $ EstablishingConnection.connect(ProtocolConnectionManager.java:256)           at org.jboss.as.protocol.ProtocolConnectionManager.connect(ProtocolConnectionManager.java:70)           at org.jboss.as.protocol.mgmt.FutureManagementChannel $ Establishing.getChannel(FutureManagementChannel.java:204)           在org.jboss.as.cli.impl.CLIModelControllerClient.getOrCreateChannel(CLIModelControllerClient.java:160)           在org.jboss.as.cli.impl.CLIModelControllerClient $ 2.getChannel(CLIModelControllerClient.java:120)           在org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:117)           在org.jboss.as.protocol.mgmt.ManagementChannelHandler.executeRequest(ManagementChannelHandler.java:92)           at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeRequest(AbstractModelControllerClient.java:236)           在org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:141)           at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)           ......还有13个

我试图做这样的事情:

sudo sh /usr/local/jboss-eap-6.2/bin/jboss-cli.sh --connect controller=192.168.100.25:9999 command=:shutdown

但仍然是这个错误。这也是我的独立:

 <interfaces>
        <interface name="management">
            <inet-address value="${jboss.bind.address.management:192.168.100.25}"/>
        </interface>
        <interface name="public">
            <inet-address value="${jboss.bind.address:192.168.100.25}"/>
        </interface>
        <interface name="unsecure">
            <inet-address value="${jboss.bind.address.unsecure:192.168.100.25}"/>
        </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}"/>
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
        <socket-binding name="ajp" port="8009"/>
        <socket-binding name="http" port="8080"/>
        <socket-binding name="https" port="5443"/>
        <socket-binding name="remoting" port="4447"/>
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="remote-ejb">
            <remote-destination host="192.168.100.104" port="4447"/>
        </outbound-socket-binding>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="192.168.100.25" port="25"/>
        </outbound-socket-binding>
    </socket-binding-group>

这是>ps -eaf | grep "jboss"

root       602     1  0 13:12 pts/1    00:00:00 /bin/sh /usr/local/jboss-eap-6.2/bin/standalone.sh -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root       655   602  0 13:12 pts/1    00:01:10 /usr/lib/java/java-1.7.0/bin/java -D[Standalone] -server -Xms512m -Xmx512m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/usr/local/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/usr/local/jboss-eap-6.2/standalone/configuration/logging.properties -jar /usr/local/jboss-eap-6.2/jboss-modules.jar -mp /usr/local/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/usr/local/jboss-eap-6.2 -Djboss.server.base.dir=/usr/local/jboss-eap-6.2/standalone -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root      5184     1  0 15:07 pts/1    00:00:00 /bin/sh /usr/local/jboss-eap-6.2/bin/standalone.sh -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root      5236  5184  6 15:07 pts/1    00:00:47 /usr/lib/java/java-1.7.0/bin/java -D[Standalone] -server -Xms512m -Xmx512m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/usr/local/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/usr/local/jboss-eap-6.2/standalone/configuration/logging.properties -jar /usr/local/jboss-eap-6.2/jboss-modules.jar -mp /usr/local/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/usr/local/jboss-eap-6.2 -Djboss.server.base.dir=/usr/local/jboss-eap-6.2/standalone -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root      5600     1  0 13:20 pts/1    00:00:00 /bin/sh /usr/local/jboss-eap-6.2/bin/standalone.sh -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root      5654  5600  0 13:20 pts/1    00:01:07 /usr/lib/java/java-1.7.0/bin/java -D[Standalone] -server -Xms512m -Xmx512m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/usr/local/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/usr/local/jboss-eap-6.2/standalone/configuration/logging.properties -jar /usr/local/jboss-eap-6.2/jboss-modules.jar -mp /usr/local/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/usr/local/jboss-eap-6.2 -Djboss.server.base.dir=/usr/local/jboss-eap-6.2/standalone -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     10975     1  0 13:29 pts/1    00:00:00 /bin/sh /usr/local/jboss-eap-6.2/bin/standalone.sh -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     11027 10975  0 13:29 pts/1    00:01:05 /usr/lib/java/java-1.7.0/bin/java -D[Standalone] -server -Xms512m -Xmx512m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/usr/local/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/usr/local/jboss-eap-6.2/standalone/configuration/logging.properties -jar /usr/local/jboss-eap-6.2/jboss-modules.jar -mp /usr/local/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/usr/local/jboss-eap-6.2 -Djboss.server.base.dir=/usr/local/jboss-eap-6.2/standalone -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    antonp   13335 27946  0 15:20 pts/1    00:00:00 grep jboss
    root     14235     1  0 13:34 pts/1    00:00:00 /bin/sh /usr/local/jboss-eap-6.2/bin/standalone.sh -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     14287 14235  1 13:34 pts/1    00:01:08 /usr/lib/java/java-1.7.0/bin/java -D[Standalone] -server -Xms512m -Xmx512m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/usr/local/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/usr/local/jboss-eap-6.2/standalone/configuration/logging.properties -jar /usr/local/jboss-eap-6.2/jboss-modules.jar -mp /usr/local/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/usr/local/jboss-eap-6.2 -Djboss.server.base.dir=/usr/local/jboss-eap-6.2/standalone -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     15298     1  0 Jun03 ?        00:00:00 /bin/sh /usr/local/jboss-eap-6.2/bin/standalone.sh -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     15350 15298  3 Jun03 ?        3-13:54:24 /usr/lib/java/java-1.7.0/bin/java -D[Standalone] -server -Xms512m -Xmx512m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/usr/local/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/usr/local/jboss-eap-6.2/standalone/configuration/logging.properties -jar /usr/local/jboss-eap-6.2/jboss-modules.jar -mp /usr/local/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/usr/local/jboss-eap-6.2 -Djboss.server.base.dir=/usr/local/jboss-eap-6.2/standalone -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     23573     1  0 13:50 pts/1    00:00:00 /bin/sh /usr/local/jboss-eap-6.2/bin/standalone.sh -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     23625 23573  1 13:50 pts/1    00:01:02 /usr/lib/java/java-1.7.0/bin/java -D[Standalone] -server -Xms512m -Xmx512m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/usr/local/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/usr/local/jboss-eap-6.2/standalone/configuration/logging.properties -jar /usr/local/jboss-eap-6.2/jboss-modules.jar -mp /usr/local/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/usr/local/jboss-eap-6.2 -Djboss.server.base.dir=/usr/local/jboss-eap-6.2/standalone -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     30201     1  0 13:08 pts/1    00:00:00 /bin/sh /usr/local/jboss-eap-6.2/bin/standalone.sh -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0
    root     30253 30201  0 13:08 pts/1    00:01:06 /usr/lib/java/java-1.7.0/bin/java -D[Standalone] -server -Xms512m -Xmx512m -XX:MaxPermSize=512m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/usr/local/jboss-eap-6.2/standalone/log/server.log -Dlogging.configuration=file:/usr/local/jboss-eap-6.2/standalone/configuration/logging.properties -jar /usr/local/jboss-eap-6.2/jboss-modules.jar -mp /usr/local/jboss-eap-6.2/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -Djboss.home.dir=/usr/local/jboss-eap-6.2 -Djboss.server.base.dir=/usr/local/jboss-eap-6.2/standalone -Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0=true -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0

怎么了?我怎么能阻止Jboss?

2 个答案:

答案 0 :(得分:3)

查看堆栈跟踪,该命令正在查找服务器:localhost:9999

java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999.

尝试将端口号更改为8080:

controller=192.168.100.25:8080

或者, 请尝试以下方法。

要检查JBOSS服务器是否仍在运行,请运行以下命令。

ps -eaf | grep "jboss"

检查JBOSS实例是否列在进程列表中,如果是,请获取进程ID并执行kill命令。

kill -9 PID

答案 1 :(得分:1)

你可以用这个脚本杀死它:

JBOSS_PID=`ps -ef | grep org.jboss.modules.Main | grep -v grep | awk '{print $2}'`

if [ -n "$JBOSS_PID" ]; then
        kill $JBOSS_PID
else
    echo "No jboss server is running"
fi