markmcdowell/NLog.Targets.ElasticSearch

The difference between .Net core and .Net framework in framework is not logged.

benestomCZ opened this issue · 1 comments

Good day,

I am trying to save the log to Elastic via Nlog. With the same settings via .net Core, I save the log fine. If I save via the .Net Framework, the following error pops up.
Saving to a file via Nlog works fine in both variants.

Do you know what it could be? Or what is the difference between the technologies?

Thank you in advance for your reply.

TB

2023-06-29 15:10:29.4827 Error ElasticSearch: Failed to send log messages. Status= Uri=https://elastic-xxx-logging.apps.ocd.cc.corp/_bulk DebugInformation=Invalid NEST response built from a unsuccessful () low level call on POST: /_bulk

Invalid Bulk items:

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.WebException: Požadavek byl přerušen: Nelze vytvořit zabezpečený kanál SSL/TLS..

v System.Net.HttpWebRequest.GetResponse()
v Elasticsearch.Net.HttpWebRequestConnection.Request[TResponse](RequestData requestData)
--- Konec trasování zásobníku pro vnitřní výjimku ---
v Elasticsearch.Net.RequestPipeline.ThrowIfTransientProductCheckFailure()
v Elasticsearch.Net.RequestPipeline.Ping(Node node)
v Elasticsearch.Net.Transport1.Ping(IRequestPipeline pipeline, Node node) v Elasticsearch.Net.Transport1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters)
--- Konec trasování zásobníku pro vnitřní výjimku ---

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.>
Exception: 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.WebException: Požadavek byl přerušen: Nelze vytvořit zabezpečený kanál SSL/TLS..
v System.Net.HttpWebRequest.GetResponse()
v Elasticsearch.Net.HttpWebRequestConnection.Request[TResponse](RequestData requestData)
--- Konec trasování zásobníku pro vnitřní výjimku ---
v Elasticsearch.Net.RequestPipeline.ThrowIfTransientProductCheckFailure()
v Elasticsearch.Net.RequestPipeline.Ping(Node node)
v Elasticsearch.Net.Transport1.Ping(IRequestPipeline pipeline, Node node) v Elasticsearch.Net.Transport1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters)
--- Konec trasování zásobníku pro vnitřní výjimku ---

the problem disappeared after I added to web.config:
httpRuntime targetFramework