Logstash input elasticsearch plugin throws error


(Kabali12345) #1

Hi all
here i am trying to get data from elasticsearch and send it stdout
but the problem is logstash does not stopped after fetching all records in index
its repeatedly fetching all records .
my logstash.conf
i am useing logstash-5.4.0

input {
 elasticsearch {
    hosts => "192.168.1.59:9233"
     index => "aemnetp_data222"
 } 
}

output {
stdout {codec => rubydebug }
}

And the error its throwing is

[2017-09-27T14:33:42,688][ERROR][logstash.pipeline        ] A plugin had an unrecoverable error. Will restart this plugin.
  Plugin: <LogStash::Inputs::Elasticsearch hosts=>["192.168.1.59:9233"], index=>"aemnetp_data222", id=>"a003783548193a0d60ea553472d53cdad69da91a-1", enable_metric=>true, codec=><LogStash::Codecs::JSON id=>"json_5eae7fce-d112-465d-8de6-07a98e6ec24f", enable_metric=>true, charset=>"UTF-8">, query=>"{ \"sort\": [ \"_doc\" ] }", size=>1000, scroll=>"1m", docinfo=>false, docinfo_target=>"@metadata", docinfo_fields=>["_index", "_type", "_id"], ssl=>false>
  Error: [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Failed to parse request body"}],"type":"illegal_argument_exception","reason":"Failed to parse request body","caused_by":{"type":"json_parse_exception","reason":"Unrecognized token 'DnF1ZXJ5VGhlbkZldGNoBgAAAAAAAdSEFlo2am5iUUE3U3phZF96eE8zYkVwX0EAAAAAAAHUWhZrQUh0NDdSU1EzS2QzWkdIanBfeTVRAAAAAAAB1FkWa0FIdDQ3UlNRM0tkM1pHSGpwX3k1UQAAAAAAAdSFFlo2am5iUUE3U3phZF96eE8zYkVwX0EAAAAAAAHUWxZrQUh0NDdSU1EzS2QzWkdIanBfeTVRAAAAAAAB1IYWWjZqbmJRQTdTemFk...': was expecting ('true', 'false' or 'null')\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@1e663aa7; line: 1, column: 257]"}},"status":400}

Please help me with this where i don't want logstash to repeatedly query data from ES.

Thank You.


(Kabali12345) #2

i updated the logstash input elasticsearch plugin which solves my problem
Thank You.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.