diff --git a/common/src/test/java/org/apache/rocketmq/common/RemotingUtilTest.java b/common/src/test/java/org/apache/rocketmq/common/RemotingUtilTest.java
index 586689637b3c826b90da37c1675fc713eed2eaed..19346e6bca21316ba463734e069b573a361b5b14 100644
--- a/common/src/test/java/org/apache/rocketmq/common/RemotingUtilTest.java
+++ b/common/src/test/java/org/apache/rocketmq/common/RemotingUtilTest.java
@@ -28,4 +28,16 @@ public class RemotingUtilTest {
         assertThat(localAddress).isNotNull();
         assertThat(localAddress.length()).isGreaterThan(0);
     }
+
+    @Test
+    public void testConvert2IpStringWithIp() {
+        String result = RemotingUtil.convert2IpString("127.0.0.1:9876");
+        assertThat(result).isEqualTo("127.0.0.1:9876");
+    }
+
+    @Test
+    public void testConvert2IpStringWithHost() {
+        String result = RemotingUtil.convert2IpString("localhost:9876");
+        assertThat(result).isEqualTo("127.0.0.1:9876");
+    }
 }
diff --git a/remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java b/remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java
index d936c3bf696ab0399a323ea028e9ee12ee46ce5a..3914314f0e2ad4768da0d3e8a9caf5e2de442e9b 100644
--- a/remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java
+++ b/remoting/src/main/java/org/apache/rocketmq/remoting/common/RemotingUtil.java
@@ -165,6 +165,10 @@ public class RemotingUtil {
         return sb.toString();
     }
 
+    public static String convert2IpString(final String addr) {
+        return socketAddress2String(string2SocketAddress(addr));
+    }
+
     private static boolean isBridge(NetworkInterface networkInterface) {
         try {
             if (isLinuxPlatform()) {
diff --git a/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java b/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java
index 55cca540f9b19d602ea6ed62af20cb65f5ba4df4..d0e65ba7f63e1f4beab45fff3731c7d6be0c3b3a 100644
--- a/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java
+++ b/tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java
@@ -888,7 +888,7 @@ public class DefaultMQAdminExtImpl implements MQAdminExt, MQAdminExtInner {
             if (mq.getTopic().equals(msg.getTopic()) && mq.getQueueId() == msg.getQueueId()) {
                 BrokerData brokerData = ci.getBrokerAddrTable().get(mq.getBrokerName());
                 if (brokerData != null) {
-                    String addr = brokerData.getBrokerAddrs().get(MixAll.MASTER_ID);
+                    String addr = RemotingUtil.convert2IpString(brokerData.getBrokerAddrs().get(MixAll.MASTER_ID));
                     if (RemotingUtil.socketAddress2String(msg.getStoreHost()).equals(addr)) {
                         if (next.getValue().getConsumerOffset() > msg.getQueueOffset()) {
                             return true;