Forum Home » Enterprise Products » Fuse Management Console

Thread: JVM Options & Maven Proxy URL not set when creating new container from FMC

 

Permlink Replies: 6 - Last Post: May 30, 2012 4:31 PM Last Post By: slewis
alstsever

Posts: 37
Registered: 04/11/12
JVM Options & Maven Proxy URL not set when creating new container from FMC
Posted: May 29, 2012 4:55 PM
  Click to reply to this thread Reply
Hi,

Some issues with container creation:

  • I wanted to change default Xmx value for child containers (seems to be set to 512m by default, don't find where does this value come from. Not from ZooKeeper afaik) but the JVM options (I entered -Xmx256m or Xmx256m) are not taken into account. The instance.properties file in instance folder always contains the following options: item.1.opts=-server -Dcom.sun.management.jmxremote -Dzookeeper.url\="P198829\:2181" -Xmx512m.

  • Same thing regarding the Maven Proxy URL: no matter the URL I provide, I cannot find it in the container settings.

Am I missing something?

Thanks.
slewis

Posts: 235
Registered: 01/12/08
Re: JVM Options & Maven Proxy URL not set when creating new container from FMC
Posted: May 29, 2012 6:01 PM   in response to: alstsever in response to: alstsever
  Click to reply to this thread Reply
Yes, so the JVM arguments not being added to the script is a known issue in Fuse Fabric and will be fixed in a future release.

The maven proxy URL setting is used by the script that is pushed out to a remote machine to download a copy of the Fuse Fabric distribution. It should then also be set in the fabric registry so that agent can download artifacts according to it's profile, this wouldn't show up in the etc/ directory. If you go to the command line of your FMC console you can do "features:install fabric-zookeeper-commands", then do "zk:list -r -d | more" and it should be that output, can't recall the exact key that's stored under.
alstsever

Posts: 37
Registered: 04/11/12
Re: JVM Options & Maven Proxy URL not set when creating new container from FMC
Posted: May 29, 2012 8:37 PM   in response to: slewis in response to: slewis
  Click to reply to this thread Reply
Ok. In the meantime, is there a workaround for the JVM arguments (I really need to lower the Xmx value)? Where do the arguments list/value come from (hardcoded)?

Thanks.
slewis

Posts: 235
Registered: 01/12/08
Re: JVM Options & Maven Proxy URL not set when creating new container from FMC
Posted: May 29, 2012 10:40 PM   in response to: alstsever in response to: alstsever
  Click to reply to this thread Reply
Probably the easiest way to work around this is to set this environment variable in your user account's .bashrc or .profile depending on what shell you're using, for example:

JAVA_OPTS="-Xmx=512MB"; export JAVA_OPTS

this variable is passed to the JVM by the script when it's run.
davsclaus

Posts: 1,893
Registered: 10/14/08
Re: JVM Options & Maven Proxy URL not set when creating new container from FMC
Posted: May 30, 2012 4:39 AM   in response to: slewis in response to: slewis
  Click to reply to this thread Reply
Hi Stan

I think we should add more of this useful information to our FAQ in fabric
http://fuse.fusesource.org/fabric/faq.html

Maybe a sub page for more technical FAQ is needed?
alstsever

Posts: 37
Registered: 04/11/12
Re: JVM Options & Maven Proxy URL not set when creating new container from FMC
Posted: May 30, 2012 7:44 AM   in response to: slewis in response to: slewis
  Click to reply to this thread Reply
I use a Windows workstation. I have just added a JAVA_OPTS environment variable to the system but still no luck.

I have even tried to change the JAVA_OPTS and DEFAULT_JAVA_OPTS values in the root container's karaf.bat script but the values are ignored and not used in instance.properties file.

The container opts are:
item.1.opts=-server -Dcom.sun.management.jmxremote -Dzookeeper.url\="P198829\:2181" -Xmx512m

If I edit these options they are overwritten each time I start the container from Fabric.

How are the options built?

Thanks.
slewis

Posts: 235
Registered: 01/12/08
Re: JVM Options & Maven Proxy URL not set when creating new container from FMC
Posted: May 30, 2012 4:31 PM   in response to: alstsever in response to: alstsever
  Click to reply to this thread Reply
So unfortunately I think the bit of metadata that we're looking for is currently stored as a binary blob in the fabric registry, so would need to be unserialized using the fabric API. I'll log a ticket to store this in a more user-friendly format, in which case you could use fabric:export, edit the file and then use fabric:import to update it.