I am trying to create an integration test which would verify that sending and receiving messages are working as expected. I am doing the setup on my windows machine.
I have setup Kafka locally and I have started zookeeper, Kafka and schema registry as shown below. I also have used the consumer and producer scripts to verify that I can send and receive messages on the topic.
However, when I am trying to run my test on visual studio I get the following error
Confluent.Kafka.ProduceException`2[[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] : Local: Key serialization error
---- System.Net.Http.HttpRequestException : [http://localhost:8082/] HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:3128)
Port 3128 smells like a proxy server - might check that there isn’t some environment setting that’s attempting to force connections through a proxy server.
foo
error producing message: Confluent.Kafka.ProduceException`2[System.String,Avro.Generic.GenericRecord]: Local: Value serialization error
---> System.Net.Http.HttpRequestException: [http://localhost:8081/] HttpRequestException: Connection refused (localhost:3128)
at Confluent.SchemaRegistry.RestService.ExecuteOnOneInstanceAsync(Func`1 createRequest) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/src/Confluent.SchemaRegistry/Rest/RestService.cs:line 248
at Confluent.SchemaRegistry.RestService.RequestAsync[T](String endPoint, HttpMethod method, Object[] jsonBody) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/src/Confluent.SchemaRegistry/Rest/RestService.cs:line 257
at Confluent.SchemaRegistry.RestService.RegisterSchemaAsync(String subject, Schema schema, Boolean normalize) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/src/Confluent.SchemaRegistry/Rest/RestService.cs:line 321
at Confluent.SchemaRegistry.CachedSchemaRegistryClient.RegisterSchemaAsync(String subject, Schema schema, Boolean normalize) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/src/Confluent.SchemaRegistry/CachedSchemaRegistryClient.cs:line 377
at Confluent.SchemaRegistry.Serdes.GenericSerializerImpl.Serialize(String topic, GenericRecord data, Boolean isKey) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/src/Confluent.SchemaRegistry.Serdes.Avro/GenericSerializerImpl.cs:line 151
at Confluent.SchemaRegistry.Serdes.AvroSerializer`1.SerializeAsync(T value, SerializationContext context) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/src/Confluent.SchemaRegistry.Serdes.Avro/AvroSerializer.cs:line 163
at Confluent.Kafka.Producer`2.ProduceAsync(TopicPartition topicPartition, Message`2 message, CancellationToken cancellationToken) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/src/Confluent.Kafka/Producer.cs:line 771
--- End of inner exception stack trace ---
at Confluent.Kafka.Producer`2.ProduceAsync(TopicPartition topicPartition, Message`2 message, CancellationToken cancellationToken) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/src/Confluent.Kafka/Producer.cs:line 777
at Confluent.Kafka.Examples.AvroGeneric.Program.Main(String[] args) in /Users/brettrandall/src/confluentinc/confluent-kafka-dotnet/examples/AvroGeneric/Program.cs:line 112
Make sure neither HTTP_PROXY or HTTPS_PROXY are set in your test environment.