-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
TLS error: unexpected EOF #6165
Comments
Ubuntu OS direct install: (not docker) [OUTPUT] Error: |
I can reproduce this bug, output from fluentbit through fluentd by forward. |
FluentD:
FluentBit:
|
The bug ist gone or fixed for me with FluentBit Version 2.0.3 |
Is it or isn't it gone @leowinterde? I worked in that layer recently so I could take a look if it's still a problem. |
I can see still the issue, even in version 2.0.3 |
yes things look like working but I see this error if the output is ES. |
Looks like issue is finally fixed in version 2.0.6, so closing the issue |
what was the issue @petergvizd |
I have fluentbit 2.0.9 and the issue is still present: [2023/03/06 15:41:31] [error] [tls] error: unexpected EOF [OUTPUT] |
Would you be able to share some information about your setup? If you prefer to do it in private you can message me in slack. I'd like to know which operating system version you are running fluent-bit in and the same about the opensearch server. You can probably get enough information from the opensearch server running this command As for the fluent-bit host I'd like to know which operating system (distribution and version if linux) or container image you are running so I can determine if there is an issue with the openssl version. Please don't hesitate to include as much information as possible and I think if this actually persists for you then it might be appropriate to open a new issue so it can be properly tracked. |
Hi, We are in containers fluentbit is fluent/fluent-bit:2.0.9 I'm using self-signed certificates which are generated inside the the OpenSearch container. and I hoped that tls.verify Off will be sufficient to overcome the limitations of the fact that it's self-signed. I also tried to change the plugin from es to OpenSearch but there is no difference. I might open a ticket but I'm not sure if it's really a bug as I'm using a self-signed certs and I'm not providing any of the:
|
You don't need to provide any of those tls settings fluent-bit when acting as a client and since you disabled |
Ok it's a little embarrassing but when I started working on repro steps / setting up minimal containers where the bug will be reproducible I found that in that "test" environment it works... so the bug must be somewhere in my configuration. |
It's ok, thank you for letting us know, any information is valuable information, even a failure to reproduce the issue, keep it up and don't hesitate to ask for help! |
@salacr were you able to sort out the issue? I get similar error when I am trying to flush records from fluentbit ocp container to logstash port. I also have v2.0.9. Below is my config and error: Config: Let me know if you or someone has any thoughts. Thanks |
Nope I started configuring everything from scratch and it "just works" now. Don't know where was a problem :/ (Actually it might be a problem with Opensearch as it's quite unfriendly in a term of docker provisioning so there might be some bugs in my previous instalation ) |
Ran into this earlier running Fluent Bit (statically linked) on an Alpine docker image. Turns out I needed to install the For anybody in this thread, just a warning that setting |
im seeing this error as well. i was using this docker-compose, but needed to turn 'tls on' for OpenSearch to accept a fluent-bit communication...but now i see the error this issue talks about. in addition OpenSearch logs this exceptions later - not sure if the two are related:
|
I faced the same issue recently. My fluent bit pods were running behind a kubernetes load balancer which was sending health probes. These health probes were causing the "[error] [tls] error: unexpected EOF" errors. To fix this, I modified the externalTrafficPolicy to Local and updated the healthCheckNodePort. This ensures Kubernetes LB send the health probes on a separate port. Refer this for configuration: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip |
@dss010101 I'm running into the same issue as you with both fluentbit and Opensearch. As you probably saw, the opensearch issue may be a JDK problem that seems to not be resolved opensearch-project/security#3299 As a workaround, I tried bumping TLS version down to v1.2, but then Opensearch complains about expired certificate when fluentbit attempts TLS handshake. What's weird is that fluentbit certs aren't expired, and Opensearch certs weren't expired either (but were recently renewed). Also, Opensearch dashboards is able to communicate with the OS cluster -- so there must be something specific to the handshake fluentbit and OS are attempting. All that said, did you ever figure this out @dss010101? |
Closed issue and all, but I'll update for future users -- for me, this issue goes away once we moved away from self signed certs. For some reason, renewal with self signed certs broke stuff, but if we move to LetsEncrypt certificates fluentbit is able to talk to OS again. |
unfortunately, no and due to lack of engagement on the issue, decided to go with other libraries. im glad u figured it out though. |
It seems this issue persists even when running Fluent Bit version 3.1.0. In my case, it occurred during a cluster update and continued afterward. Downgrading to 3.1.10 from 3.2.0 also resolved the problem, though some instances in the fleet running the same version (3.1.10) still experienced the error. Sharing this here in case it helps others troubleshoot similar scenarios. |
Bug Report
Describe the bug
Looks like there is issue during recycling multiple TLS connections (when there is only one opened connection to upstream, or no TLS is used, everything works fine), that is causing error in communication between fluent-bit and fluentd. According to captured communication, it looks like from time to time fluent-bit is sending encrypted alert number 21 (probably TLS close notify) during TLS handshake.
To Reproduce
With docker could be reproduced by:
fluent-bit.conf
fluentd.conf
Commands:
Error message on fluent-bit side
Error message on fluentd side
Expected behavior
Multiple TLS connections should be recycled correctly without any errors.
Screenshots
Screenshot from captured communication (fluent-bit: 172.19.0.3, fluentd: 172.19.0.2)
Your Environment
Fluent-bit version: 1.9.7
Fluent-bit OpenSSL version: 1.1.1n
Fluentd version: 1.14.0
Fluentd OpenSSL version: 1.1.1q
Additional context
We would like to have possibility to dynamically scale aggregator part (fluentd) in kubernetes environment along with usage of TLS. Typically we are sending logs from multiple containers collected by fluent-bit (opening multiple upstream connections) to aggregator and in case of aggregator scale out, we would like from fluent-bit to reload new addresses of fluentd pods. To achieve this we tried usage of
net.keepalive_max_recycle
, but hit issue above.The text was updated successfully, but these errors were encountered: