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 2018/08/13 04:11:48 UTC

[GitHub] shudo1219 opened a new issue #406: NullPointerException if broker master is down when tracking message detail

shudo1219 opened a new issue #406: NullPointerException if broker master is down when tracking message detail
URL: https://github.com/apache/rocketmq/issues/406
 
 
   When tracking message detail on our monitor platform, we meet a problem:
   it will throw a NullPointerException if broker master is down.
   We trace  into the code and find the problem:
   tools/admin/DefaultMQAdminExtImpl.java
   line 844  String addr = brokerData.getBrokerAddrs().get(MixAll.MASTER_ID);
   line 845  if (**addr**.equals(RemotingUtil.socketAddress2String(msg.getStoreHost()))) {
                      if (next.getValue().getConsumerOffset() > msg.getQueueOffset()) {
                          return true;
                      }
                  }
   If broker master is down, addr will be null and hence throw the exception mentioned above.
   Broker slave also has the consume offset, we might need to ask salve for offset or return false if only slave is alive. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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