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

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

Not able to connect Apache tomcat appserver 9

imissu093
Newcomer

Hi i am not able to connect apache tomcat server9 as a application serverdynatrace-system-profile.jpg.
i followed the below steps.. please suggest me if i miss anything.


1.i created setenv.bat file and added "SET CATALINA_OPTS=-agentpath:"C:\Program Files\Dynatrace\Dynatrace 7 \agent\lib\dtagent.dll"=name=DT_Monitoring,server=localhost:9998" kept in apache tomcat9/bin floder.


2.i added "-agentpath:"C:\Program Files\Dynatrace\Dynatrace 7\agent\lib\dtagent.dll"=name=DT_Monitoring,server=localhost:9998" in java tab under apche tomcat server9 properties.when ever i added this tomcat server not starting. Even i set JRE_HOME under systsem variables.

3. i am able to see tomcat server in system profiles.But under Agents overview tomcat server9 not coming.

Thanks

4 REPLIES 4

waikeat_chan
DynaMight Pro
DynaMight Pro

I've encounter several times before, that, for Java Agent the agent couldn't work if there is whitespace in the directory being installed, although I don't know why.

You MIGHT want to give this a try (install the java agent in directory where there isn't any whitespace), but I couldn't guarantee it will work. Just provide you one of the possibility here.

Babar_Qayyum
DynaMight Leader
DynaMight Leader

Hello @Sayed A.

There are three following things you will have to be taken care.

  • In the screenshot you provided that agent mapping name is 'Tomcat_Monitoring' but in the agentpath you provided the 'DT_Monitoring' which should be 'Tomcat_Monitoring'
"SET CATALINA_OPTS=-agentpath:"C:\Program Files\Dynatrace\Dynatrace 7 \agent\lib\dtagent.dll"=name=DT_Monitoring,server=localhost:9998"
  • Secondly you are pointing to the 'server=localhost:9998' which should be Dynatrace Server/Collector IP address in case your application is running on the different host. If your application is on the different host then you will have to check whether the port 9998 is open from the application server to the Dynatrce Server/Collector.
  • Thirdly, if your are application is 64bit then you will have to change the path from \lib\ to \lib64\ in the agentpath.

Also there should not be a single space in the agentpath as mentioned by @Chan Wai K. in his answer.

Share the agent and server/collector logs in case you have the same situation after followed the above steps.

Regards,

Babar

imissu093
Newcomer

Hi Babar,

Thank you for suggestions. Am facing same issue still.

PFB

1.i added name agent name same as system profile name.below the path i added in setenv.bat file


SET CATALINA_OPTS=-agentpath:"C:\Program Files\Dynatrace\Dynatrace7.0\agent\lib64\dtagent.dll"=name=Tomcat_Monitoring,server=localhost:9998

2.i am using dynatrace server,clinet and apache tomcat9 server all in same machine(localhost).

3.i placed lib64 in agent path
PFA server logs.

server.zip

Thanks

Hello @Sayed A.

Double check your configuration according to below documentation.

For Tomcat 7.x or later, it is recommend to configure environment variables in the setenv.bat or setenv.sh script located in CATALINA_BASE/bin or CATALINA_HOME/bin.

This file is not typically found in a default Tomcat-only installation and must be created manually, co-located with startup, (in bin). Be sure to place it in the right directory matching your installation type and OS.

Review the below link for more insight.

https://www.dynatrace.com/support/doc/appmon/installation/application-integration/apache-tomcat/

Regards,

Babar