Uploaded image for project: 'FUSE ESB'
  1. FUSE ESB
  2. ESB-1536

Unable to pass additional options in the admin script

    Details

      Description

      Hi,

      A customer was trying to pass in some additional options to the admin script when starting one of his instances, e.g:

      -Djavax.net.ssl.keyStore=/Users/charlesmoulliard/Applications/apache-activemq-5.5.0/conf/broker.ks -Djavax.net.ssl.keyStorePassword=password

      I've set my $KARAF_OPTS accordingly and also as a test updated my CLASSPATH with "/SUSAN" to start:

      CLASSPATH=/SUSAN:$

      Unknown macro: {KARAF_HOME}

      /system/org/apache/karaf/admin/org.apache.karaf.admin.command/2.1.6-fuse-00-05/org.apache.karaf.admin.command-2.1.6-fuse-00-05.jar:$

      /system/org/apache/karaf/admin/org.apache.karaf.admin.core/2.1.6-fuse-00-05/org.apache.karaf.admin.core-2.1.6-fuse-00-05.jar:$

      Unknown macro: {KARAF_HOME}

      /system/org/apache/karaf/shell/org.apache.karaf.shell.console/2.1.6-fuse-00-05/org.apache.karaf.shell.console-2.1.6-fuse-00-05.jar:$

      /system/org/apache/aries/blueprint/org.apache.aries.blueprint/0.2-incubating/org.apache.aries.blueprint-0.2-incubating.jar:$

      Unknown macro: {KARAF_HOME}

      /system/org/ops4j/pax/logging/pax-logging-api/1.6.2/pax-logging-api-1.6.2.jar:$

      /system/org/apache/felix/org.apache.felix.framework/3.0.9/org.apache.felix.framework-3.0.9.jar

      ...
      echo "HI $KARAF_OPTS"
      echo "H2 $CLASSPATH"

      exec $JAVA $JAVA_OPTS -Djavax.net.ssl.keyStore=/Users/charlesmoulliard/Applications/apache-activemq-5.5.0/conf/broker.ks -Djavax.net.ssl.keyStorePassword=password -Dkaraf.instances="$

      Unknown macro: {KARAF_HOME}

      /instances" -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" $KARAF_OPTS -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties $OPTS -classpath "$CLASSPATH" org.apache.karaf.admin.main.Execute "$@"

      When I execute the script I don't see either my KARAF_OPTS or my updated CLASSPATH:

      [org.apache.karaf.admin.internal.InstanceImpl] : Starting instance test with command: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -server -Xmx512M -Dcom.sun.management.jmxremote -Djava.util.logging.config.file="/Users/sjavurek/Fuse/servicemix/4.3.1/apache-servicemix-4.3.1-fuse-02-05/instances/test/etc/java.util.logging.properties" -Djava.endorsed.dirs="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jre/lib/endorsed:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/endorsed:/Users/sjavurek/Fuse/servicemix/4.3.1/apache-servicemix-4.3.1-fuse-02-05/lib/endorsed" -Djava.ext.dirs="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jre/lib/ext:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext:/Users/sjavurek/Fuse/servicemix/4.3.1/apache-servicemix-4.3.1-fuse-02-05/lib/ext" -Dkaraf.home="/Users/sjavurek/Fuse/servicemix/4.3.1/apache-servicemix-4.3.1-fuse-02-05" -Dkaraf.base="/Users/sjavurek/Fuse/servicemix/4.3.1/apache-servicemix-4.3.1-fuse-02-05/instances/test" -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /Users/sjavurek/Fuse/servicemix/4.3.1/apache-servicemix-4.3.1-fuse-02-05/lib/karaf-jaas-boot.jar:/Users/sjavurek/Fuse/servicemix/4.3.1/apache-servicemix-4.3.1-fuse-02-05/lib/karaf.jar:/Users/sjavurek/Fuse/servicemix/4.3.1/apache-servicemix-4.3.1-fuse-02-05/lib/servicemix-version.jar org.apache.karaf.main.Main

      Unless I'm looking in the wrong place, this code in InstanceImpl (around line 206) t seems to only getProperty fields directly and none of them for additional options. It looks like we need to update this program to also include additional options and also clean up our script which is misleading ...

      Kindest regards,
      Susan

        Gliffy Diagrams

          Activity

          Hide
          janstey Jonathan Anstey added a comment -

          Fix is in https://issues.apache.org/jira/browse/KARAF-972. Waiting apply to the Fuse fixes branches now.

          Show
          janstey Jonathan Anstey added a comment - Fix is in https://issues.apache.org/jira/browse/KARAF-972 . Waiting apply to the Fuse fixes branches now.
          Show
          janstey Jonathan Anstey added a comment - Merged to: ESB 4.3.x / Karaf 2.1 - http://fusesource.com/forge/git/karaf.git/?p=karaf.git;a=commit;h=bc95d3bb3dddbfb6ac20ece03d4edb0912d6a4b1 ESB 4.4.x / Karaf 2.2 http://fusesource.com/forge/git/karaf.git/?p=karaf.git;a=commit;h=cbf7f2951ed92d3a26bfe2ea3902961181f8c299

            People

            • Assignee:
              janstey Jonathan Anstey
              Reporter:
              sjavurek Susan Javurek
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: