At first all looked good, but then I noticed that I was losing messages. In the Graylog server log there are lots of lines like this:
2021-03-23 00:18:33,566 ERROR: org.graylog.storage.elasticsearch7.MessagesAdapterES7 - Failed to index [3] messages. Please check the index error log in your web interface for the reason. Error: failure in bulk execution:
[778]: index [graylog_2456], type [_doc], id [ebb1ca65-8b64-11eb-85eb-0242863a4b0e], message [ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=failed to parse field [_version] of type [_version] in document with id āebb1ca65-8b64-11eb-85eb-0242863a4b0eā. Preview of fieldās value: ā1ā]]; nested: ElasticsearchException[Elasticsearch exception [type=mapper_parsing_exception, reason=Field [_version] is a metadata field and cannot be added inside a document. Use the index API request parameters.]];]
Where does this field ā_versionā come from? And why is it bothering ES now?
I use a custom mapping that is defined with this call:
So what does the web interface say about this error?
I quickly rolled back because it was a productive environment - so I had no chance to check in the web interface. But I assume would say pretty much what the server log says:
type=mapper_parsing_exception, reason=Field [_version] is a metadata field and cannot be added inside a document. Use the index API request parameters.
After you upgraded did you try to rotate you indices? This fixed my issue.
This was what I tried first, but it didnāt solve the issue.
Are you working with a VM ( Virtual Machine) by chance? If so maybe clone it , adjust the network config and try upgrading again. TBH I would never upgrade my production Graylog without testing it first on another server.