Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aakashjhawar opened this issue Sep 5, 2023 · 1 comment
Open

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

aakashjhawar opened this issue Sep 5, 2023 · 1 comment

Comments

@aakashjhawar
Copy link

(check apply)

  • [-] read the contribution guideline
  • [-] (optional) already reported 3rd party upstream repository or mailing list if you use k8s addon or helm charts.

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

  • OS version
  • Bare Metal or within Docker or Kubernetes or others? - Kubernetes
  • Fluentd v0.12 or v0.14/v1.0
    • paste result of fluentd --version or td-agent --version
  • ES plugin 3.x.y/2.x.y or 1.x.y
    • paste boot log of fluentd or td-agent
    • paste result of fluent-gem list, td-agent-gem list or your Gemfile.lock
  • ES version (optional)
  • ES template(s) (optional)
@eli-gc
Copy link

eli-gc commented Dec 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants