question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid NEST response built from a unsuccessful

See original GitHub issue

The sample code is as follows:

       var settings = new ConnectionSettings(new Uri("https://xx.xx.xxx.xxx:9200"))
                            .BasicAuthentication("elastic", "0fjaNokbmHSeS4kXeFV")
                            .DefaultIndex("people")
                            .RequestTimeout(TimeSpan.FromSeconds(300));

        var client = new ElasticClient(settings);

        var person = new Person
        {
            Id = 1,
            FirstName = "Martijn",
            LastName = "Laarman"
        };

        var indexResponse = client.IndexDocument(person);

        if (!indexResponse.IsValid)
        {
            var debugInfo = indexResponse.DebugInformation;
            var error = indexResponse.OriginalException;
        }

environment: 1、ElasticSearch 8.0.1 2、NEST 7.17.0 3、NET 6.0

ps: Entering the account number and password through https://xx.xx.xxx.xxx:9200 can be accessed, but it cannot be accessed through the .net client, and the package error is as follows

The stack information is as follows:

Invalid NEST response built from a unsuccessful () low level call on PUT: /people/_doc/1

Audit trail of this API call:

OriginalException: Elasticsearch.Net.ElasticsearchClientException: The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product. Call: Status code unknown from: GET /

—> Elasticsearch.Net.PipelineException: The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product. —> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. —> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch, RemoteCertificateChainErrors at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception) at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions) at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm) at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, CancellationToken cancellationToken) — End of inner exception stack trace — at System.Net.Http.ConnectHelper.EstablishSslConnectionAsync(SslClientAuthenticationOptions sslOptions, HttpRequestMessage request, Boolean async, Stream stream, 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.TaskCompletionSourceWithCancellation1.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.RedirectHandler.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.Request[TResponse](RequestData requestData) --- End of inner exception stack trace --- at Elasticsearch.Net.RequestPipeline.ThrowIfTransientProductCheckFailure() at Elasticsearch.Net.RequestPipeline.Ping(Node node) at Elasticsearch.Net.Transport1.Ping(IRequestPipeline pipeline, Node node) at Elasticsearch.Net.Transport`1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters) — End of inner exception stack trace —

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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
swapnaram-bandarucommented, Jul 25, 2023

I have exact same error using Single Node, got Certificate Fingerprint from server , connecting via the basic authentication username , password and certificate fingerprint. However no issues browsing to the endpoint (certificate is valid)

1reaction
stevejgordoncommented, Mar 12, 2022

@shuangbaojun and @Sen-Gupta - The most likely cause when communicating with Elasticsearch 8.0 is that the server now starts with security enabled and HTTPS using a self-signed certificate in use by default. I have just added a short guide that covers the steps required to configure the client using the new CA fingerprint information. Please let me know if that helps you get started.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid NEST response built from a unsuccessful low level ...
What am I configurating wrong? Error message: Invalid NEST response built from a unsuccessful low level call on POST: /customer/customer Audit ...
Read more >
Invalid NEST response built from a unsuccessful () low ...
New to ElasticSearch. I've seen a couple posts with similar titles but didn't seem to apply to me. I'm having trouble querying my...
Read more >
Invalid NEST response built from a unsuccessful (401) low ...
Call: Status code 401 from: HEAD / ---> Elasticsearch.Net.PipelineException: Could not authenticate with the specified node. Try verifying your ...
Read more >
Invalid NEST response built from a unsuccessful (200) low ...
Elasticsearch .NET DocumentExists() returns error: Invalid NEST response built from a unsuccessful (200) low level call on HEAD.
Read more >
Invalid NEST response built from a successful (200) low ...
To fix it, you need to go the network settings of your browser, there are available at: chrome://net-internals/#hsts edge://net-internals/#hsts ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found