-
Notifications
You must be signed in to change notification settings - Fork 21
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 Producer - Exception occured inside SelectAsync - Cancellation cause must not be null #426
Comments
I have been running the above code pushing to Confluent Cloud from my local machine. So far there has been no failures. I am going to try start pushing the data sizes higher and more frequent to test that out. The system that is giving issues I have enabled debug logs on and currently there is nothing really additional that I can report from those logs. The error occurs
Then after that get a Stage Complete message and producer closed
After that in the logs go into the RestartFlow logic which I added in to keep the service processing. The majority of the debug logs seem to be around the consumer opposed to producer. |
The exception was thrown from inside the This means that the problem is inside the |
To report back on this. We do still get intermittent errors about the task continuation.
From all of my testing as long as we have the flow in a restart we handle this stop and restart publishing I have not found any instances where data has been lost. So far in production (which I released this morning) the errors are around once every 2 hours. |
We'll leave this issue open then as the issue isn't fully resolved - thanks for letting us know @mhbuck |
I have been discussing with another team and they are having issues with what I believe is similar to the above issue. This team is running Akka 1.5.38 and Akka.Streams.Kafka 1.5.37 The SelectAsync for a flow that is being used as part of a Kafka Consumer stream is throwing an exception and following the various code flows and looking at the logs I believe the exception is null as well. The code to build up the flow is essentially the below
The function that is passed in as the
and the exception message is
The custom flow decider code implemented in this project does not do any checks on the exception that would trigger a null exception and the Error log does not have an exception property Looking at how that message is getting logged in the streams implementation the exception is definitely being passed to the log step. Unfortunately similar to the original issue logged we have not been able to put together a reliable replication as it only seems to occur running in a k8 cluster. |
Version Information
Akka.Streams Version=1.5.37
Akka.Streams.Kafka Version=1.5.35
Describe the bug
When running the above versions the system is intermittently getting the below error when producing messages.
To Reproduce
What I have below is an attempt to simplify the code and replicate what is happening. Unfortunately currently I have not been able to replicate it while pointing to a local docker instance of Kafka.
This specifically looks like an issue with the Flow and not the Sink. I have not been able to prove this completely but there are numerous systems running with sinks for publishing that are not presenting the same issues.
The code that has been simplified in an attempt to replicate
The csproj file
Expected behavior
Expect more information about the failure or the failure being handled correctly. The cancellation cause is null so there is no information about how it is being handled.
Environment
This is running in docker containers in Azure AKS connecting to Confluent Cloud.
Additional context
This code has been running for a couple hours and have published about ~60k messages with no failures to a local docker kafka instance. Next test will be doing it against the Confluent Cloud instance which is possibly pointing this to being an intermittent connection issues.
The text was updated successfully, but these errors were encountered: