Open xiaojie2019 opened 5 years ago
Hello. Any update related to this issue? Same case for me. Visual Studio 2015 Target Framework 4.5.2
Same issue with .net core 3.x
I am facing the same error with .net 4.6.1
in the stack trace above, the inner exception is System.Net.Http.HttpRequestException
, which indicates the serializer had trouble communicating with schema registry.
@magician123 , @Anhbta , @aquiros-modus - do you also see HttpRequestException
, or is the underlying problem something else? I can't think of a reason this would occur in .net framework but not .net core - the execution paths are not different. it seems like at the very least there is a common trap here somewhere though.
@confluentinc it was actually the certs that had issues in my case, its now resolved. Thanks.
The serialization error
was throw when credentials or registry configuration was incorrect.
marking as enhancement since I think we probably want to surface a different top level exception (that derives from ProduceException) for various common problems with SR integration.
Local: Key serialization error issue please help
Hello. Any update related to this issue? Same case for me. Visual Studio 2017 Target Framework 4.6.1. Please help...
@mhowlett Do you have any updates to share? or any work around on this issue. Looks like common for .net platform. Earliest resolution would be appreciated.
Facing this issue for value deserialization as well, when using avro deserializer.
Thanks in advance.
@mhowlett do we have any updates on this?
@timarape : Were you able to make it work with .net 4.6.1 or did you upgrade?
Description
I have following the sample code (https://github.com/confluentinc/confluent-kafka-dotnet/tree/master/examples/AvroSpecific) to build a Kafka Avro Producer with C# code. But it works perfectly on .NET Core project, but failed on .NET Framework 4.5.2. Failed reason is key and value serialization error.
How to reproduce
Build and Run the code provided below on Visual Studio 2015 Target Framework 4.5.2
Checklist
Please provide the following information:
public class Program { public static void Main(string[] args) { try { string bootstrapServer = "myBootstrapServer"; string topicName = "myTopicName"; string schemaRegistryUrl = "myUrl"; var saslUsername = "username"; var saslPassword="password"; var sslCaLocation = "sslCaLocation"
RepublishRequest is auto generated Avro class.
[x] Confluent.Kafka nuget version. 1.0.0
[ ] Apache Kafka version.
[ ] Client configuration.
[x] Operating system. Windows 10
[ ] Provide logs (with "debug" : "..." as necessary in configuration).
[x] Provide broker log excerpts.
EXCEPTION: System.AggregateException: One or more errors occurred. ---> Confluent.Kafka.ProduceExceptiond14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Confluent.SchemaRegistry.CachedSchemaRegistryClient.d 13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Confluent.SchemaRegistry.Serdes.SpecificSerializerImpld6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Confluent.Kafka.Producer`2.d 51.MoveNext()
--- End of inner exception stack trace ---
at Confluent.Kafka.Producerd5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Confluent.SchemaRegistry.RestService.d 6d10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Confluent.SchemaRegistry.Serdes.AvroSerializer`1.d 6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Confluent.Kafka.Producerd__51.MoveNext()<---
Enter to exit
2[System.String,com.nordstrom.rms.republish.RepublishRequest]: Local: Key serialization error ---> System.Net.Http.HttpRequestException: [https://schema-registry.nonprod.us-west-2.aws.proton.nordstrom.com/] HttpRequestException: An error occurred while sending the request. at Confluent.SchemaRegistry.RestService.<ExecuteOnOneInstanceAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Confluent.SchemaRegistry.RestService.<RequestAsync>d__6
1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Confluent.SchemaRegistry.RestService.1.<Serialize>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Confluent.SchemaRegistry.Serdes.AvroSerializer
1.2.<ProduceAsync>d__51.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Confluent.Kafka.Examples.SimpleProducer.Program.Main(String[] args) in C:\MyWork\TestApplication\SimpleKafkaProducer\Program.cs:line 79 ---> (Inner Exception #0) Confluent.Kafka.ProduceException
2[System.String,com.nordstrom.rms.republish.RepublishRequest]: Local: Key serialization error ---> System.Net.Http.HttpRequestException: [https://schema-registry.nonprod.us-west-2.aws.proton.nordstrom.com/] HttpRequestException: An error occurred while sending the request. at Confluent.SchemaRegistry.RestService.1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Confluent.SchemaRegistry.RestService.<RegisterSchemaAsync>d__14.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Confluent.SchemaRegistry.CachedSchemaRegistryClient.<RegisterSchemaAsync>d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Confluent.SchemaRegistry.Serdes.SpecificSerializerImpl
1.2.<ProduceAsync>d__51.MoveNext() --- End of inner exception stack trace --- at Confluent.Kafka.Producer
2.