-
Notifications
You must be signed in to change notification settings - Fork 467
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
Kafka Binding v1.10.7: consumer/broker/0 disconnecting due to error processing FetchRequest: EOF\n #2874
Comments
Possibly related to IBM/sarama#913 This shows that unexpected EOFs returned from the server could be due to version mismatch between client and server. |
The error itself comes from the |
@Andemki the Can you set the |
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: kafka-binding
spec:
type: bindings.kafka
version: v1
metadata:
- name: version # YOU LIKELY MUST SET THIS FOR EVENTHUBS
value: 1.0.0 I omitted the other metadata in this example - but I just wanted to highlight how this must be configured. |
Correction: In the Dapr Kafka components we default to version 2 protocol if the version is not specified. components-contrib/internal/component/kafka/metadata.go Lines 109 to 113 in 1ac92a8
|
the component metadata value |
You mentioned this was working in 1.8.7. But it used Kafka protocol v2 then too when not specified. Hmm.. components-contrib/internal/component/kafka/metadata.go Lines 268 to 276 in 9350f2e
This code is unchanged in 1.10.7: components-contrib/internal/component/kafka/metadata.go Lines 280 to 288 in 7ce4e49
|
I still would try changing the kafka version to |
@berndverst, Thank you for a quick reply. I've set version to
|
@Andemki that however seems more promising! This error indicates there is an issue delivering the event to your app - so it seems the Kafka binding at least is getting events from EventHubs now! Can you check the logs of your app? The HTTP 400 seems to be returned by your app. |
@berndverst Yes, I see the error messages in the app:
|
@Andemki Your app must allow the OPTIONS request or else it cannot subscribe to the input binding. https://docs.dapr.io/developing-applications/building-blocks/bindings/bindings-overview/
EDIT: Looks like it's returning the 405 so that part is working. I'm not used to reading DotNet server logs. Somewhere it should be receiving a POST request but is responding with 400. It seems that when the sidecar is delivering the event to your app - your app isn't happy with the headers the sidecar is sending. Can you somehow logs the raw request without parsing it? |
The dapr sidecar message you are seeing comes from here: Given that you didn't specify a route for the binding I expect all events to be going to your app at path You should be seeing POST requests on this path with the event received from EventHubs via the Kafka binding. I am not sure how to further troubleshoot this. To me it seems the component is now working correctly and the remaining problem is in the app. Perhaps you can enable HTTP logging in the app to see the complete request your app is receiving from the sidecar. |
@berndverst Ok, thank you. I will try it. But it's still not clear to me why the app works properly with Dapr v1.8.7 and doesn't work with more recent versions. |
Not sure, but with the release of Dapr 1.11 in one week 1.8.7 won't be supported anyway. Probably because we use an old Does this still work 1.8.7 today? Either way, it's clear there is some sort of issue with your app that receives events from EventHub via the Dapr Binding. You can experiment with other Kafka version values. But something seems wrong with your app from the errors we can see regardless. |
Ok, I am able to see messages coming with version 1.0.0. |
Tested by using upgraded version of sarama library as well (v1.38.1) and using version 1.0.0 as metadata, publish and subscribe both worked fine. |
@DeepanshuA nit a mandatory property. Only mandatory for fake Kafka like EventHubs. |
@berndverst Yes, the application works properly on 1.8.7 (I only changed Dapr version back to 1.8.7 and nothing else and it started to work properly as before).
And then:
And the difference started from here
v.1.8.7:
|
I've also noticed different request headers in different versions:
v.1.8.7:
|
@Andemki What I understand here is that this seems to be an issue specifically with your App side of things. I have opened a docs PR to specify the versoin with EH with kafka: dapr/docs#3474 |
Yup, agree. PS: Seems I by mistake updated your comment directly. Probably selected |
I've updated "Steps to Reproduce the Problem" and pointed out that this issue is reproducible on the ASP.Net Core application. Or it would be better to create a new bug item because it is a different error and the error from the description has been resolved? |
@Andemki please do create a new bug. You probably should file that in The change in request headers is expected by the way as we switched to the underlying HTTP server. For the bug you can state that the pubsub OPTIONS request sends different headers (expected) which cause an exception / error in your ASP.Net Core application (unexpected). You can also add that between the two Dapr versions you are using this is a difference of It seems to me that the missing Please do open that issue in dapr/dapr for this (that's where the relevant code lives also). FYI @ItalyPaleAle I will close this issue here so that we do not talk about multiple different problems in this issue. It's long enough as is :) |
What version of Dapr?
1.10.7
Expected Behavior
Dapr and Azure Event Hub integration using Kafka binding work without errors
Actual Behavior
I've been using bindings.kafka component for recieving messages from Azure Event Hub in my application. Everything work properly in Dapr versions 1.8.7. But when I updated dapr components to version 1.10.7, my application stopped receiving new messages from EventHub. I've noticed the following error message in the sidecar container (daprd):
The last working version is 1.8.7. Starting from Dapr v.1.9.0 the Kafka binding component doesn't work for us.
Yaml output of my bindings.kafka component:
Steps to Reproduce the Problem
The text was updated successfully, but these errors were encountered: