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

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

Windows Java Service Instrumentation

zriahy
Participant

Dear All,

I have product named "Postilion" this is a payment switch application it works with 20 java services in background , am trying to instrument one of these services ,

but unfortunately after inject the agent based on documentation https://community.compuwareapm.com/community/display/DOCDT60/Windows+Services ,  the service not started .

 

Any idea ?

Quick Response Appreciated

 

Regards

Abdel Mohsen

19 REPLIES 19

wolfgang_gottes
Dynatrace Helper
Dynatrace Helper

Are there any log files available you could look at? Do you have any spaces in the path that could prevent Java from loading the agent library?

amohammad
Organizer

still the agent not generate any log file , actullay the agent not started , already i removed all spaces from path

amohammad
Organizer

Dear Wolfgang.

Regarding the DT_HOME , should i defined this in system environment variables or append "Path" variable ?

 

Regards

Abdel Mohsen

wolfgang_gottes
Dynatrace Helper
Dynatrace Helper

I would define it as a system variable. Can you show how your configuration looks like? Please also make sure that you are using the right agent dll (lib\dtagent.dll for 32 bit java, and lib64\dtagent.dll for 64 bit java). 

jayduttd
Organizer

I think you are not adding proper java option please check the java option.

Best Regards,

Jaydatt

amohammad
Organizer

Hi Wolfgang ,

According to java version 1.6 , just i put the  dytanTrace parameter "agentpath:<DT_HOME>\agent\lib\dtagent.dll=name=<AgentName>,server=<dynatraceCollectorName>"

in windows registry key "ImagePath"  under java service i want to instrument .


After restart the service it should be the agent start instrument , but the problem i faced , i can't start the service with dynaTrace agent parameter

Regards
 

Abdel Mohsen

amohammad
Organizer

Thanks Jaydatt ,

 

According to documentation not mentioned to add any line to java option , anyway java option key is not available under the name of service in registry .

I think you are talking about service working under webserver "Tomcat" .

 

Regards

Abdel mohsen

 

 

harald_berger
Dynatrace Pro
Dynatrace Pro


Hi Abdel,

Please do not forget the dash for the agent option

"-agentpath:<DT_HOME>\agent\lib\dtagent.dll=name=<AgentName>,server=<dynatraceCollectorName>."

 

regards
Harry

Sure Harald i didn't forget the dash .

 

wolfgang_gottes
Dynatrace Helper
Dynatrace Helper

Just in case anyone comes across this thread in the future - the steps itself are correct, the problem was/is that the service wrapper used here does not allow specifying the agentpath parameter (and the resulting error message prevents the service from starting)

Did you find a way around this ? In our case we do not own the Service wrapper so we cannot change it.

Hi

We aren't sure if the service wrapper (Tanuki) will allow specifying the agentpath parameter in the steps, but we will test it.

But if it prevents the service from starting then we maybe be able to change the

service wrapper code, but I am not sure exactly how this would be done. Has anyone done this before and how?

Thanks Stuart

Anonymous
Not applicable

Hi,

At the end "Postilion" app was instrumented or not?

Regards

Alvaro

sgreenshield
Inactive

Hi

We have a similar scenario and we aren't sure if the service wrapper (Tanuki) will allow specifying the agentpath parameter as in the steps, but we will test it.

But if it prevents the service from starting then we maybe be able to change the service wrapper code, but I am not sure exactly how this would be done. Has anyone done this before and how?

Thanks Stuart

Ended up having the same issue, i.e. the wrapper wouldn't allow the registry change on the service imagepath and it never started. However, instead we did the following

1) Edit the Path system environment variable. Prepend C:\Program Files (x86)\dynaTrace\dynaTrace Agent 6.2\agent\lib64 to the "Path" of the environment variable (for java 64 bit DT agent default homepath)

2) add to the tanuki service's wrapper.conf file for the app the following:-

wrapper.java.additional.<num>=-agentpath:"

C:\Program Files (x86)\dynaTrace\dynaTrace Agent 6.2\agent\lib64\dtagent.dll"=name=<SYS_PROFILE_GROUP>,server=<COLLECTOR_HOSTNAME_PORT>


Hi Stuart,

Actually i did it by modifying the window registery key "ImagePath" under specific service related to postilion but the service not started, and i didn't find the wrapper.conf under the service folder.

Could you please give me more details about which service exactly you are successfully instrumented .

Regards

AbdelMohsen

sgreenshield
Inactive

The steps are above. The application we were trying to injected had one main process that ran under a

Tanuki service wrapper. Therefore we had to amend the service wrapper for the injection to be successful.

I hope this helps.

Stuart

Are this Tanuki service related to postilion application.

Regards

AbdelMohsen

sgreenshield
Inactive

Tanuki is software that you can use to Launch your application. This is what the given application above was using to start up, etc.

https://wrapper.tanukisoftware.com/doc/english/launch-win.html

I was trying to inject the DT agent into the process and we had to therefore add the JAVA OPTS at the Tanuki wrapper.conf level.