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

Symptoms

Sometimes, due to the delay from the K8s pod to setup network, the OneAgent code-modules injected into the monitored process time out when trying to setup the initial connection:

 

 

2024-10-02 07:40:48.031 UTC [00000007] info [comm ] Initial connect: not successful within 6s - giving up 2024-10-02 07:40:48.031 UTC [00000007] info [comm ] Initial connect: connection to initial gateways failed (last error Failed to connect to dynakube-activegate.dynatrace port 443 after 0 ms: Couldn't connect to server) using any of

2024-10-02 07:40:48.031 UTC [00000007] info [comm ] ....

2024-10-02 07:40:48.031 UTC [00000007] info [comm ] .....

2024-10-02 07:40:48.031 UTC [00000007] warning [native] Unable to do initial setup because no server is reachable. Last error: Failed to connect to dynakube-activegate.dynatrace port 443 after 0 ms: Couldn't connect to server

 

 

However, when the K8 pod finishes the network setup, the OneAgent connected to the DT cluster:

 

 

2024-10-02 07:41:03.603 UTC [0000000e] info [comm ] Connected to https://dynakube-activegate.dynatrace:443/communication

 

 

Overall, monitoring is working, and the data is reaching Dynatrace, but some features are not enabled.

As a result, the OneAgent code-modules can monitor the metric of the technology of the monitored process (example: jvm metric), however, due to the initial connection timeout, the OneAgent doesn't get the config/ sensors from the cluster to instrument the process, then it can't detect any server and report the Purepath.

 

Solutions

You can fix this problem by increasing the OneAgent initial connection timeout.

 

Classic Full-Stack mode solution

Increase the OneAgent initial connection timeout through the pod system env:

env: 
   - name: DT_INITIAL_CONNECT_RETRY_MS 
     value: "30000"

and restart the pod to reload the config.

 

App-only and Cloud-native Full-Stack solution

Add the following feature flag to DynaKube:

kubectl annotate dynakube <name-of-your-DynaKube> feature.dynatrace.com/oneagent-initial-connect-retry-ms=6000  -n dynatrace

See OneAgent unable to connect when using Istio

 

Note

Since increasing the initial connection timeout waits on the monitored process to startup, it will delay the monitored process to load the application.

Version history
Last update:
‎26 Nov 2024 07:21 AM
Updated by: