# Intermittent outbound connection issue to elastic cloud from azure app service

**URL:** <https://discuss.elastic.co/t/intermittent-outbound-connection-issue-to-elastic-cloud-from-azure-app-service/328181>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 21, 2023, 3:48pm UTC](https://discuss.elastic.co/t/intermittent-outbound-connection-issue-to-elastic-cloud-from-azure-app-service/328181 "2023-03-21T15:48:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chiragsharp](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@chiragsharp](https://discuss.elastic.co/u/chiragsharp)\
**Post date:** [March 21, 2023, 3:48pm UTC](https://discuss.elastic.co/t/intermittent-outbound-connection-issue-to-elastic-cloud-from-azure-app-service/328181/1 "2023-03-21T15:48:31Z")

</div>

Hello Folks,

I have a Virto Commerce deployed in azure app service. From app service intermittently, I am getting below error for connection to elastic cloud.

```auto
Invalid NEST response built from a unsuccessful () low level call on POST: /<alias_name>/_search?typed_keys=true
# Audit trail of this API call:
 - [1] BadRequest: Node: https://<ELASTICSEARCH_HOST>:9243/ Took: 00:00:01.9290312
# OriginalException: System.Net.Http.HttpRequestException: No such host is known. (<ELASTICSEARCH_HOST>:9243)
 ---> System.Net.Sockets.SocketException (11001): No such host is known.
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.DecompressionHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Elasticsearch.Net.HttpConnection.RequestAsync[TResponse](RequestData requestData, CancellationToken cancellationToken)
# Request:
<Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>
# Response:
<Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>
. URL:https://<ELASTICSEARCH_HOST>:9243/, 

```

Not understanding why some request is getting this issue.

We are utilising the product version listed below.

**Virtual commerce: 3.253.3**  
**Elastic Cloud version: 8.6.2**

Let me know, any other information required.

Thanks in advance !!!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [March 21, 2023, 11:55pm UTC](https://discuss.elastic.co/t/intermittent-outbound-connection-issue-to-elastic-cloud-from-azure-app-service/328181/2 "2023-03-21T23:55:54Z")

</div>

Welcome to our community! 😃

> [@chiragsharp](#):
>
> `No such host is known`

That looks like a DNS issue in your app. However we don't know this virto product so I would also be asking the developers of that.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 22, 2023, 1:06am UTC](https://discuss.elastic.co/t/intermittent-outbound-connection-issue-to-elastic-cloud-from-azure-app-service/328181/3 "2023-03-22T01:06:24Z")

</div>

H @chiragsharp Welcome to the community and thanks for try Elastic Cloud.

> [@chiragsharp](#):
>
> `https://<ELASTICSEARCH_HOST>:9243/`

Is that the full Elastic Cloud endpoint as copied from the Elastic Cloud Console?

 ![Screen Shot 2023-03-21 at 6.03.53 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/6/66fd79fadf6c5bea8f54556bf032493eaa12a825.png)

You should not need the 9243 it should look something like  
`https://mydeploymentname.es.us-west1.gcp.cloud.es.io`

Did you open a support ticket?

---

<div class="post-metadata">

**Author:** ![chiragsharp](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@chiragsharp](https://discuss.elastic.co/u/chiragsharp)\
**Post date:** [March 22, 2023, 1:33pm UTC](https://discuss.elastic.co/t/intermittent-outbound-connection-issue-to-elastic-cloud-from-azure-app-service/328181/4 "2023-03-22T13:33:31Z")

</div>

Hey Warkolm,

Thanks for reply.

It is not like we are not able to connect elastic cloud. We are able to connect but some request is getting this intermittent connection issue. I checked next seconds request which is working proper.

---

<div class="post-metadata">

**Author:** ![chiragsharp](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@chiragsharp](https://discuss.elastic.co/u/chiragsharp)\
**Post date:** [March 22, 2023, 1:36pm UTC](https://discuss.elastic.co/t/intermittent-outbound-connection-issue-to-elastic-cloud-from-azure-app-service/328181/5 "2023-03-22T13:36:47Z")

</div>

Hey stephenb,

We can able connect using 9243 port. Let me check after removing 9243 port, hope it will resolve this intermittent outbound connection.

No, I didn't open support ticket.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 19, 2023, 1:37pm UTC](https://discuss.elastic.co/t/intermittent-outbound-connection-issue-to-elastic-cloud-from-azure-app-service/328181/6 "2023-04-19T13:37:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
