fluent/fluentd-docs-gitbook

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

SymphonyOfDream opened this issue · 3 comments

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 commented

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.