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.

demandé il y a 3 ans409 vues
2 réponses
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

répondu il y a 3 ans
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'" } ] }

répondu il y a 6 jours

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions