Skip to content

ES output fails with 400 due to types removal #887

Closed
@ycombinator

Description

@ycombinator
  • Version: master / 8.0.0
  • Operating System: macOS X 10.14.6
  • Config File (if you have sensitive info, please remove it): default one
  • Sample Data:
  • Steps to Reproduce:
  1. Run Logstash with a simple pipeline sending data to Elasticsearch:

    ./bin/logstash --log-level=debug -e 'input { stdin {} } output { elasticsearch {} }'
    
  2. Send a line of input:

    foobar
    
  3. Observe that the logs show a 400 errors from the Elasticsearch output plugin:

    [2019-10-16T11:47:17,096][ERROR][logstash.outputs.elasticsearch][main] Encountered a retryable error. Will Retry with exponential backoff  {:code=>400, :url=>"http://127.0.0.1:9200/_bulk", :body=>"{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Action/metadata line [1] contains an unknown parameter [_type]\"}],\"type\":\"illegal_argument_exception\",\"reason\":\"Action/metadata line [1] contains an unknown parameter [_type]\"},\"status\":400}"}
    

I believe this is happening because Elasticsearch recently removed the _type property from it's bulk request metadata JSON headers (and the bulk API URL as well).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions