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.

gefragt vor 3 Jahren416 Aufrufe
2 Antworten
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

beantwortet vor 3 Jahren
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'" } ] }

beantwortet vor 16 Tagen

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen