New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when sink is connected to ElasticSearch 8.0.0-SNAPSHOT #375
Comments
There's not clear way to configure this for Elastic v8 at the moment.
In 8.4.0 we added a couple of features that eventually will work for you.
If
We should probably add the possibility to set the targeted Elastic version to v8 that'll suppress the |
Elastic v8 is out now, bumping this issue! |
I tried this config in version 8.4.1 but still getting the error. |
Is there active development on this or is the project stalled ? Considering this issue was opened in 2020. |
On NuGet you have published a version 8.5.0-alpha0003, but I can't find any corresponding release tag in the GitHub repo. |
Did get it working with the following options:
However it the sink still uses index templates that are deprecated in ElasticSearch 8. |
I'm using Serilog.Sinks.Elasticsearch 8.4.1 and i am currently encountering the problem. Is There any way/workaround to set TypeName in appsetting directly, i won't setting it in code anymore Thank you |
Problem is that default typeName="_doc", hence you cannot reset it from json/yaml configuration. It should be null for 8.x stream. |
I updating to 9.0.0 beta7 but i get the same exception : 2022-07-06T09:28:57.0491018Z Caught exception while performing bulk operation to Elasticsearch: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: POST /_bulk. ServerError: Type: illegal_argument_exception Reason: "Action/metadata line [1] contains an unknown parameter [_type]" |
How do I set TypeName to null using environment variable? |
I had the same problem on a Project based on .Net Framework 4.6.1 and .Net Standard 2.0. Here are some dependency info: ...
}); |
Experienced the same issue (Opensearch running in a local docker) Resolution was indeed to add the |
Setting variable TypeName to null fix problem for me. Now in my appsettings:
elastic 8.4.1 (docker); Serilog.Sinks.Elasticsearch 9.0.0-beta7; Serilog 2.12.0; .Net 6.0; SDK: Version: 6.0.401 Commit: 0906eae6f8 |
This still is not working for me in the appsettings.json I have tried both "TypeName": null and "typeName": null. I have used the latest Serilog.Sinks.Elasticsearch 9.0.0-beta7 Turns out - for me its only showing up when there is an actual error - I was having an authentication error due to the IAM role not being mapped to an internal user - so it only is happening for me when there is an actual error - this is all i am getting instead of the actual error |
A few questions before you begin:
Does this issue relate to a new feature or an existing bug?
What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package.
8.4.1
What is the target framework and operating system? See target frameworks & net standard matrix.
Please describe the current behavior?
When connecting to Elastic 7.9.1 logging works fine. Connecting to 8.0 throws this error:
Please describe the expected behavior?
No errors posting to the bulk endpoint
If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem
Create a logger and hook it up against Elastic 8.0.0
The text was updated successfully, but these errors were encountered: