5 Replies Latest reply on Jun 24, 2013 6:39 PM by Mustaq Pradhan

    jboss-cli-client.jar cli.disconnect() hangs when called from groovy script

    Lloyd Meinholz Newbie

      I am trying to follow the instructions from:




      I have copied the groovy script and things seem to work as expected, but the script hangs on the disconnect. I have simplified the script to:


      import org.jboss.as.cli.scriptsupport.*


      cli = CLI.newInstance()




      and still the script hangs.


      I am connecting to a JBoss EAP 6.1.0 instance running on my Linux localhost. I have tried with 32-bit and 64-bit 1.6.0 and 1.7.0 JDK's with the same result.


      When I do a kill -3 on the script, I get some things that seem to point to xnio:




      Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.21-b01 mixed mode):


      "DestroyJavaVM" prio=10 tid=0x00007fc74c009000 nid=0x6dc2 waiting on condition [0x0000000000000000]

         java.lang.Thread.State: RUNNABLE



      "Remoting "cli-client" task-4" prio=10 tid=0x00007fc6f8072000 nid=0x6ddb waiting on condition [0x00007fc739667000]

         java.lang.Thread.State: WAITING (parking)

                at sun.misc.Unsafe.park(Native Method)

                - parking to wait for  <0x00000007c47c5f40> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)

                at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)

                at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)

                at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)

                at org.xnio.LimitedBlockingQueue.take(LimitedBlockingQueue.java:95)

                at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                at java.lang.Thread.run(Thread.java:722)




      The script functions correctly in that I am able to retreive the start time and compute the uptime, but the script doesn't seem to properly disconnect from the server.


      Does anyone have any pointers? Thanks,