Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: ESB-1536
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jonathan Anstey
Reporter: Susan Javurek
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
FUSE ESB

Unable to pass additional options in the admin script

Created: 14/Sep/11 09:31 PM   Updated: 28/Oct/11 07:30 PM
Component/s: None
Affects Version/s: 4.4.0-fuse-00-27
Fix Version/s: 4.3.1-fuse-xx-00, 4.4.0-fuse-xx-00, 4.4.1-fuse-00-xx

External Issue URL: https://issues.apache.org/jira/browse/KARAF-972


 Description  « Hide
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



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jonathan Anstey added a comment - 28/Oct/11 02:00 PM
Fix is in https://issues.apache.org/jira/browse/KARAF-972. Waiting apply to the Fuse fixes branches now.