Uploaded image for project: 'Cloud Enablement'
  1. Cloud Enablement
  2. CLOUD-2451

EAP CD jboss-cli.sh fails to connect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • EAPCD 13.0.GA
    • None
    • EAP_CD
    • None
    • Workaround Exists
    • Hide

      There are several ways to work around this problem:

      (1) In a container terminal type:
      $ stty /dev/null
      This will force allocation of a tty and you can then connect using jboss-cli.sh normally.

      (2) Pass commands to jboss-cli.sh on the command line:
      $ /opt/eap/bin/jboss-cli.sh -c <command>
      (example /opt/eap/bin/jboss-cli.sh -c :whoami )
      Since this does not require the CLI to enter interactive mode the command will be executed and the results displayed.

      (3) Use the --file parameter of jboss-cli.sh.
      This will allow a file of commands to be passed to the CLI and executed, displaying the results on the screen.

      Show
      There are several ways to work around this problem: (1) In a container terminal type: $ stty /dev/null This will force allocation of a tty and you can then connect using jboss-cli.sh normally. (2) Pass commands to jboss-cli.sh on the command line: $ /opt/eap/bin/jboss-cli.sh -c <command> (example /opt/eap/bin/jboss-cli.sh -c :whoami ) Since this does not require the CLI to enter interactive mode the command will be executed and the results displayed. (3) Use the --file parameter of jboss-cli.sh. This will allow a file of commands to be passed to the CLI and executed, displaying the results on the screen.
    • Hide

      Start EAP CD via docker:

      $docker run jboss-eap-7-tech-preview/eap-cd-openshift

      Try and use the CLI via another session: (docker container ls to find the container)

      $ docker exec -it pensive_brattain /opt/eap/bin/jboss-cli.sh

      [This will hang]. The same behavior is observable through OpenShift via the console tab of the running pod.

      You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
      Exception in thread "CLI Terminal Connection (uninterruptable)" java.lang.ArrayIndexOutOfBoundsException: 1025
      at org.aesh.readline.Buffer.doInsert(Buffer.java:238)
      at org.aesh.readline.Buffer.insert(Buffer.java:226)
      at org.aesh.readline.AeshConsoleBuffer.writeChar(AeshConsoleBuffer.java:128)
      at org.aesh.readline.Readline$AeshInputProcessor.parse(Readline.java:262)
      at org.aesh.readline.Readline$AeshInputProcessor.access$100(Readline.java:174)
      at org.aesh.readline.Readline.readInput(Readline.java:95)
      at org.aesh.readline.Readline.access$1000(Readline.java:57)
      at org.aesh.readline.Readline$AeshInputProcessor.lambda$start$1(Readline.java:333)
      at org.aesh.terminal.EventDecoder.accept(EventDecoder.java:107)
      at org.aesh.terminal.EventDecoder.accept(EventDecoder.java:29)
      at org.aesh.io.Decoder.write(Decoder.java:133)
      at org.aesh.readline.tty.terminal.TerminalConnection.openBlocking(TerminalConnection.java:212)
      at org.aesh.readline.tty.terminal.TerminalConnection.openBlocking(TerminalConnection.java:199)
      at org.jboss.as.cli.impl.ReadlineConsole$CLITerminalConnection.lambda$null$1(ReadlineConsole.java:171)
      at java.lang.Thread.run(Thread.java:748)
      java.lang.ArrayIndexOutOfBoundsException: 1024
      at org.aesh.readline.Buffer.doInsert(Buffer.java:238)
      at org.aesh.readline.Buffer.insert(Buffer.java:226)
      at org.aesh.readline.AeshConsoleBuffer.writeChar(AeshConsoleBuffer.java:128)
      at org.aesh.readline.Readline$AeshInputProcessor.parse(Readline.java:262)
      at org.aesh.readline.Readline$AeshInputProcessor.access$100(Readline.java:174)
      at org.aesh.readline.Readline.readInput(Readline.java:95)
      at org.aesh.readline.Readline.processInput(Readline.java:164)
      at org.aesh.readline.Readline.access$800(Readline.java:57)
      at org.aesh.readline.Readline$AeshInputProcessor.parse(Readline.java:257)
      at org.aesh.readline.Readline$AeshInputProcessor.access$100(Readline.java:174)
      at org.aesh.readline.Readline.readInput(Readline.java:95)
      at org.aesh.readline.Readline.processInput(Readline.java:164)
      at org.aesh.readline.Readline.readline(Readline.java:154)
      at org.jboss.as.cli.impl.ReadlineConsole.loop(ReadlineConsole.java:830)
      at org.jboss.as.cli.impl.ReadlineConsole.lambda$null$6(ReadlineConsole.java:865)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)

      This is debuggable by starting the container like this:

      $ docker run -p 8787:8787 jboss-eap-7-tech-preview/eap-cd-openshift
      [EAP starts, 8787 in the container is mapper to 8787 on localhost]

      In another terminal:
      $ docker container ls
      $ docker exec -it <container name> /bin/bash
      $ vi /opt/eap/bin/jboss-cli.sh [enable debug, wait for debugger etc]
      $ /opt/eap/bin/jboss-cli.sh
      [CLI starts, and is attachable on localhost:8787 via debugger

      Show
      Start EAP CD via docker: $docker run jboss-eap-7-tech-preview/eap-cd-openshift Try and use the CLI via another session: (docker container ls to find the container) $ docker exec -it pensive_brattain /opt/eap/bin/jboss-cli.sh [This will hang] . The same behavior is observable through OpenShift via the console tab of the running pod. You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands. Exception in thread "CLI Terminal Connection (uninterruptable)" java.lang.ArrayIndexOutOfBoundsException: 1025 at org.aesh.readline.Buffer.doInsert(Buffer.java:238) at org.aesh.readline.Buffer.insert(Buffer.java:226) at org.aesh.readline.AeshConsoleBuffer.writeChar(AeshConsoleBuffer.java:128) at org.aesh.readline.Readline$AeshInputProcessor.parse(Readline.java:262) at org.aesh.readline.Readline$AeshInputProcessor.access$100(Readline.java:174) at org.aesh.readline.Readline.readInput(Readline.java:95) at org.aesh.readline.Readline.access$1000(Readline.java:57) at org.aesh.readline.Readline$AeshInputProcessor.lambda$start$1(Readline.java:333) at org.aesh.terminal.EventDecoder.accept(EventDecoder.java:107) at org.aesh.terminal.EventDecoder.accept(EventDecoder.java:29) at org.aesh.io.Decoder.write(Decoder.java:133) at org.aesh.readline.tty.terminal.TerminalConnection.openBlocking(TerminalConnection.java:212) at org.aesh.readline.tty.terminal.TerminalConnection.openBlocking(TerminalConnection.java:199) at org.jboss.as.cli.impl.ReadlineConsole$CLITerminalConnection.lambda$null$1(ReadlineConsole.java:171) at java.lang.Thread.run(Thread.java:748) java.lang.ArrayIndexOutOfBoundsException: 1024 at org.aesh.readline.Buffer.doInsert(Buffer.java:238) at org.aesh.readline.Buffer.insert(Buffer.java:226) at org.aesh.readline.AeshConsoleBuffer.writeChar(AeshConsoleBuffer.java:128) at org.aesh.readline.Readline$AeshInputProcessor.parse(Readline.java:262) at org.aesh.readline.Readline$AeshInputProcessor.access$100(Readline.java:174) at org.aesh.readline.Readline.readInput(Readline.java:95) at org.aesh.readline.Readline.processInput(Readline.java:164) at org.aesh.readline.Readline.access$800(Readline.java:57) at org.aesh.readline.Readline$AeshInputProcessor.parse(Readline.java:257) at org.aesh.readline.Readline$AeshInputProcessor.access$100(Readline.java:174) at org.aesh.readline.Readline.readInput(Readline.java:95) at org.aesh.readline.Readline.processInput(Readline.java:164) at org.aesh.readline.Readline.readline(Readline.java:154) at org.jboss.as.cli.impl.ReadlineConsole.loop(ReadlineConsole.java:830) at org.jboss.as.cli.impl.ReadlineConsole.lambda$null$6(ReadlineConsole.java:865) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) This is debuggable by starting the container like this: $ docker run -p 8787:8787 jboss-eap-7-tech-preview/eap-cd-openshift [EAP starts, 8787 in the container is mapper to 8787 on localhost] In another terminal: $ docker container ls $ docker exec -it <container name> /bin/bash $ vi /opt/eap/bin/jboss-cli.sh [enable debug, wait for debugger etc] $ /opt/eap/bin/jboss-cli.sh [CLI starts, and is attachable on localhost:8787 via debugger
    • CLOUD Maintenance Sprint 18

      While testing some other stuff, I noticed that jboss-cli.sh no longer connects. (See debug logs).

      I'm pretty sure that this was working at someone point, but I haven't been able to pinpoint a previous build where it worked yet. (It does work fine with the current EAP71).

      The weird part is the logs seem to show the CLI attempting to run its own output as commands.

        1. cli.txt
          3 kB
        2. cli.log
          57 kB

              kwills@redhat.com Ken Wills
              kwills@redhat.com Ken Wills
              Tomas Remes Tomas Remes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: