You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/04/09 15:16:20 UTC

[GitHub] [rocketmq] sydcph opened a new issue, #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

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

   rocketmq集群方式:双主双从 异步复制
   版本:rocketmq-all-4.9.1-bin-release
   
   问题产生原因:集群部署在阿里云vpc网络下,使用公网slb映射到内网9876 和 10911端口,生产者在外网 获取到的broker地址是内网地址,因此修改了broker的配置文件,如下:
   broker-master :
   brokerIP1=123.41.156.234
   brokerIP2=192.168.11.123
   
   broker-slave:
   brokerIP1=192.168.11.124
   brokerIP2=192.168.11.124
   
   此时发现外网生产者Producer的消息接收到,但是slave启动时报错:发现slave 连接master走的是brokerIP1,没有走brokerIP2。现在不想让slave通过公网IP连接master。
     ERROR BrokerControllerScheduledThread1 - SyncSubscriptionGroup Exception, 123.41.156.234:10911
   org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed
           at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:394) ~[rocketmq-remoting-4.9.1.jar:4.9.1]
           at org.apache.rocketmq.broker.out.BrokerOuterAPI.getAllSubscriptionGroupConfig(BrokerOuterAPI.java:381) ~[rocketmq-broker-4.9.1.jar:4.9.1]
           at org.apache.rocketmq.broker.slave.SlaveSynchronize.syncSubscriptionGroupConfig(SlaveSynchronize.java:125) [rocketmq-broker-4.9.1.jar:4.9.1]
           at org.apache.rocketmq.broker.slave.SlaveSynchronize.syncAll(SlaveSynchronize.java:52) [rocketmq-broker-4.9.1.jar:4.9.1]
           at org.apache.rocketmq.broker.BrokerController$12.run(BrokerController.java:1144) [rocketmq-broker-4.9.1.jar:4.9.1]
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_281]
           at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_281]
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_281]
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_281]
           at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_281]
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_281]
           at java.lang.Thread.run(Thread.java:748) [na:1.8.0_281]
   
   


-- 
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: dev-unsubscribe@rocketmq.apache.org.apache.org

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


[GitHub] [rocketmq] lizhimins commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by GitBox <gi...@apache.org>.
lizhimins commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1095875727

   可以在 Namesrv 上修改,对 TopicRouteData 进行映射,存在少量修改代价


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] MatrixHB commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by GitBox <gi...@apache.org>.
MatrixHB commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1094241263

   > 那有其他方法解决 消息生产者Producer在外网,如果不设置brokerIP的情况下,Producer从namesrv上获取的是内网IP的问题么?
   
   开源rockermq的nameServer 尚不具备将内网IP映射成外网IP返回的能力,所以修改brokerIP1 是大部分开源实践者采取的做法,但确实引起你说的slave复制元数据会经过外网,您能否针对此issue提交一个PR,由rockermq团队review一下?


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] RongtongJin commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1094164986

   > rocketmq/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java
   
   源码上应该把`this.slaveSynchronize.setMasterAddr(registerBrokerResult.getMasterAddr());`改为`this.slaveSynchronize.setMasterAddr(registerBrokerResult.getHaServerAddr());`就可以。
   不过长久以来都是使用brokerIP1的,需要讨论下
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] taizilongxu commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by "taizilongxu (via GitHub)" <gi...@apache.org>.
taizilongxu commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1584276879

   > 
   看楼上的思路, 修改下这个文件
   https://github.com/apache/rocketmq/blob/develop/namesrv/src/main/java/org/apache/rocketmq/namesrv/route/ZoneRouteRPCHook.java
   
   doAfterResponse 方法可以拦截请求, 根据 remoteAddr 反回不同的 broker 地址


-- 
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-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] sydcph commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by GitBox <gi...@apache.org>.
sydcph commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1094269124

   我不是开发,不知道怎么搞,我想到一个办法,brokerIP1使用域名,slave主机和master主机分开,slave主机上使用本地host,解析到hosts里


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] sydcph commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by GitBox <gi...@apache.org>.
sydcph commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1094165490

   那有其他方法解决 消息生产者Producer在外网,如果不设置brokerIP的情况下,Producer从namesrv上获取的是内网IP的问题么?


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] RongtongJin commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1094163501

   这是一个问题。主备之间的日志数据复制用的是brokerIP2,但元数据复制(topics.json,subscriptionGroup.json等 )用的brokerIP1,我认为两者都应该使用brokerIP2,其他人有什么意见吗?
   
   https://github.com/apache/rocketmq/blob/47561bdd855ab381113d736b5c26a09c08da590b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java#L971


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] sydcph commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by GitBox <gi...@apache.org>.
sydcph commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1094164716

   这个可以通过改源码修改么,slave元数据复制也经过公网IP,平白增加了一层,还耗费网络流量,实在是不划算,而且感觉也不太安全。


-- 
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: dev-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1518901176

   This issue was closed because it has been inactive for 3 days since being marked as stale.


-- 
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-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1515534359

   This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.


-- 
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-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] github-actions[bot] closed issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed
URL: https://github.com/apache/rocketmq/issues/4140


-- 
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-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq] sydcph commented on issue #4140: slave :ERROR BrokerControllerScheduledThread1 - SyncDelayOffset Exception, 123.41.156.234:10911 org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 123.41.156.234:10911 failed

Posted by GitBox <gi...@apache.org>.
sydcph commented on issue #4140:
URL: https://github.com/apache/rocketmq/issues/4140#issuecomment-1102514099

   > 可以在 Namesrv 上修改,对 TopicRouteData 进行映射
   
   您好,可以具体举例说明下么?谢谢


-- 
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: dev-unsubscribe@rocketmq.apache.org

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