Intermittent outbound connection issue to elastic cloud from azure app service

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.

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 !!!

Welcome to our community! :smiley:

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.

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

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

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?

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.

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.

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