Skip to content

Diagnose connection to the Application Insights backend (3.x)

Jean Bisutti edited this page Nov 14, 2022 · 12 revisions

Connection string check

First, please check the value of the connection string.

SSL certificate check

Please check that you don't have an SSL certificate error:

*************************
Application Insights Java Agent failed to connect to ...
*************************

Description:
Unable to find valid certification path to requested target.



Action:
Please import the SSL certificate from https:/....in.applicationinsights.azure.com/, into the default java key store located at:
...
Learn more about importing the certificate here: https://go.microsoft.com/fwlink/?linkid=2151450



Note:
This message is only logged the first time it occurs after startup.

For Application Insights >= 3.3.0 and <= 3.4.2:

ERROR c.a.m.o.e.i.p.TelemetryPipeline - *************************Application Insights Java Agent failed to connect to https:/....in.applicationinsights.azure.com/v2.1/track*************************Description:Unable to find valid certification path to requested target.Action:Please import the SSL certificate from https://.../v2.1/track, into the default java key store located at:... more about importing the certificate here: https://go.microsoft.com/fwlink/?linkid=2151450Note:This message is only logged the first time it occurs after startup.

If you have one of these errors, please follow the instructions in the error message.

Additional tests

If you still have a connection problem, please follow the instructions below.

Ping test

Please download ping-tool-3.jar.

Please execute the following command and send the result to Microsoft support:

java -jar ping-tool-3.jar "<connection-string>"

Application Insights test

Please download app.jar and the last version of Application Insights.

Please execute the following command line:

export APPLICATIONINSIGHTS_CONNECTION_STRING=...
export APPLICATIONINSIGHTS_SELF_DIAGNOSTICS_LEVEL=trace
java -javaagent:applicationinsights-agent-{version}.jar -jar app.jar 

After the execution of the command line, the application will exit.

If the backend connectivity works, you should notice a TRACE on the Application Insights UI (Transaction search):

trace-ai

Please send all log lines to Microsoft support and indicate if you can see the TRACE on the Application Insights UI.