Adding Java Agent Arguments in Message Processor StartUp

Hi All,

We would like to add a third party monitoring agent in our message processor (Elastic APM). We are trying to add the below arguments as part of the jvm startup.

  • -javaagent:/tmp/agent/elastic-apm-agent-1.3.0.jar
  • -Delastic.apm.service_name=apigee
  • -Delastic.apm.application_packages=com.package
  • -Delastic.apm.server_urls=http://[host-ip]:8200

We are getting below behavior when we added/updated the arguments in the following:

1. When doing the apigee messageprocessor startup/restart, we are expecting the value to be like below when the server started but, we notice that setenv.sh ext_jvm_opts returns to "" which was its initial value before the update.

/opt/apigee/edge-message-processor-4.18.05-0.0.1580/bin/setenv.sh

Expected:

ext_jvm_opts="$ext_jvm_opts -javaagent:/tmp/agent/elastic-apm-agent-1.3.0.jar -Delastic.apm.service_name=apigee -Delastic.apm.application_packages=com.package -Delastic.apm.server_urls=http://[host-ip]:8200"

Actual Value after restart:

ext_jvm_opts=

2. apigee message processor won't start and going to dead status.

/opt/apigee/edge-message-processor-4.18.05-0.0.1580/bin/start

custom_jvm_opts="-javaagent:/tmp/agent/elastic-apm-agent-1.3.0.jar -Delastic.apm.service_name=apigee -Delastic.apm.application_packages=com.package -Delastic.apm.server_urls=http://[host-ip]:8200"

# Launching java

exec $JAVA -classpath "$classpath" -Xms$min_mem -Xmx$max_mem $xx_opts -Djava.security.auth.login.config=$conf_path/jaas.config -Dinstallation.dir=$install_dir $sys_props -Dconf.dir=$conf_path -Ddata.dir=$data_dir $custom_jvm_opts $ext_jvm_opts $* $debug_options com.apigee.kernel.MicroKernel

Note: We deliberately use [host-ip] to substitute/hide the real host-ip we are using for this post.

Solved Solved
0 1 614
1 ACCEPTED SOLUTION

The issue for running the agent is solved. The folder and file location was not owned by apigee which causes MPR not to startup.

View solution in original post

1 REPLY 1

The issue for running the agent is solved. The folder and file location was not owned by apigee which causes MPR not to startup.