-
Notifications
You must be signed in to change notification settings - Fork 197
Rejecting mapping update to [...] as the final mapping would have more than 1 type #181
Comments
Minimal example based on sample from this repo: Also I tried minimal example with AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv6 Hope to your help :) |
Finally, I decided to downgrade to elastic and kibana v 6.2.4 and it's work |
I have the same problem. When I try manually to add data to the index, elasticsearch return this error. {
"took" : 3,
"errors" : true,
"items" : [
{
"index" : {
"_index" : "myapi-2018.07.09",
"_type" : "logevent",
"_id" : null,
"status" : 400,
"error" : {
"type" : "mapper_parsing_exception",
"reason" : "Failed to parse mapping [_default_]: No handler for type [string] declared on field [message]",
"caused_by" : {
"type" : "mapper_parsing_exception",
"reason" : "No handler for type [string] declared on field [message]"
}
}
}
},
{
"index" : {
"_index" : "myapi-2018.07.09",
"_type" : "logevent",
"_id" : null,
"status" : 400,
"error" : {
"type" : "mapper_parsing_exception",
"reason" : "Failed to parse mapping [_default_]: No handler for type [string] declared on field [message]",
"caused_by" : {
"type" : "mapper_parsing_exception",
"reason" : "No handler for type [string] declared on field [message]"
}
}
}
}
]
} I' can't go back to 6.2.4 and I'm not very comfortable with elasticsarch, so how can we fix this issue ? |
I've find a way to fix my issue.
|
I've found workaround for this issue.
Also it could be necessary to delete current logs, which were written by Serilog. |
Old issue, cleaning up. Still facing this issue, feel free to reopen. |
This issue occurred to me when logging to the same Elasticsearch cluster from multiple services, which use mixed sink versions. Turns out there is a discrepancy between underlying type used to index documents, which changed from sink version 7.x (default typeName was 'logevent') to 8.x (default typeName changed to '_doc'). If you are using Elasticsearch 7 and above it will reject mapping update, as only one type is allowed per index. Upgrading all services to use Elasticsearch sink 8.x fixed the issue. |
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.
"Elasticsearch.Net" Version="6.2.0"
"Serilog" Version="2.7.1"
"Serilog.Extensions.Logging" Version="2.0.2"
"Serilog.Sinks.Elasticsearch" Version="6.5.0"
What is the target framework and operating system? See [target frameworks]
Elastic version
6.3
Kibana version
6.3
Please describe the current behavior?
Elasticsearch index created, but on send event, message appears in selflog:
2018-07-03T18:12:50.8104036Z Failed to store event with template '{HostingRequestStartingLog:l}' into Elasticsearch. Elasticsearch reports for index logstash-2018.07.03 the following: {"type":"illegal_argument_exception","reason":"Rejecting mapping update to [logstash-2018.07.03] as the final mapping would have more than 1 type: [doc, logevent]"}
Please describe the expected behavior?
Event sent succesfully
If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem
The text was updated successfully, but these errors were encountered: