eventhorizon-cli opened a new issue, #587:
URL: https://github.com/apache/rocketmq-clients/issues/587

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq-clients/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq-clients/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq-clients/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Programming Language of the Client
   
   C#
   
   ### Runtime Platform Environment
   
   Win11
   
   ### RocketMQ Version of the Client/Server
   
   5.1.3
   
   ### Run or Compiler Version
   
   _No response_
   
   ### Describe the Bug
   
   I see the following error when trying to publish a message:
   
   Unhandled exception. Grpc.Core.RpcException: Status(StatusCode="Internal", 
Detail="Error starting gRPC call. HttpRequestException: Requesting HTTP version 
2.0 with version policy RequestVersionOrHigher while unable to establish HTTP/2 
connection.", DebugException="System.Net.Http.HttpRequestException: Requesting 
HTTP version 2.0 with version policy RequestVersionOrHigher while unable to 
establish HTTP/2 connection.
      at 
System.Net.Http.HttpConnectionPool.ThrowGetVersionException(HttpRequestMessage 
request, Int32 desiredVersion)
      at Org.Apache.Rocketmq.RpcClient.QueryRoute(Metadata metadata, 
QueryRouteRequest request, TimeSpan timeout)
      at Org.Apache.Rocketmq.ClientManager.QueryRoute(Endpoints endpoints, 
QueryRouteRequest request, TimeSpan timeout)
      at Org.Apache.Rocketmq.Client.FetchTopicRoute0(String topic)
      at Org.Apache.Rocketmq.Client.FetchTopicRoute(String topic)
      at Org.Apache.Rocketmq.Client.Start()
      at Org.Apache.Rocketmq.Producer.Start()
      at Org.Apache.Rocketmq.Producer.Builder.Build()
      at Program.<Main>$(String[] args) in 
C:\Users\kaihua.huang\RiderProjects\ConsoleApp27\ConsoleApp27\Program.cs:line 13
      at Program.<Main>(String[] args)
   
   
   ### Steps to Reproduce
   
   I used this docker compose to deploy rocketmq 5.1.3
   
https://github.com/apache/rocketmq-docker/blob/master/templates/docker-compose/docker-compose.yml
   
   test with .net6.0:
   ```C#
   using System.Text;
   using Org.Apache.Rocketmq;
   
   const string endpoints = "localhost:9876";
   var clientConfig = new ClientConfig.Builder()
       .SetEndpoints(endpoints)
       .Build();
   
   const string topic = "TestTopic";
   var producer = await new Producer.Builder()
       .SetTopics(topic)
       .SetClientConfig(clientConfig)
       .Build();
   
   var bytes = Encoding.UTF8.GetBytes("foobar");
   const string tag = "TestTag";
   var message = new Message.Builder()
       .SetTopic(topic)
       .SetBody(bytes)
       .SetTag(tag)
       .Build();
   
   var sendReceipt = await producer.Send(message);
   Console.WriteLine($"Send message successfully, 
messageId={sendReceipt.MessageId}");
   
   await producer.DisposeAsync();
   ```
   
   ### What Did You Expect to See?
   
   Can successfully connect to the brokers.
   
   ### What Did You See Instead?
   
   unable to connect to name server
   
   ### Additional Context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to