Chris B
Chris B

Reputation: 13

Picked up JAVA_TOOL_OPTIONS in Heroku contain RMI parameters

I'm developing an application and it successfully runs in Heroku. I use the pipeline feature, so the same code is used in dev, staging and production.

While taking a deeper look into the log of the dev app, there is one line, which confuses me a bit:

Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -Dfile.encoding=UTF-8  -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1098 -Dcom.sun.management.jmxremote.rmi.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=true -Djava.rmi.server.hostname=172.xx.xx.xx -Djava.rmi.server.port=1099

In general I understand, that the JVM takes some default parameters from the environment (like memory settings and so on). I question myself, where all these jmx and rmi parameters come from. In my production app, they don't appear.

Is this something special in the environment of the development stage of the pipeline? I cannot find any documentation for it.

App configuration:

I don't have any config vars with the name JAVA_TOOL_OPTIONS. So were do the additional arguments come from?

Upvotes: 1

Views: 1087

Answers (1)

codefinger
codefinger

Reputation: 10318

The -Xmx300m -Xss512k -Dfile.encoding=UTF-8 options come from the Java buildpack, which is documented on Heroku's Dev Center page for Java.

The RMI options probably come from the Heroku Exec and/or Heroku CLI for Java. If you need to disable these, you can run:

$ heroku config:set HEROKU_DISABLE_JMX="true"

Upvotes: 4

Related Questions