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

cloudNativeFullStack

applicationMonitoring

Example error in the logs on the OneAgent pods: Initial connect: not successful - retrying after xs.

You can fix this problem by increasing the OneAgent timeout. 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

For more information, see DynaKube feature flags for Dynatrace Operator.

Version history
Last update:
‎08 Feb 2024 02:46 AM
Updated by:
Comments
mwduarte
Contributor

Excellent tip, thanks.

We had exactly this scenario: up to a 9-second delay and features like Log Trace/Span enrichment and Java Memory Profiling. For example, in an application with 5 pods, 2 worked and 3 didn't. After restart, 1 worked and 4 didn't, and so on. Sometimes 3 worked, randomly.

2025-08-21 03:05:10.792 UTC [00000007] info [comm] Initial connect: Connection to initial gateways failed (last error SSL connection timeout) using any of:

XXXX, XXXX, XXXX ...

2025-08-21 03:05:10.793 UTC [00000007] warning [native] Unable to do initial setup because no server is reachable. Last error: SSL connection timeout

2025-08-21 03:05:19.584 UTC [0000000e] info [comm ] Connected to XXXX...

mwduarte
Contributor

You can also work around the issue in Istio (1.7+) with the holdApplicationUntilProxyStarts setting.

Global (Mesh Level):

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
 meshConfig:
   defaultConfig:
     holdApplicationUntilProxyStarts: true

 

By POD:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
spec:
  template:
   metadata:
     annotations:
       proxy.istio.io/config: '{ "holdApplicationUntilProxyStarts": true }'
  spec:
    containers:
    - name: my-app-container
       image: my-app-image