20 May 2020 07:49 PM
I'm having a strange situation where I cannot get an Openkit implementation working. Digging through the details, it seems that it might be related to trying to use a non-HTTPS connection.
In the first place, I'm using an "Instrumented web server", and since this is being done inside an organization, an existing HTTP application was used, with the new termination in /dtmb. I did not give a lot of importance to it, but since the configuration permitted an HTTP:// URL, I did not put an HTTPS:// URL.
A very simple Openkit instrumentation was done, everything appears to be working (no errors), but there is no case where the initial validation openKit.IsInitialized gets TRUE.
Digging through the details I have discovered in
that this might be important:
"All OpenKit communication to the backend happens via HTTPS."
Given this, it seems that my HTTP endpoint will probably not work. But since it is allowed in the "Instrumented web server", it might be allowed afterall. Has anybody managed to pass it through an HTTP endpoint? Or any other idea why openKit.IsInitialized would always return FALSE?
Solved! Go to Solution.
20 May 2020 08:38 PM
It's a good practice to use the Cluster ActiveGate for this purpose. An instrumented web server should work as well.
I just tried it and it was working for me without any issue (Java with OpenKit library 1.4.2). Which language and library version are you using?
20 May 2020 08:50 PM
I believe the statement "All OpenKit communication to the backend happens via HTTPS." refers to Cluster ActiveGate or the Dynatrace beacon forwarder (in case of SaaS).
20 May 2020 09:54 PM - last edited on 10 Dec 2024 12:59 PM by MaciejNeumann
I believe from your answer that you tried it with HTTP?
Using VB.NET and version 1.4.5.
20 May 2020 10:58 PM
Correct. Using http against an instrumented application server. Do you have a correct URL path? (it must end with /mbeacon).
Also OpenKit library does have a verbose option that can be set during initialization. Did you try to turn this on?
20 May 2020 11:20 PM
In the latest version, an Instrumented web server must end in /dtmb instead of /mbeacon. Have been wondering if that might be an issue...
21 May 2020 08:16 AM
Works as well. Openkit-java-1.4.3 (latest release) with /dtmb . I'm wondering when this change was introduced. Docs still refer the /mbeacon and I did not find anything in the changelogs. Only place is the Dynatrace UI which shows /dtmb when trying to reconfigure the application.
Are you sending directly to the instrumented web server or is some kind of load balancer in the path? (it might filter or otherwise modify the requests). Did you try to turn on the verbose output of openkit?
21 May 2020 02:40 PM
Yes, the verbose output reveals that there are HTTP/403 replies from the endpoint. Going to try these approaches, not necessarily by this order:
21 May 2020 03:20 PM
Do just a curl/wget or browser request from the endpoint where you are trying to send data from to the target webserver (e.g. http://myapp.mydomain/dtmb).
The server must reply with HTTP/200
The beacon whitelist might be the cause here as according to docs, OneAgent should reply with HTTP/403 if the domain does not match.
The configuration in Dynatrace UI, whether you send data to Cluster ActiveGate or instrument webserver does not really matter for the app. At least it did not in my case.
21 May 2020 06:01 PM
I have figured out it must really be some security in between, and already have a workaround. Both dtmb & mbeacon are available. Let's see if the custom application will go ahead, but that's for tomorrow 😉
21 May 2020 08:35 PM
22 May 2020 12:20 PM
Yep, it worked! It was a security configuration, that didn't permit /dtmb directly at the beginning of the URL. But once given another "directory", like http://example.com/application/dtmb, it worked! 🙂