7 Replies Latest reply on Nov 14, 2016 6:00 AM by cornhoolio22

    jboss-cli.sh stucks

    cornhoolio22

      Hi,

       

      I just experienced a hanging jboss-cli.sh until I stop the server.

       

      Steps to reproduce:

      1. configure ssl for the management interface

      2. use a path for the keystore that doesn't exist

      3. start the server

      4. connect with ./jboss-cli.sh --controller=https-remoting://localhost:9993 -c

       

      The result is a hanging console, which have to be killed with 'kill -9'

       

      I will attach my standalone.xml and a threaddump. It looks like a deadlock in the threaddump.

       

      My question here: is there a way to come around the hanging console?

       

      Thx in advance for any helpful hint.

       

      Cheers,

      Markus

        • 1. Re: jboss-cli.sh stucks
          cornhoolio22

          Oh one information was missing: I use a Wildfly 10.1.0.Final

          • 2. Re: jboss-cli.sh stucks
            ctomc

            Markus Falk wrote:

             

            Oh one information was missing: I use a Wildfly 10.1.0.Final

            well yes, also platform and exact version of JVM used.

            • 3. Re: jboss-cli.sh stucks
              cornhoolio22

              Sure. Here you go:

              java -version

               

              java version "1.8.0_102"

              Java(TM) SE Runtime Environment (build 1.8.0_102-b14)

              Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

              • 4. Re: jboss-cli.sh stucks
                jaikiran

                Looking at the thread dump, it appears that the shutdown is blocked on execution of shutdown hooks and this appears to be the one blocking the shutdown:

                "Thread-2" #14 prio=5 os_prio=0 tid=0x00007fb09c835800 nid=0x2d38 in Object.wait() [0x00007fb06d0e8000]

                   java.lang.Thread.State: WAITING (on object monitor)

                    at java.lang.Object.wait(Native Method)

                    - waiting on <0x00000000d6a48fb8> (a java.lang.Object)

                    at java.lang.Object.wait(Object.java:502)

                    at org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:190)

                    - locked <0x00000000d6a48fb8> (a java.lang.Object)

                    at org.jboss.as.cli.impl.CLIModelControllerClient$2.shutdown(CLIModelControllerClient.java:104)

                    at org.jboss.as.cli.impl.CliShutdownHook$1.run(CliShutdownHook.java:50)

                    - locked <0x00000000d8cf63c0> (a java.util.ArrayList)

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

                • 5. Re: jboss-cli.sh stucks
                  cornhoolio22

                  Jep,I came to the same conclusion. Looks like a bug on shutdown of the cli interface to me...

                  • 6. Re: jboss-cli.sh stucks
                    jaikiran

                    Can you file a JIRA for this here - JBoss Issue Tracker  and include all relevant details and point to this discussion for reference?

                    • 7. Re: jboss-cli.sh stucks
                      cornhoolio22

                      Hi Jaikiran,

                       

                      thx for the response. I was able to test it with the nightly build of Friday, 11th November. The behaviour is fixed there.

                       

                      The Nightly Build sees on startup that the directory doesn't exist. On first cli connect, there is an exception the the SSL context couldn't be initialized. On second cli connect, the exception states that the SSLContextImpl in not initialized. And the jboss-cli.sh is shut down correctly every time.

                       

                      Best Regards,

                      Markus