6 Replies Latest reply on Feb 18, 2010 1:47 AM by Rasa Here

    How to work with twiddle.sh

    Rasa Here Novice

      Hi,

       

      My application was giving OutofMemeoryError in one of our clinet location and i am not able to open the jboss-webconsole. The log was configured using log4j so i am not able to do thread dump also. Hence i used twiddle ,

       

      cd $JBOSS_HOME/bin/
      sh twiddle.sh invoke "jboss.system:type=ServerInfo" listThreadDump > dump.html

       

      And in html the contents are as follows. Since i dnt have persmission to access the server i didn't checked anything. I dont' know why the out pout is like this.

       

      17:58:49,489 WARN [NamingContext] Failed to connect to localhost:1099 javax.naming.CommunicationException: Failed to retrieve stub from server localhost:1099 [Root exception is java.io.EOFException] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:207) at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1185) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509) at javax.naming.InitialContext.lookup(InitialContext.java:347) at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:239) at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:257) at org.jboss.console.twiddle.Twiddle.access$300(Twiddle.java:51) at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:128) at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:47) at org.jboss.console.twiddle.command.MBeanServerCommand.queryMBeans(MBeanServerCommand.java:54) at org.jboss.console.twiddle.command.InvokeCommand.execute(InvokeCommand.java:251) at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:288) Caused by: java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2425) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1245) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322) at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:195) ... 12 more 17:58:54,519 ERROR [Twiddle] Exec failed org.jboss.util.NestedRuntimeException: Receive timed out; - nested throwable: (javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]) at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:132) at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:47) at org.jboss.console.twiddle.command.MBeanServerCommand.queryMBeans(MBeanServerCommand.java:54) at org.jboss.console.twiddle.command.InvokeCommand.execute(InvokeCommand.java:251) at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:288) Caused by: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1119) at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1196) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509) at javax.naming.InitialContext.lookup(InitialContext.java:347) at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:239) at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:257) at org.jboss.console.twiddle.Twiddle.access$300(Twiddle.java:51) at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:128) ... 4 more Caused by: java.net.SocketTimeoutException: Receive timed out at java.net.PlainDatagramSocketImpl.receive(Native Method) at java.net.DatagramSocket.receive(DatagramSocket.java:711) at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1089) ... 12 more