1 Reply Latest reply on Oct 23, 2014 5:10 AM by Anthony Ajayi

    fabric:container-create-ssh script location

    Anthony Ajayi Newbie

      Hi,

       

      Does anyone know where I can locate the script that runs behind the fabric:container-create-ssh command?

      I'm running fuse-fabric-7.2.0.redhat-061 and I'm attempting to create a new ensemble container on a remote machine.

      However when I execute the command I get the following output:

       

      2014-10-20 15:44:24,238 | INFO  | l Console Thread | FabricServiceImpl               | fabric.service.FabricServiceImpl  368 | 56 - org.fusesource.fabric.fabric-core - 7.2.0.redhat-061 | The creation of the container testCont has failed
      java.lang.Exception: xxxx@xxxxx:xx: received exit status 3 executing
      --- command ---
      #!/bin/bash
      function run { echo "Running: $*" ; $* ; rc=$? ; if [ "${rc}" -ne 0 ]; then echo "Command Failed:Error running installation script: $*" ; exit ${rc} ; fi ; }
      
      function download {
        echo "Downloading: $1";
        ret=`curl --write-out %{http_code} --silent --output $2 $1`;
        if [ "${ret}" -ne 200 ]; then
          echo "Download failed with code: ${ret}";
          rm $2;
        fi;
      }
      ...
      ...
      ...
      --- output ---
      ksh: line 13: syntax error at line 44: `(' unexpected
      --- error ---
      ------
              at org.fusesource.fabric.service.ssh.SshContainerProvider.runScriptOnHost(SshContainerProvider.java:215)[67:org.fusesource.fabric.fabric-core-agent-ssh:7.2.0.redhat-061]
      
      

       

      I believe this is because the bash script cannot be interpreted on the linux box that I'm ssh'ing to.

      Bash is not the default shell so the machine attempt to interpret the script using ksh korn shell.

       

      So does anyone know if there's a workaround for this scenario and is it possible to view the script?

       

      Thanks,

      Ant.