question

Person P. avatar image
Person P. asked ·

Error occurred during initialization of VM ... Could not find agent library in absolute path

Hi,


I am trying to monitor a spring boot application with dynatrace and I am unable to set -agentpath in JAVA_OPTS in my docker-compose file. But when run docker-compose up it fails throwing bellow error message:

----------------------------------------------------------------------------------------------------------------------------------------------------------

Error occurred during initialization of VM

apache_1 | 2019/10/22 15:31:09.520868 [INFO] consul-template v0.18.0 (5211c66)

consul_1 | Version: 'v1.2.0'

order_1 | Could not find agent library E:\softwares\dtagent\agent\lib64\oneagentjava.dll in absolute path, with error: E:\softwares\dtagent\agent\lib64\oneagentjava.dll: cannot open shared object file: No such file or directory

---------------------------------------------------------------------------------------------------------------------------------------------------------


This is how I'm setting the -agentpath in my docker-compose file:

environment:

- JAVA_OPTS=-agentpath:E:\softwares\dtagent\agent\lib64\oneagentjava.dll=name=Java_mySystemProfile,collector=localhost


Your help on this will be appreciated.




agentjavaerrors
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.

1 Answer

Joe H. avatar image
Joe H. answered ·

A few ideas:

1) Does the process being monitored have R+W access to the agent directory?

2) I assume there really is a file E:\softwares\dtagent\agent\lib64\oneagentjava.dll?

3) Try changing the path to:

E:\softwares\dtagent\agent\lib64\dtagent.dll

4) I assume your JVM is 64bit. If unsure, try changing your path to use \lib\ instead of \lib64\.


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.