# OneAgent unable to connect when using Istio

**URL:** <https://community.dynatrace.com/t/oneagent-unable-to-connect-when-using-istio/42911>\
**Category:** Troubleshooting\
**Tags:** kubernetes\
**Created:** [November 30, 2023, 11:16am UTC](https://community.dynatrace.com/t/oneagent-unable-to-connect-when-using-istio/42911 "2023-11-30T11:16:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![darynakovyrina](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/darynakovyrina/32/30846_2.png) [@darynakovyrina](https://community.dynatrace.com/u/darynakovyrina)\
**Post date:** [November 30, 2023, 11:16am UTC](https://community.dynatrace.com/t/oneagent-unable-to-connect-when-using-istio/42911/1 "2023-11-30T11:16:07Z")

</div>

**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:

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

```

For more information, see&nbsp;[DynaKube feature flags for Dynatrace Operator](https://docs.dynatrace.com/docs/shortlink/dto-feature-flags).

---

<div class="post-metadata">

**Author:** ![mwduarte](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mwduarte/32/23031_2.png) [@mwduarte](https://community.dynatrace.com/u/mwduarte)\
**Post date:** [August 24, 2025, 1:23am UTC](https://community.dynatrace.com/t/oneagent-unable-to-connect-when-using-istio/42911/2 "2025-08-24T01:23:31Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![mwduarte](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mwduarte/32/23031_2.png) [@mwduarte](https://community.dynatrace.com/u/mwduarte)\
**Post date:** [August 24, 2025, 11:38pm UTC](https://community.dynatrace.com/t/oneagent-unable-to-connect-when-using-istio/42911/3 "2025-08-24T23:38:18Z")

</div>

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

Global (Mesh Level):

apiVersion: [install.istio.io/v1alpha1](http://install.istio.io/v1alpha1)  
kind: IstioOperator  
spec:  
&nbsp;meshConfig:  
&nbsp; &nbsp;defaultConfig:  
&nbsp; &nbsp; &nbsp;holdApplicationUntilProxyStarts: true

By POD:

apiVersion: apps/v1  
kind: Deployment  
metadata:  
&nbsp; name: my-app  
spec:  
&nbsp; template:  
&nbsp; &nbsp;metadata:  
&nbsp; &nbsp; &nbsp;annotations:  
&nbsp; &nbsp; &nbsp; &nbsp;[proxy.istio.io/config:](http://proxy.istio.io/config:) ‘{ “holdApplicationUntilProxyStarts”: true }’  
&nbsp; spec:  
&nbsp; &nbsp; containers:  
&nbsp; &nbsp; - name: my-app-container  
&nbsp; &nbsp; &nbsp; &nbsp;image: my-app-image
