KARAF_OPTS in wrapper

Eight Stars

KARAF_OPTS in wrapper

I was running my ESB based REST webservices directly using "start/ trun".

 

I recently setup the "wrapper" so that I can run the it as an OS service. I had set certain KARAF_OPTS in setenv.bat earlier. However, the KARAF_OPTS no longer take into effect since I moved to the wrapper.

How does one set "KARAF_OPTS" while running the ESB service as a wrapper?

 

I have tried the following in container\etc\myservice.conf:

set.KARAF_OPTS="-Dcontrast.appname=<MyAPP> -Dcontrast.classpath.libs=true -Dcontrast.server=<MyServer> -javaagent:E:/contrast.jar"

 

wrapper.java.additional.11=-Dcontrast.appname=<MyAPP> -Dcontrast.classpath.libs=true -Dcontrast.server=<MyServer> -javaagent:E:/contrast.jar


None of these worked. Any help is appreciated.

Employee

Re: KARAF_OPTS in wrapper

The correct way to set system properties to Talend Runtime when installing it as an OS service (using the "wrapper") is the following (in container\etc\myservice.conf config file):

 

wrapper.java.additional.11=-Dcontrast.appname=<MyApp> -Dcontrast.classpath.libs=true -Dcontrast.server=<MyServer> -javaagent:D:/MyAgent.jar

For my tests I've used a different java agent. With the above configuration my agent was picked up at Talend Runtime start and also the other properties were correctly added.

 

You can inspect the system properties using:

system:property 

 

Eight Stars

Re: KARAF_OPTS in wrapper

@ ipop-talend : I have no clue why the java agent I am using is not triggered. I did validate that the agent works perfectly when doing a "trun" executable.
Anything else I can try/ check?
Thanks.
Employee

Re: KARAF_OPTS in wrapper

You can use jconsole to inspect the VM arguments and Class path in the VM Summary tab. There you should identify if your agent and parameters are set properly.

 

If you still have the default configuration of Karaf, you can use the following service URL for the JMXConnectorServer 

 

service:jmx:rmi://0.0.0.0:44444/jndi/rmi://0.0.0.0:1099/karaf-trun

Username/password: karaf/karaf

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read