EBExtensions : Tomcat JVM Options

0

Hi,
I am new to Elastic Beanstalk and require help with the following issue.
I have a Tomcat based web application which requires access to a native library.
Running my application and specifying the -Djava.library.path=/path/to/my/lib in the JVM options field in the software configuration in the Elastic Beanstalk console works a treat.
However, I wish to add this configuration to the .ebextensions file so that it gets applied automatically when additional instances are spun up. I have not been able to get this working using the configuration below :

option_settings:
aws:elasticbeanstalk:container:tomcat:jvmoptions:
Xms: 756m
Xmx: 756m
XX:MaxPermSize: 128m
JVM Options: -Djava.library.path=/path/to/my/lib

Thanks for your help.

asked 3 years ago409 views
2 Answers
0

I worked around the issue by setting the java.library.path as an environment property rather than via JVM Options.
i.e.
aws:elasticbeanstalk:application:environment:
java.library.path: /path/to/my/lib

answered 3 years ago
0

I had problems with this configuration as well. My mistake was that I wasn't enclosing the values in single quotes. The parameter value should be in single quotes: '-Duser.language=pt -Duser.region=BR' My tomcat-setting.config ended up like this:

{ "option_settings": [ { "namespace": "aws:elasticbeanstalk:container:tomcat:jvmoptions", "option_name": "JVM Options", "value": "'-Duser.language=pt -Duser.region=BR'" } ] }

answered 7 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions