question

Brent L. avatar image
Brent L. asked ·

DynaTrace 7.2 Agent for Java application does not work

Dear experts,

Could you please help to provide your recommendation about the DynaTrace 7.2 Agent for Java application issue? Thanks a lot in advance.

My customer is running Java 8 application on RHEL.

After adding DynaTrace 7.2 Agent to Java application startup command, Agent log is not printed and Agent does not work.

In order to debug the issue, I asked the customer to create a HelloWorld class as following:

class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}

Then I asked customer to run the following command. But the Agent still does not print any log info.

java -agentpath:/ptc/Windchill_11.0/Windchill/opt/psm/agent/64/libdtagent.so=name=test,server=172.26.20.52:9988,logstdout=info HelloWorld


Best Regards,
Brent

agentjava7.2
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Brent L. avatar image
Brent L. answered ·

@Joseph M. H. @Dave M.

Yes, the issue comes from PTC Windchill customer, who is using PSM. I understand that Windchill agent only works for PTC Windchill products. But run 'java HelloWorld' with specifying '-agentpath' should print agent related info, although it does not really work.

The OS root user has full permission to read libagentdt.so file.

Customer confirmed they had set 'SELINUX=disabled'. And customer tried downloading the full agent from https://files.dynatrace.com/downloads/OnPrem/dynaTrace/7.2/7.2.0.1697/dynatrace-agent-7.2.0.1697-unix.jar and performed following testing: (see more from attached Testing_2020-04-09.zip)

nm -gD

  • ++Run 'nm -gD' command for the .so Agent files shows some info, which looks good.

nm -gD /data/dynatrace-agent-7.2.0.1697-unix/agent/linux-x86-64/agent/lib64/libdtagent.so

nm -gD /data/dynatrace-agent-7.2.0.1697-unix/agent/linux-x86-64/agent/lib64/libdtagentcore.so

OpenJDK 1.7.0

  • Run following commands does not have dynaTrace Agent printed the information:

java -agentpath:/data/dynatrace-agent-7.2.0.1697-unix/agent/linux-x86-64/agent/lib64/libdtagent.so=name=test,server=172.26.20.52:9988,logstdout=info HelloWorld
java -agentpath:/data/dynatrace-agent-7.2.0.1697-unix/agent/linux-x86-64/agent/lib64/libdtagentcore.so=name=test,server=172.26.20.52:9988,logstdout=info HelloWorld

  • Run 'java -agentpath:/data/dynatrace-agent-7.2.0.1697-unix/agent/linux-x86-64/agent/lib64/libdtagent.so=name=test,server=172.26.20.52:9988,logstdout=info -version' could print dynaTrace Agent info.

Oracle HotSpot Java 1.8.0

  • Run following commands does not have dynaTrace Agent printed the information:

/ptc/Windchill_11.0/Java/jre/java -agentpath:/data/dynatrace-agent-7.2.0.1697-unix/agent/linux-x86-64/agent/lib64/libdtagent.so=name=test,server=172.26.20.52:9988,logstdout=info HelloWorld
/ptc/Windchill_11.0/Java/jre/java -agentpath:/data/dynatrace-agent-7.2.0.1697-unix/agent/linux-x86-64/agent/lib64/libdtagentcore.so=name=test,server=172.26.20.52:9988,logstdout=info HelloWorld

  • Run '/ptc/Windchill_11.0/Java/jre/java -agentpath:/data/dynatrace-agent-7.2.0.1697-unix/agent/linux-x86-64/agent/lib64/libdtagent.so=name=test,server=172.26.20.52:9988,logstdout=info -version' could print dynaTrace Agent info.

From above testing, I suspect there may have some other factors which causes the issue. Any other suggestion? Thanks a lot.

Best Regards,
Brent


1 comment Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

I am out of ideas and would suggest opening a support case.

0 Likes 0 · ·
Dave M. avatar image
Dave M. answered ·

Maybe also try nm -gD libdtagent.so to make sure you have an intact library with the right bitness and for the linux platform.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Joe H. avatar image
Joe H. answered ·

Brent,

You are trying to use the Windchill PTC agent for a non PTC application. The Windchill agent is special and will only work for the PTC Windchill product as part of PSM. As Dave mentioned, try downloading the full agent (Free download) and see if that works for you.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Dave M. avatar image
Dave M. answered ·

Hi Brent,

I downloaded a 64-bit java agent (from a full install of the GA 7.2 AppMon) to a temp directory, recreated HelloWorld and your command and it worked fine for me on CentOS 7. Did you triple-check the path the libagentdt.so file and that the file is readable to the user and that the bitness of the library matches the bitness of the java install?

I also downloaded the 64-bit agent from the "dynatrace-agent" download and it worked fine, also. I am using java-1.8.0-openjdk-devel.

Thanks,

Dave Mauney

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.