-
Notifications
You must be signed in to change notification settings - Fork 790
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
Unable to read messages from MSK Serverless cluster #967
Comments
Hi @mtkopone, Thanks for the detailed report! Unfortunately based on #948 I don't we're compatible with 2.8.1 so that could be the problem You could give https://github.com/rhansen2/kafka-go/tree/consumer-group-client , it makes changes to the Reader including supporting more API Versions but it is a WIP. It doesn't seem like a TLS issue but have you tried with InsecureSkipVerify in your TLS Config? |
@mtkopone Sorry for jumping into the discussion. I have MSK Cluster (not serverless though) with version 2.8.1 with following versions and it works ok. So the
The error is My guts feeling is that I want to double check the MSK port where you are connecting with. For IAM authentication, you need to connect via port 9098 for access from within AWS and port 9198 for public access. AWS documented here. Also, please double check you enabled IAM Authentication when you created MSK. |
Thanks for the additional insight @kikyomits. It also appears there's a bug in the v2 iam package integration #976 The error messages appear different but could also be related. |
I double checked the port, it's correct. As for IAM, that's the only option for MSK Serverless, so it's enabled. |
@mtkopone interesting, can you try to connect to your MSK Serverless via CLI? The steps are well-documented in this blog. The section
It will help me to understand where the root cause of your issue is. |
Yeah. The java client library in that example works as a consumer. Same endpoint, same config. |
^ I had the same issue and the hint |
I upgraded to the latest versions, and the same errors still occur against MSK Serverless with the following:
Also tried with On a different tact, it looks like the javascript kafkajs library has a very similar issue. Here: tulios/kafkajs#1449. An AWS engineer pinpointed where the MSK Serverless protocol differs from the one used by that library here: tulios/kafkajs#1449 (comment) that could provide some light to this issue? |
@mtkopone Using debug logging, is it possible to extract the |
It wasn't the Debugging further.... MSK Serverless reports it would support |
Is it possible to share the request and response for APIVersions API, and the Metadata request? |
Sure thing, here you go: ApiVersions request: (clientId = "1") ApiVersions response:
Which gets parsed to:
Metadata request: (clientId: "1", topic: "t1") As far as I understand, these look ok to me... |
Yes. The problem remained in main. The metadata call only used v1. The PR above makes it also support v6, which fixes at least that problem. |
I face the same err. |
@ZhangDahe would you be able to test if it works using the fork of #1013 ? |
Your merged PR has been included in release https://github.com/segmentio/kafka-go/releases/tag/v0.4.36 Feel free to close this issue if things are working as expected in that version! |
Thank you! We are working on verifying that nothing else is broken with MSK Serverless. Looks good so far. I will update/close this issue once we have more info. |
Closing this with a note that v0.4.36 and v0.4.37 should be skipped as they contain severe bugs. v0.4.38 contains this fix but with the bugs reverted. Please file a new issue if you're continuing to have trouble. Thanks! |
While attempting to switch from an AWS MSK Provisioned Cluster to an MSK Serverless Cluster:
Writing messages to topics works, but attempting to read from a topic fails.
Kafka Version
github.com/segmentio/kafka-go v0.4.34
github.com/segmentio/kafka-go/sasl/aws_msk_iam_v2 v0.0.0-20220809022639-fcb5875e8e6a
AWS is very vague about the version of Kafka they are running in the Serverless setup, but the examples here use the client library intended for 2.8.1. (Consuming messages with that java client works.)
To Reproduce
Expected Behavior
Messages should be received from the topic.
Observed Behavior
Running the example fails.
When providing a groupID in the ReaderConfig, the error is:
Log output:
Without a groupId, and with a partition, the error is:
Log output:
Additional Context
The topic has been created beforehand, and messages have been written to that topic.
I have also tried most of the possible combinations of TLSConfig.MinVersion and MaxVersion available, but to no avail.
The text was updated successfully, but these errors were encountered: