CodingOX opened a new issue #2456:
URL: https://github.com/apache/rocketmq/issues/2456
**BUG REPORT**
I have 4 server。
| name | ip |
| ------------ | ---------------- |
| broker\-a | 192\.168\.0\.151 |
| broker\-a\-s | 192\.168\.0\.152 |
| broker\-b | 192\.168\.0\.153 |
| broker\-b\-s | 192\.168\.0\.154 |
`broker-a` config
```properties
namesrvAddr=192.168.0.151:9876;192.168.0.153:9876
brokerClusterName=MX-Cluster
brokerName=broker-a
brokerId=0
deleteWhen=04
fileReservedTime=48
brokerRole=SYNC_MASTER
flushDiskType=ASYNC_FLUSH
brokerIP1=192.168.0.151
```
`broker-a-s` config
```properties
namesrvAddr=192.168.0.151:9876;192.168.0.153:9876
brokerClusterName=MX-Cluster
brokerName=broker-a
brokerId=1
deleteWhen=04
fileReservedTime=48
brokerRole=SLAVE
flushDiskType=ASYNC_FLUSH
brokerIP1=192.168.0.152
```
`broker-b` config
```properties
namesrvAddr=192.168.0.151:9876;192.168.0.153:9876
brokerClusterName=MX-Cluster
brokerName=broker-b
brokerId=0
deleteWhen=04
fileReservedTime=48
brokerRole=SYNC_MASTER
flushDiskType=ASYNC_FLUSH
brokerIP1=192.168.0.153
```
`broker-b-s` config
```properties
namesrvAddr=192.168.0.151:9876;192.168.0.153:9876
brokerClusterName=MX-Cluster
brokerName=broker-b
brokerId=1
deleteWhen=04
fileReservedTime=48
brokerRole=SLAVE
flushDiskType=ASYNC_FLUSH
brokerIP1=192.168.0.154
```
In `RockeMQ-Console` show message
| Broker | NO\. | Address | Version | Produce
Massage TPS | Consumer Massage TPS | Yesterday Produce Count | Yesterday
Consume Count | Today Produce Count | Today Consume Count | Operation |
| --------- | ----------- | ---------------------- | -------- |
------------------- | -------------------- | ----------------------- |
----------------------- | ------------------- | ------------------- | ---------
|
| broker\-b | 0\(master\) | 192\.168\.0\.153:10911 | V4\_7\_1 | 0\.00
| 0\.00 | 0 | 0
| 0 | 0 | |
| broker\-b | 1\(slave\) | 192\.168\.0\.154:10911 | V4\_7\_1 | 0\.00
| 0\.00 | 0 | 0
| 0 | 0 | |
| broker\-a | 0\(master\) | 192\.168\.0\.151:10911 | V4\_7\_1 | 0\.00
| 0\.00 | 0 | 0
| 200 | 4 | |
| broker\-a | 1\(slave\) | 192\.168\.0\.152:10911 | V4\_7\_1 | 0\.00
| 0\.00 | 0 | 0
| 0 | 0 | |
1. Please tell us about your environment:
Broker server is `centos8`
My computer is `Mac 10.15.7` , ip is `192.168.0.46`,jdk is `1.8.201`
My producer code
```java
public class SyncProducer {
public static void main(String[] args) throws
UnsupportedEncodingException, MQClientException, RemotingException,
InterruptedException, MQBrokerException {
//Instantiate with a producer group name.
DefaultMQProducer producer = new DefaultMQProducer("producer-wdf-3");
// Specify name server addresses.
producer.setNamesrvAddr("192.168.0.151:9876;192.168.0.153:9876;");
//Launch the instance.
producer.start();
for (int i = 0; i < 100; i++) {
//Create a message instance, specifying topic, tag and message
body.
Message msg = new Message("LcfTopic3" /* Topic */,
"TagB" /* Tag */,
("Hello RocketMQ " +
i).getBytes(RemotingHelper.DEFAULT_CHARSET) /*
Message body */
);
//Call send message to deliver message to one of brokers.
SendResult sendResult = producer.send(msg);
System.out.printf("%s%n", sendResult);
}
//Shut down once the producer instance is not longer in use.
producer.shutdown();
}
}
```
And Console show result
```
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242F8C0000,
offsetMsgId=C0A8009700002A9F000000000005AC3A, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=1], queueOffset=75]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FB20001,
offsetMsgId=C0A8009700002A9F000000000005ACFF, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=2], queueOffset=75]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FB40002,
offsetMsgId=C0A8009700002A9F000000000005ADC4, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=3], queueOffset=75]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FB50003,
offsetMsgId=C0A8009700002A9F000000000005AE89, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=0], queueOffset=75]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FB60004,
offsetMsgId=C0A8009700002A9F000000000005AF4E, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=1], queueOffset=76]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FB80005,
offsetMsgId=C0A8009700002A9F000000000005B013, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=2], queueOffset=76]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FBA0006,
offsetMsgId=C0A8009700002A9F000000000005B0D8, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=3], queueOffset=76]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FBB0007,
offsetMsgId=C0A8009700002A9F000000000005B19D, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=0], queueOffset=76]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FBC0008,
offsetMsgId=C0A8009700002A9F000000000005B262, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=1], queueOffset=77]
SendResult [sendStatus=SLAVE_NOT_AVAILABLE,
msgId=0A2581021C3D2C13DA1584242FBE0009,
offsetMsgId=C0A8009700002A9F000000000005B327, messageQueue=MessageQueue
[topic=LcfTopic3, brokerName=broker-a, queueId=2], queueOffset=77]
```
I can ping succeess between any two servers.
All Firewall has closed.
**There are other ways I can solve the problem**,Thanks...
----------------------------------------------------------------
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:
[email protected]