I did an upgrade on my personal ELK stack to 6 yesterday and everything was fine until 1600PST / 0000 UTC.
[2017-11-14T16:00:05,887][WARN ][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"apache-2017.11.15", :_type=>"apache", :_routing=>nil}, #LogStash::Event:0x53f53a4b], :response=>{"index"=>{"_index"=>"apache-2017.11.15", "_type"=>"apache", "_id"=>nil, "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 am guessing that it has something to do with an incorrect index template. I tried to update the mapping template using:
I resolved my own problem. The manual method to load the new template failed, so I added the elasticsearch output in filebeat to do the autoload, but I had a typo in the path to fields.yml.
I used the default autoload method because the manual method failed. It
required commenting out the logstash output since you can only have one
output type in the filebeat config.
Does anyone have more ideas that can help? I can't seem to figure this out! I have a feeling I had upgraded incorrectly from 5.6 to 6.0 and that has something to do with it.
I've tried stopping logstash, importing the template again manually from the docs, deleting all old indices and filebeat indices and still this is occurring. Please help!
Since I couldn't get help I ended up deleting my whole stack and starting over. Maybe for someone else this could help, where did you change the mapping type? How did you do it? What is the command or config change to fix it? For new people to ELK the docs are sparse and hard to understand.
I made a PUT request on localhost:9200/_template/mytemplate
with body
__{template=mytemplate-*, mappings={default={properties={logLevel={type=text}, timestamp={type=date}, eventType={type=text}}}}}
and Authorization basic auth.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.