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

Connection is poisoned: Cannot read framed message: Cannot read data: early eof #219

Open
TaKO8Ki opened this issue Aug 25, 2023 · 5 comments

Comments

@TaKO8Ki
Copy link

TaKO8Ki commented Aug 25, 2023

Thank you for the great crate!

I got the following error. Can I fix this error? I would appreciate it if you could share it with me if you have a good idea,

Errors:

Failed to connect to broker","e":"cannot sync versions: Request error: Connection is poisoned: Cannot read framed message: Cannot read data: early eof

rskafka version: 0.5.0
Apache Kafka version: 2.6.2

I use Amazon MSK and have three brokers.

source code:

use rskafka::{
    client::{ClientBuilder, SaslConfig},
};

let client =
    ClientBuilder::new(connection)
        .sasl_config(SaslConfig::Plain {
            username: sasl_username,
            password: sasl_password,
        });;

debug!("start building client");
let client = client.build().await?; // This line causes errors.
@pdeva
Copy link

pdeva commented Aug 26, 2023

i am seeing this error too...

@pdeva
Copy link

pdeva commented Aug 26, 2023

mine is failing on this:

 let (record, high_water_mark) = stream
            .next()
            .await
            .expect("some records")
            .expect("no error");

@TaKO8Ki
Copy link
Author

TaKO8Ki commented Aug 27, 2023

I found that I need to use SCRAM-SHA-512 as sasl.mechanisms in my case, so if I want to use rskafka, I have to implement SCRAM-SHA-512 in SaslConfig probably. However I guess we may be able to improve rskafka to output more reasonable errors.

@pdeva
Copy link

pdeva commented Aug 27, 2023

i am not even using sasl at all but still getting the error

@crepererum
Copy link
Collaborator

Sounds like the broker is cutting the connection, probably due to some protocol error. The best thing to try is to capture the network traffic (e.g. w/ wireshark) and analyze it. My rough guess is that is a bit dated and it doesn't like the newer protocol versions that we use.

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

3 participants