Hi
I’m trying to install the dynaTrace agent with a fat-client. This client is started via jnlp file. All my trials faild. The client was started always without dynaTrace.
Does anybody have some experienses in this subject? How do I have to setup the configuration?
All the following I tried already:
Versions:
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b16)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)
DynaTrace Server 5.0
I downloaded the agent from
(All dynaTrace Agents for Windows)
and installed only the Java components.
Trial 1: Straigth forward
Adapting java-vm-args in the JNLP files
<resources>
<j2se version='1.7' initial-heap-size='256m' max-heap-size='512m' java-vm-args= -XX:MaxPermSize=256m -agentpath:"C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\agent\lib\dtagent.dll"=name=CLIENT,server=dtserveri.admin.ch:9999,logpath="C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\log",loglevel=error />
According to the syntax guide for jnlp file the parameter agentpath is not supported in java-vm-args
http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html#resources
Trial 2: Environment variable
According to the document „Troubleshooting Guide for Java SE 7 Desktop Technologies“ chapter 7.1.4 „ Passing parameters to the JRE “
http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html
it should be possible to define startup parameters be the environment variable JAVAWS_VM_ARGS. So I executed the following commands in a dos shell:
set JAVAWS_VM_ARGS = -agentpath:"C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\agent\lib\dtagent.dll"=name=CLIENT,server=dtserver.admin.ch:9999,logpath="C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\log",loglevel=error
"Program Files\Java\jre7\bin\javaws.exe" "\\adb.intra.admin.ch\userhome$\BIT-01\U80796706\config\Desktop\client.jnlp"
unfortunatly again without success
Trial 3: -J Parameter
Again according to the above mentioned document the –J parameter may be used when calling javaws
"Program Files\Java\jre7\bin\javaws.exe" "\\adb.intra.admin.ch\userhome$\BIT-01\U80796706\config\Desktop\client.jnlp" -J-agentpath:"C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\agent\lib\dtagent.dll"=name=CLIENT,server=dtserver.admin.ch:9999,logpath="C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\log",loglevel=error
and the same again, it does not work
The Java console was activated, but I didn’t got any hint on what is going wrong.
Answer by Martin W. ·
Hi!
I want to share my experiences concerning your 2nd attempt using environment variables.
The javaws process that is initially launched spawns another java process (not "javaws"). I guess that the new java process doesn't apply options set by JAVAWS_VM_ARGS since it's no javaws process.
But you can use the JAVA_TOOL_OPTIONS environment variable instead. In the shell (or script) you can use the following template:
set AGENT_NAME=CLIENT set SERVER_ALIAS=dtserver.admin.ch set SERVER_PORT=9999 set DT_AGENT_LIB=C:\Program Files U80796706\dynaTrace\dynaTrace Agent 5.0.0\agent\lib\dtagent.dll set JAVA_TOOL_OPTIONS="-agentpath:%DT_AGENT_LIB%=name=%AGENT_NAME%,server=%SERVER_ALIAS%:%SERVER_PORT%"
Afterwards you can launch the Web Start application from the shell (or script) and the agent will connect to your server.
Instead of launching the Web Start application directly you can also start the web browser via shell/script and start the Web Start application later manually by launching the JNLP file with your browser. The JAVA_TOOL_OPTIONS variable is passed to spawned processes.
Martin
Answer by Wolfgang G. ·
Hi,
the -J approach worked for me - although I have to admit I only tried it with the dynaTrace web start client. Starting it using
c:\Program Files (x86)\Java\jre7\bin>javaws -J-agentpath:"c:\Program Files\dynaTrace\dynaTrace 5.6.0\agent\lib\dtagent.dll"=name=dtClient,server=localhost:9998 http://localhost:8020/webstart/Client/client.jnlp
resulted in a dt_dtClient...log in the dynatrace\log directory. Are you getting any error messages or logs?
Thanks,
Wolfgang
JANUARY 15, 3:00 PM GMT / 10:00 AM ET