-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
SASL connection to Eventhubs using kafka fails 1.38.0 onwards #2470
Comments
@DeepanshuA hmm, the only change that looks relevant is #2388 when we started sending MetadataRequest V7 if you have Version in your sarama.Config as V2_1_0_0 or newer. It's possible that EventHubs isn't supporting this. Can you try setting your sarmaa.Config Version down to V2_0_0_0 and test? |
This comment was marked as outdated.
This comment was marked as outdated.
The problem with supporting Azure Event Hubs is that it isn't Apache Kafka under the covers, it's an intermediate proxy that supports a subset of the Kafka APIs at various versions and then maps them onto Event Hubs protocol(s) at the backend. As as result Sarama's current mechanism of specifying the KAFKA_VERSION to determine what protocol versions to support and use doesn't really work properly with Event Hubs because it supports an unusual set of protocols and even defines minimum versions for ProduceRequest (v3) and FetchRequest (v4). For some reason EventHubs is very behind on FetchRequest and MetadataRequest so the max configuration you can use in Sarama is V1_0_0_0. Here are the equivalent max versions for Kafka 1.0 and EventHubs:
|
The problem with supporting Azure Event Hubs is that it isn't Apache Kafka under the covers, it's an intermediate proxy that supports a subset of the Kafka APIs at various versions and then maps them onto Event Hubs protocol(s) at the backend. As as result Sarama's current mechanism of specifying the KAFKA_VERSION to determine what protocol versions to support and use doesn't really work properly with Event Hubs because it supports an unusual set of protocols and even defines minimum versions for ProduceRequest (v3) and FetchRequest (v4). For some reason EventHubs is very behind on FetchRequest and MetadataRequest so the max configuration you can use in Sarama is V1_0_0_0 and the minimum is V0_11_0_0. As we have recently bumped the default Version to V2_1_0_0 and support a wider range of protocol versions, we're more likely to see issues raised by Event Hubs users unless they have already pinned their version correctly. To try and prevent this, attempt to detect use with Event Hubs by inspecting the bootstrap broker addresses and overriding the Version. Contributes-to: #2470 Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
The problem with supporting Azure Event Hubs is that it isn't Apache Kafka under the covers, it's an intermediate proxy that supports a subset of the Kafka APIs at various versions and then maps them onto Event Hubs protocol(s) at the backend. As as result Sarama's current mechanism of specifying the KAFKA_VERSION to determine what protocol versions to support and use doesn't really work properly with Event Hubs because it supports an unusual set of protocols and even defines minimum versions for ProduceRequest (v3) and FetchRequest (v4). For some reason EventHubs is very behind on FetchRequest and MetadataRequest so the max configuration you can use in Sarama is V1_0_0_0 and the minimum is V0_11_0_0. As we have recently bumped the default Version to V2_1_0_0 and support a wider range of protocol versions, we're more likely to see issues raised by Event Hubs users unless they have already pinned their version correctly. To try and prevent this, attempt to detect use with Event Hubs by inspecting the bootstrap broker addresses and overriding the Version. Contributes-to: #2470 Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
As discussed, pinning version to V1_0_0_0 manually would have prevented this issue when using Azure Event Hubs. However, it should also be resolved in v1.41.1 onward where we will force a pin to V1_0_0_0 if we think we're connecting to Event Hubs |
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
| Sarama | Kafka | Go |
|1.38.0|2.0.0|1.20.1|
Configuration
What configuration values are you using for Sarama and Kafka?
Logs
When filing an issue please provide logs from Sarama and Kafka if at all
possible. You can set
sarama.Logger
to alog.Logger
to capture Sarama debugoutput.
logs: CLICK ME
Problem Description
Dapr started to use 1.38.0 and then 1.38.1 sarama version.
When trying to connect to Event hubs using kafka via Dapr, this issue occurs.
If sarama 1.37.2 version is used, connection is successful and no issue occurs.
Tried to debug as well, if some new property needs to be set for SASL connection after 1.38.0 onwards, but couldn't find anything relevant.
It fails at this place: https://github.com/Shopify/sarama/blob/9127f1c432c08b9a766fdb0931bfd0da80dddde0/broker.go#L1133
Related to dapr/components-contrib#2755
The text was updated successfully, but these errors were encountered: