Skip to content

Conversation

@jclarysse
Copy link
Contributor

@jclarysse jclarysse commented Dec 3, 2025

Why change

Journalpump sends Syslog messages over TCP using non-transparent-framing. As a result, multi-line messages are truncated to the 1st line.

Solution proposal

This PR keeps the default behavior but now exposes a new Journalpump config truncate_multiline. When set to false, Journalpump sends Syslog messages over TCP using octet-counting and log messages only get truncated by max size. This is especially helpful when collecting Kafka server logs containing start configs and error stack traces.

Additional information

The PR also includes a minor improvement:

  • Retry to send messages instead of failing when the SSL connection to the Syslog server was closed unexpectedly with ssl.SSLEOFError EOF occurred in violation of protocol (_ssl.c:2427).

Aiven internal: FLEET-6148

RyanSkraba
RyanSkraba previously approved these changes Dec 4, 2025
@jclarysse
Copy link
Contributor Author

The CI workflow failed to build installable wheels for some pyproject.toml based projects: google-re2.
I'm pretty sure that I didn't touch this part.

In newer version of google-re2 dependency, building wheel fails
with message:

```
ERROR: The 'build' command is only supported from within a workspace
(below a directory having a MODULE.bazel file).
```
Retry to send when the SSL connection was closed unexpectedly
with message 'EOF occurred in violation of protocol'.
Syslog over TCP (RFC 6587) supports 2 message framing methods:
- Octet-counted framing: Each message is prefixed with its
    length and a space (<length> <message>).
- Non-transparent framing: Each message is terminated by a
    newline (\n).

So far, non-transparent framing was used by journalpump,
and multi-line log messages were truncated to 1st line.

We keep this behavior by default, but now expose a new config
allowing to switch to octet-counted framing, so that
multi-line log messages only get truncated by max size.
@jclarysse jclarysse force-pushed the jclarysse/feat-rsyslog-sender-multiline-support branch from f6fc322 to f1f03c7 Compare December 5, 2025 12:54
@RyanSkraba RyanSkraba merged commit 4a6fa42 into Aiven-Open:master Dec 5, 2025
4 checks passed
jclarysse added a commit to jclarysse/journalpump that referenced this pull request Dec 15, 2025
The recently added config `truncate_multiline`(PR Aiven-Open#180 and Aiven-Open#181)
might raise wrong user expectation as it relies on a workaround
that is not supported by all syslog servers.

I propose to keep this dev but rename the config to
`octet_counted_framing` which is what it actually does, and
inverse the value. This should avoid confusion and prevent any
future misuse.
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

Successfully merging this pull request may close these issues.

2 participants