Twiddle连接到远程jboss,用于基于JMX的操作

时间:2012-02-16 13:49:51

标签: jboss

我们在不同的机器上运行了几个jboss实例。我们需要一个脚本来使用JBoss提供的twiddle实用程序来调用JMX控制台操作。

对于localhost,命令工作正常,但是当我们尝试通过以下方式访问远程时:

twiddle.sh -s <servername>:<http port> -uadmin -p<password> serverinfo -c

但是对于远程服务器,我们面临以下异常:

05:25:34,205 ERROR [Twiddle] Exec failed
org.jboss.util.NestedRuntimeException: - nested throwable: (javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table])
at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:144)
    at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:59)
    at org.jboss.console.twiddle.command.MBeanServerCommand.queryMBeans(MBeanServerCommand.java:66)
    at org.jboss.console.twiddle.command.InvokeCommand.execute(InvokeCommand.java:274)
    at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:306)
Caused by: javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:780)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:251)
    at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:269)
    at org.jboss.console.twiddle.Twiddle.access$300(Twiddle.java:63)
    at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:140)
    ... 4 more
Caused by: java.rmi.NoSuchObjectException: no such object in table
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:675)
    ... 10 more

有任何帮助吗?

1 个答案:

答案 0 :(得分:0)

我们无法找到解决方案,最终只使用SSH设法。