cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Tomcat 7 - agent dtagemt.dll injection through Tomcat properties GUI problem

damir_pirc
Newcomer

Hi,

I installed my Dynatrace Trail instance and I'm trying to monitor my first Tomcat 7 on one of Windows 2012 remote machines.

I created monitoring configuration and installed agent manually.

I tried to inject dtagent.dll through Tomcat Propertoes GUI (calling Tomcat7w).

In Java tab under Java Options I pasted:

-Dagentpath="C:\dynaTraceAgent6.3\agent\lib\dtagent.dll"=Name=Tomcat7_Monitoring,Server=dynatrace.vipnet.corp:9998

but my dtwsagent.ini stayed unchanged.

I changed ini file manually adding:

# The name of the web server agent (used for agent mapping on the dynaTrace Server).

Name Tomcat7_Monitoring

# The address of the dynaTrace Collector this agent should connect to.
# The address is of the form host:port, e.g. exampleserver:9998

Server dynatrace.vipnet.corp:9998

After that agent got connected to the server but in Dynatrace Monitoring GUI but there was Dashboard message:

No Agent connected. Ensure that the environment is configured correctly and remember .....

I agent list all agents/agent is in connected status.

Also installed dthost agent on same remote machine and i got normal performance results.

I think that problem is maybe in my dtagent.dll injection syntax.

Also found on community that I have to use setenv.bat but I want tu use Tomcat7w for setting agentpath parameters.

Any ideas or suggestions.

Regards,

Damir

7 REPLIES 7

c_schwarzbauer
Dynatrace Champion
Dynatrace Champion

hi Damir,

please try "-agentpath" instead of "-Dagentpath", as this is no java property.

HTH,
Christian

damir_pirc
Newcomer

Hi after changing syntax I'm getting error in tomcat7-stderr.log

2016-02-26 14:00:17 Commons Daemon procrun stderr initialized
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Unrecognized option: -agentpath=C:\dynaTraceAgent6.3\agent\lib\dtagent.dll=Name=Tomcat7_Monitoring,Server=dynatrace.vipnet.corp:9998

and Tomcat Windows service won't start.

damir_pirc
Newcomer

When I added:

agentpath:C:\dynaTraceAgent6.3\agent\lib\dtagent.dll=Name=Tomcat7_Monitoring,Server=dynatrace.vipnet.corp:9998

and not

agentpath=C:\dynaTraceAgent6.3\agent\lib\dtagent.dll=Name=Tomcat7_Monitoring,Server=dynatrace.vipnet.corp:9998

I'm getting this error in Tomcat7-stdout.log:

2016-02-26 14:04:26 Commons Daemon procrun stdout initialized
Error occurred during initialization of VM
Could not find agent library C:\dynaTraceAgent6.3\agent\lib\dtagent.dll in absolute path, with error: Can't load IA 32-bit .dll on a AMD 64-bit platform

carlos
Inactive

It seems you are trying to use a 32 bit dll on a 64 bit platform, you can find out Java version and bitness, or go ahead and point it to the 64 bit library instead:

-agentpath:"C:\dynaTraceAgent6.3\agent\lib64\dtagent.dll"=Name=Tomcat7_Monitoring,Server=dynatrace.vipnet.corp

damir_pirc
Newcomer

Jupiiiii!

This solved my problem and now I have my first dynatrace app. 🙂

I was suspicious about agent versions but had no clue to call different 64 bit dll.

Thank you very much!

Congrats!! 🙂 - if you want to learn more check out our YouTube Tutorials: http://bit.ly/dttutorials as well as our educational material on our APM University: http://apmu.dynatrace.com

carlos
Inactive

Glad it is working, and would like to see your findings with Dynatrace! There is also a Perf Clinic on Tomcat, very useful.