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

Docker Image page's instructions resulting in error for initial CURL test #504

Open
SymphonyOfDream opened this issue Jun 7, 2024 · 1 comment

Comments

@SymphonyOfDream
Copy link

Describe the bug

Windows 11, cmd window, ran steps to
docker pull fluent/fluentd:edge-debian
and create the specified fluentd.conf file.

Then ran the container with
docker run -p 9880:9880 -v /c/workspaces/fluentd:/fluentd/etc fluent/fluentd:edge-debian -c /fluentd/etc/fluentd.conf

I opened a new cmd window, and ran
curl -X POST -d 'json={"json":"message"}' http://127.0.0.1:9880/sample.test

After CURL run, I see this:
400 Bad Request
'json', 'ndjson' or 'msgpack' parameter is required

In the cmd window running the container I see this:
2024-06-07 14:41:19 +0000 [error]: #0 failed to process request error_class=RuntimeError error="'json', 'ndjson' or 'msgpack' parameter is required"
2024-06-07 14:41:19.016053129 +0000 fluent.error: {"error":"#<RuntimeError: 'json', 'ndjson' or 'msgpack' parameter is required>","message":"failed to process request error_class=RuntimeError error="'json', 'ndjson' or 'msgpack' parameter is required""}

Link to the problematic documentation

https://docs.fluentd.org/container-deployment/install-by-docker

Expected explanation

Was expecting no error

Additional context

No response

@daipom
Copy link
Contributor

daipom commented Jun 13, 2024

Thanks for your report.
The cause of the error is that we can't use ' in Windows Command Prompt.

If you use Windows Command Prompt, you need to run the following command:

curl -X POST -d "json={\"json\":\"message\"}" http://127.0.0.1:9880/sample.test

The document assumes a common Unix-like terminal.
Maybe we could add an example command for Windows Command Prompt.

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