Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4113

jboss-cli.sh: give exit code != 0 on connect failure

    Details

    • Type: Feature Request
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.1.0.Final
    • Fix Version/s: 7.1.1.Final
    • Component/s: CLI
    • Labels:
      None

      Description

      When jboss-cli.sh fails, it does not set an exit code.
      E.g. called with option --connect and the server is not running, the connect fails. But exit code is 0.

      sb2000.[maj2e_langfr]/mbi/mbi2e_all. ksh -x $JBOSS_HOME/bin/jboss-cli.sh --controller=localhost:9999 --connect
      + + dirname /mbi/tools/jboss/7.1/bin/jboss-cli.sh
      DIRNAME=/mbi/tools/jboss/7.1/bin
      + cygwin=false
      + darwin=false
      + linux=false
      + uname
      + false
      + + cd /mbi/tools/jboss/7.1/bin/..
      + pwd
      RESOLVED_JBOSS_HOME=/mbi/tools/jboss/7.1
      + [ x/mbi/tools/jboss/7.1 = x ]
      + + cd /mbi/tools/jboss/7.1
      + pwd
      SANITIZED_JBOSS_HOME=/mbi/tools/jboss/7.1
      + [ /mbi/tools/jboss/7.1 != /mbi/tools/jboss/7.1 ]
      + export JBOSS_HOME
      + [ x = x ]
      + [ x/mbi/tools/jdk/1.6.0 != x ]
      + JAVA=/mbi/tools/jdk/1.6.0/bin/java
      + false
      + false
      + eval "/mbi/tools/jdk/1.6.0/bin/java" -jar "/mbi/tools/jboss/7.1/jboss-modules.jar" -mp "/mbi/tools/jboss/7.1/modules" org.jboss.as.cli "$@"
      + /mbi/tools/jdk/1.6.0/bin/java -jar /mbi/tools/jboss/7.1/jboss-modules.jar -mp /mbi/tools/jboss/7.1/modules org.jboss.as.cli --controller=localhost:9999 --connect
      org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
      at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:228)
      at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:207)
      at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.modules.Module.run(Module.java:260)
      at org.jboss.modules.Main.main(Main.java:291)
      Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at localhost:9999
      at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:639)
      at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:613)
      at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:226)
      ... 8 more
      sb2000.[maj2e_langfr]/mbi/mbi2e_all. echo $?
      0

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                aloubyansky Alexey Loubyansky
                Reporter:
                lafr Frank Langelage
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: