radish172521 opened a new issue, #8088:
URL: https://github.com/apache/rocketmq/issues/8088

   ### 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/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/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.
   
   
   ### Runtime platform environment
   
   windows, linux
   
   ### RocketMQ version
   
   version : 5.1.2 
   
   ### JDK Version
   
   jdk17
   
   ### Describe the Bug
   
    I am currently working on a Spring Boot 3 and Rocketmq starter project with 
JDK 17 , and I want to use RocketMQ 5.x in **Proxy** mode. To achieve this, I 
added the following configuration to my project: 
**META-INF\spring\org.springframework.boot.autoconfigure.AutoConfiguration.imports**,
 with the content 
**org.apache.rocketmq.spring.autoconfigure.RocketMQAutoConfiguration.**
   
   With the current configuration, setting **rocketmq.name-server=xxx** allows 
successful production and consumption of messages. However, when I switch to 
RocketMQ proxy mode by setting **rocketmq.name-server=proxy 
remotingListenPort**, the project starts normally but fails to send or consume 
messages.
   
   Here’s the error message I encounter:
   `Caused by: 
org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send 
request to </xxxx:xxx> failed
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.invokeSyncImpl(NettyRemotingAbstract.java:491)
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:551)
        at 
org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1991)
        at 
org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1982)
        at 
org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:781)
        ... 25 common frames omitted
   Caused by: 
org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send 
request to </xxxx:xxx> failed
        at 
org.apache.rocketmq.remoting.netty.ResponseFuture.executeInvokeCallback(ResponseFuture.java:70)
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.lambda$executeInvokeCallback$2(NettyRemotingAbstract.java:402)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at 
java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:842)
   2024-05-02 18:30:24.363 [Thread-7] WARN    
com.alibaba.nacos.common.notify.NotifyCenter - [NotifyCenter] Start destroying 
Publisher 
   2024-05-02 18:30:24.363 [Thread-7] WARN   
com.alibaba.nacos.common.notify.NotifyCenter - [NotifyCenter] Destruction of 
the end 
   2024-05-02 18:30:24.363 [Thread-1] WARN    
c.alibaba.nacos.common.http.HttpClientBeanHolder - [HttpClientBeanHolder] Start 
destroying common HttpClient 
   2024-05-02 18:30:24.364 [Thread-1] WARN  
c.alibaba.nacos.common.http.HttpClientBeanHolder - [HttpClientBeanHolder] 
Destruction of the end `
   
   ### Steps to Reproduce
   
    I am currently working on a Spring Boot 3 project with JDK 17, and I want 
to use RocketMQ 5.x in proxy mode. To achieve this, I added the following 
configuration to my project: 
**META-INF\spring\org.springframework.boot.autoconfigure.AutoConfiguration.imports**,
 with the content 
**org.apache.rocketmq.spring.autoconfigure.RocketMQAutoConfiguration.**
   
   With the current configuration, setting **rocketmq.name-server=xxx** allows 
successful production and consumption of messages. However, when I switch to 
RocketMQ proxy mode by setting **rocketmq.name-server=proxy 
remotingListenPort**, the project starts normally but fails to send or consume 
messages.
   
   Here’s the error message I encounter:
   `Caused by: 
org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send 
request to </xxxx:xxx> failed
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.invokeSyncImpl(NettyRemotingAbstract.java:491)
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:551)
        at 
org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1991)
        at 
org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1982)
        at 
org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:781)
        ... 25 common frames omitted
   Caused by: 
org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send 
request to </xxxx:xxx> failed
        at 
org.apache.rocketmq.remoting.netty.ResponseFuture.executeInvokeCallback(ResponseFuture.java:70)
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.lambda$executeInvokeCallback$2(NettyRemotingAbstract.java:402)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at 
java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:842)
   2024-05-02 18:30:24.363 [Thread-7] WARN    
com.alibaba.nacos.common.notify.NotifyCenter - [NotifyCenter] Start destroying 
Publisher 
   2024-05-02 18:30:24.363 [Thread-7] WARN   
com.alibaba.nacos.common.notify.NotifyCenter - [NotifyCenter] Destruction of 
the end 
   2024-05-02 18:30:24.363 [Thread-1] WARN    
c.alibaba.nacos.common.http.HttpClientBeanHolder - [HttpClientBeanHolder] Start 
destroying common HttpClient 
   2024-05-02 18:30:24.364 [Thread-1] WARN  
c.alibaba.nacos.common.http.HttpClientBeanHolder - [HttpClientBeanHolder] 
Destruction of the end `
   
   ### What Did You Expect to See?
   
   Expect normal consumer/producer work successfully.
   
   ### What Did You See Instead?
   
   `Caused by: 
org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send 
request to </xxxx> failed
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.invokeSyncImpl(NettyRemotingAbstract.java:491)
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:551)
        at 
org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1991)
        at 
org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1982)
        at 
org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:781)
        ... 25 common frames omitted
   Caused by: 
org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send 
request to </xxxxx> failed
        at 
org.apache.rocketmq.remoting.netty.ResponseFuture.executeInvokeCallback(ResponseFuture.java:70)
        at 
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract.lambda$executeInvokeCallback$2(NettyRemotingAbstract.java:402)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
        at 
java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:842)
   2024-05-02 18:30:24.363 [Thread-7] WARN   
com.alibaba.nacos.common.notify.NotifyCenter - [NotifyCenter] Start destroying 
Publisher 
   2024-05-02 18:30:24.363 [Thread-7] WARN  
com.alibaba.nacos.common.notify.NotifyCenter - [NotifyCenter] Destruction of 
the end 
   2024-05-02 18:30:24.363 [Thread-1] WARN   
c.alibaba.nacos.common.http.HttpClientBeanHolder - [HttpClientBeanHolder] Start 
destroying common HttpClient 
   2024-05-02 18:30:24.364 [Thread-1] WARN  
c.alibaba.nacos.common.http.HttpClientBeanHolder - [HttpClientBeanHolder] 
Destruction of the end `
   
   ### Additional Context
   
   I hope this compatibility issue is resolved , Or how to use proxy correctly?


-- 
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: commits-unsubscr...@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to