Skip to content

Commit

Permalink
out_http: Add trouble shooting section
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
  • Loading branch information
cosmo0920 committed Jun 9, 2020
1 parent b14010a commit 4e6c7de
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions plugins/output/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,79 @@ log line4\n
...
```

## Troubleshooting

### 400 Bad request between out\_http and in\_http

When getting the following error:

```
#0 got unrecoverable error in primary and no secondary error_class=Fluent::UnrecoverableError error="400 Bad Request 400 Bad Request\n'json' or 'msgpack' parameter is required\n"
#0 bad chunk is moved to /tmp/fluent/backup/worker0/object_3ff8a73edae8/5a71a08ca19b1b343c8dce1b74c9a963.log
```

Users should be specify `json` format with `json_array` as true for out\_http configuration:

```
<match **>
@type http
endpoint http://some.your.http.endpoint:9811/your-awesome-path
<format>
@type json
</format>
json_array true
<buffer>
flush_interval 2s
</buffer>
</match>
```

And receiver in\_http configuration should be:

```
<source>
@type http
port 9811
bind 0.0.0.0
<parse>
@type json
</parse>
</source>
```

Or specify msgpack format:

```
<match **>
@type http
endpoint http://some.your.http.endpoint:9882/your-awesome-path
<format>
@type msgpack
</format>
<buffer>
flush_interval 2s
</buffer>
</match>
```

And receiver in\_http configuration should be:

```
<source>
@type http
port 9882
bind 0.0.0.0
<parse>
@type msgpack
</parse>
<format>
@type json
</format>
</source>
```

But, we recomment to use in/out [`forward`](forward.md) plugin to communicate with two Fluentds due to at-most-once and at-least-once semantics for rigidty.

------------------------------------------------------------------------

If this article is incorrect or outdated, or omits critical information, please [let us know](https://github.com/fluent/fluentd-docs-gitbook/issues?state=open).
Expand Down

0 comments on commit 4e6c7de

Please sign in to comment.