用jboss 6.1.0旋转作为版本

时间:2015-04-15 06:06:50

标签: jboss

尝试使用twiddle命令调用jboss 6.1.0 AS来检查/启动/停止war部署,但它失败并显示以下错误消息:

命令:     $ {JBOSS_HOME} /bin/twiddle.sh -s service:jmx:rmi:/// jndi / rmi:// localhost:/ jmxrmi invoke'jboss.web.deployment:war = /'$ {WAR_NAME} start 错误消息:

org.jboss.util.NestedRuntimeException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused]; - nested throwable: (java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused])
        at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:221)
        at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:64)
        at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java:149)
        at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:370)
Caused by: java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused]
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:369)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:268)
        at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:322)
        at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:331)
        at org.jboss.console.twiddle.Twiddle.access$400(Twiddle.java:60)
        at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:217)
        ... 3 more
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused]
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:118)
        at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:203)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1929)
        at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1896)
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:286)
        ... 8 more
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:341)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:114)
        ... 13 more
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at java.net.Socket.<init>(Socket.java:425)
        at java.net.Socket.<init>(Socket.java:208)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:147)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
        ... 18 more

任何帮助都会很明显:​​)

感谢。

1 个答案:

答案 0 :(得分:0)

我得到了我的疑问的答案:)

在jboss 5.1.0中使用命名端口jboss -6.1.0 AS使用RMI端口。

所以命令是: $ {JBOSS_HOME} /bin/twiddle.sh -s service:jmx:rmi:/// jndi / rmi:// localhost:$ {RMI PORT} / jmxrmi invoke&#39; jboss.web.deployment:war = / &#39; $ {WAR_NAME}开始

由于