uken / fluent-plugin-elasticsearch

Apache License 2.0
891 stars 310 forks source link

Getting 400 status in fluentd - request body is required #1028

Open aakashjhawar opened 1 year ago

aakashjhawar commented 1 year ago

(check apply)

Problem

I'm getting issues when fluentd is pushing logs to elasticsearch. The status code is 400.

failed to flush the buffer.
error_class=Fluent::Plugin::ElasticsearchOutput::RecoverableRequestFailure 
error="could not push logs to Elasticsearch cluster (cluster-${tag}): [400] 
{
    "error": {
        "root_cause": [
            {
                "type": "parse_exception",
                "reason": "request body is required"
            }
        ],
        "type": "parse_exception",
        "reason": "request body is required"
    },
    "status": 400
}

...

Steps to replicate

Either clone and modify https://gist.github.com/pitr/9a518e840db58f435911

Expected Behavior or What you need to ask

Fluentd should send the data to elasticsearch without any issues. ...

Using Fluentd and ES plugin versions

eli-gc commented 9 months ago

What version of fluentd are you using? I'm getting 400s on version 1.15.1+ but it works fine for me on 1.15.0

applike-ss commented 3 months ago

We are suffering from the same. Versions:

elastic-transport (8.3.1)
elasticsearch (8.12.2)
elasticsearch-api (8.12.2)
fluent-plugin-elasticsearch (5.4.3)

fluentd 1.16.2
applike-ss commented 3 months ago

Same happens on fluentd 1.17.0:

elastic-transport (8.3.2)
elasticsearch (8.14.0, 7.13.3)
elasticsearch-api (8.14.0, 7.13.3)
elasticsearch-transport (7.13.3)
elasticsearch-xpack (7.13.3)
fluent-plugin-aws-elasticsearch-service (2.4.1)
fluent-plugin-elasticsearch (5.4.3)

fluentd 1.17.0