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 2020/03/26 07:29:27 UTC

[GitHub] [rocketmq] andrezheng-git opened a new issue #1886: DefaultMQPushConsumer start invokSync call timeout

andrezheng-git opened a new issue #1886: DefaultMQPushConsumer start invokSync call timeout
URL: https://github.com/apache/rocketmq/issues/1886
 
 
   When DefaultMQPushConsumer start when inject in a springboot container,it throws a ivokeSync call timeout. If  Thread.sleep ahead of the start(), the exception does not be trowed.  How to solve the problem. 
   ```
               consumer = new DefaultMQPushConsumer(consumerGroupName);
               consumer.setNamesrvAddr(nameServerAddr);
               consumer.setConsumeTimeout(1000000);
               consumer.setConsumeFromWhere(ConsumeFromWhere.CONSUME_FROM_FIRST_OFFSET);
               consumer.subscribe(topicName, "*");
               consumer.registerMessageListener(messageListener);
               //Thread.sleep(3000);
               consumer.start();
   ```
   
   
   
   Caused by: java.lang.IllegalStateException: org.apache.rocketmq.remoting.exception.RemotingTimeoutException: invokeSync call timeout
   	at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:681)
   	at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:511)
   	at org.apache.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl.updateTopicSubscribeInfoWhenSubscriptionChanged(DefaultMQPushConsumerImpl.java:868)
   	at org.apache.rocketmq.client.impl.consumer.DefaultMQPushConsumerImpl.start(DefaultMQPushConsumerImpl.java:649)
   	at org.apache.rocketmq.client.consumer.DefaultMQPushConsumer.start(DefaultMQPushConsumer.java:693)
   	at XXX.MQConsumer.init(MQConsumer.java:58)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1922)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1864)
   	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792)
   	... 16 common frames omitted
   Caused by: org.apache.rocketmq.remoting.exception.RemotingTimeoutException: invokeSync call timeout
   	at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:371)
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1371)
   	at org.apache.rocketmq.client.impl.MQClientAPIImpl.getTopicRouteInfoFromNameServer(MQClientAPIImpl.java:1361)
   	at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:624)
   	... 28 common frames omitted
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] RongtongJin commented on issue #1886: DefaultMQPushConsumer start invokSync call timeout

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #1886: DefaultMQPushConsumer start invokSync call timeout
URL: https://github.com/apache/rocketmq/issues/1886#issuecomment-604940327
 
 
    I will close the Issue first, but please feel free to reopen it if you have any other issues. Issues are generally used for bug reports and feature requests, so it is recommended to discuss questions on the mailing list first, the mailing list address [https://rocketmq.apache.org/about/contact/],

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] RongtongJin commented on issue #1886: DefaultMQPushConsumer start invokSync call timeout

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #1886: DefaultMQPushConsumer start invokSync call timeout
URL: https://github.com/apache/rocketmq/issues/1886#issuecomment-604368166
 
 
   From the exception stack, it seems that the consumer connection to nameserver has timed out. Is nameserver and consumer started at the same time? In addition, it is recommended to use [rocketmq-spring](https://github.com/apache/rocketmq-spring), if you want quickly integrate RocketMQ with Spring Boot.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] RongtongJin closed issue #1886: DefaultMQPushConsumer start invokSync call timeout

Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #1886: DefaultMQPushConsumer start invokSync call timeout
URL: https://github.com/apache/rocketmq/issues/1886
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services