This is an automated email from the ASF dual-hosted git repository.
jinrongtong pushed a commit to branch new-official-website
in repository https://gitbox.apache.org/repos/asf/rocketmq-site.git
The following commit(s) were added to refs/heads/new-official-website by this
push:
new 1a2fa19b9 [ISSUE #452] FAQ.md document is exchanged in the Chinese and
English directories (#453)
1a2fa19b9 is described below
commit 1a2fa19b9570505d053a2af2cbc437c9a842dc8f
Author: mxsm <[email protected]>
AuthorDate: Mon Jan 16 10:17:18 2023 +0800
[ISSUE #452] FAQ.md document is exchanged in the Chinese and English
directories (#453)
---
.../version-5.0/06-bestPractice/22FAQ.md | 290 ++++++++++++---------
.../version-5.0/06-bestPractice/22FAQ.md | 281 ++++++++++----------
2 files changed, 302 insertions(+), 269 deletions(-)
diff --git
a/i18n/en/docusaurus-plugin-content-docs/version-5.0/06-bestPractice/22FAQ.md
b/i18n/en/docusaurus-plugin-content-docs/version-5.0/06-bestPractice/22FAQ.md
index 0e88cd16e..b6bdb54e5 100644
---
a/i18n/en/docusaurus-plugin-content-docs/version-5.0/06-bestPractice/22FAQ.md
+++
b/i18n/en/docusaurus-plugin-content-docs/version-5.0/06-bestPractice/22FAQ.md
@@ -1,291 +1,321 @@
-# 常见问题解答
+# FAQs
-以下是关于RocketMQ项目的常见问题
+The following are frequently asked questions about the RocketMQ project
-## 1 基本
+## 1 Basics
-1. **为什么我们要使用 RocketMQ 而不是选择其他的产品?**
+1. **Why should we use RocketMQ instead of another product?**
- 请参考[为什么要选择RocketMQ](http://rocketmq.apache.org/docs/motivation/)
+ Please refer to th[Why
RocketMQ](http://rocketmq.apache.org/docs/motivation/)
-2. **我是否需要安装其他的软件才能使用 RocketMQ ,例如 ZooKeeper ?**
+2. **Do I need to install any other software to use RocketMQ, e.g. ZooKeeper
?**
- 不需要,RocketMQ 能够独立的运行。
+ No, RocketMQ can run independently.
-## 2 使用
+## 2 Use
-1. **新创建的 ConsumerGroup 从哪里开始消费消息?**
+1. **Where does the newly created Consumer ID start consuming messages?**
- 1)5.x SDK,在首次上线时会从服务器中的最新消息开始消费,也就是从队列的尾部开始消费;再次重新启动后,会从最后一次的消费位置继续消费。
+ 1)5.x SDK,When it first comes online, it is consumed from the latest
message in the server, that is, from the end of the queue; After a second
restart, the consumption will continue from the last consumption position.
- 2)3.x/4.x SDK
则比较复杂,如果首次启动是在发送的消息在三天之内,那么消费者会从服务器中保存的第一条消息开始消费;如果发送的消息已经超过三天,则消费者会从服务器中的最新消息开始消费,也就是从队列的尾部开始消费。再次重新启动后,会从最后一次的消费位置继续消费。
+ 2)3.x/4.x SDK more complicated,If the first boot is sent within three days
of the message, then the consumer will start consuming from the first message
saved in the server; If the message sent is more than three days old, the
consumer starts consuming the latest message in the server, which is at the end
of the queue. After a second restart, the consumption will continue from the
last consumption position.
-3. **当消费失败的时候如何重新消费消息?**
+2**How do you re-consume messages when consumption fails?**
- 1)在集群模式下,消费的业务逻辑代码会返回消费失败状态,或者抛出异常,如果一条消息消费失败,则会按照设置的最大重试次数重试,之后该消息会被丢弃。
+ 1)In cluster mode, the consuming business logic code returns a consumption
failure status or throws an exception, and if a message fails to be consumed,
it is retried for the set maximum number of retries, after which the message is
discarded.
- 2)在广播消费模式下,广播消费仍然保证消息至少被消费一次,但不提供重发的选项。
+ 2)In broadcast consumption mode, broadcast consumption still guarantees
that the message will be consumed at least once, but does not provide the
option to resend it.
-4. **当消费失败的时候如何找到失败的消息?**
+3**How to find the failure message when consume fails?**
- 1)使用按时间的主题查询,可以查询到一段时间内的消息。
+ 1)Using subject queries by time, you can query messages over a period of
time。
- 2)使用主题和消息 ID 来准确查询消息。
+ 2)Use the subject and message ID to accurately query the message.
- 3)使用主题和消息的 Key 来准确查询所有消息 Key 相同的消息。
+ 3)Use the subject and message key to query exactly for messages with the
same key across all messages.
-5. **消息只会被传递一次吗?**
+4**Will the message be delivered only once?**
- RocketMQ 确保所有消息至少传递一次。 在大多数情况下,消息不会重复。
+ RocketMQ ensures that all messages are delivered at least once. In most
cases, the message will not be repeated.
-6. **如何增加一个新的 Broker ?**
+5**How do I add a new Broker?**
- 1)启动一个新的 Broker 并将其注册到NameServer 中的 Broker 列表里。
+ 1)Start a new Broker and register it with the list of brokers in NameServer.
- 2)默认只自动创建内部系统 Topic 和 Consumer Group。 如果您希望在新节点上拥有您的业务主题和消费者组,请从现有的 Broker
中复制它们。 我们提供了管理工具和命令行来处理此问题。
+ 2)By default, only internal system Topic and Consumer Group are
automatically created. If you want to have your business topics and consumer
groups on the new node, copy them from an existing Broker. We provide
administrative tools and the command line to handle this.
-## 3 配置相关
+## 3 Configuration
-以下回答均为默认值,可通过配置修改。
+The following answers are the default values and can be modified through
configuration.
-1. **消息在服务器上可以保存多长时间?**
+1. **How long messages can be kept on the server?**
- 存储的消息将最多保存 3 天,超过 3 天未使用的消息将被删除。
+ Stored messages will be kept for a maximum of 3 days, and unused messages
will be deleted after that.
-2. **消息体的大小限制是多少?**
+2. **What is the size limit for the message body?**
- 通常是256KB
+ It is usually 256 KB
-3. **怎么设置消费者线程数?**
+3. **How to set the number of consumer threads?**
- 当你启动消费者的时候,可以设置属性。不同版本的参数名不一样。
+ When you launch the consumer, you can set the properties. The parameter
name varies with the version.
-## 4 错误
+## 4 Error
1. **APPLY_TOPIC_URL**
- - **异常信息**
+ - **Error message**
```java
topic[xxx] not exist, apply first please!
```
- - **原因**
+ - **Cause**
- 1)Producer 发送消息或 Consumer 消费消息时,根据 Topic 获取路由信息失败,会出现这个异常。
+ 1)This exception occurs when the Producer fails to obtain routing
information according to the Topic when sending or consuming messages.
- - **解决方案**
+ - **Solution**
- 1)确保 NameServer 确实包含 Topic 的路由信息。 您可以使用管理工具或 Web 控制台通过 TopicRoute 从
NameServer 查询路由信息;
+ 1)Make sure that NameServer does contain routing information for the
Topic. You can use the management tool or the Web console to query routing
information from NameServer through TopicRoute;
- 2)确保 Broker 和 Consumer 连接的是同一 NameServer 集群;
+ 2)Ensure that the Broker and Consumer are connected to the same
NameServer cluster;
- 3)确保主题的队列权限,对 Producer 是6(rw-),或对 Consumer 至少是2(-w-);
+ 3)Ensure that the queue permissions of the topic are 6(rw-) for the
Producer, or at least 2(-w-) for the Consumer;
- 如果找不到此主题,请通过管理工具命令 updateTopic 或 Web 控制台在 Broker 上创建它。
+ If this topic cannot be found, create it on the Broker with the
administrative tool command updateTopic or the Web console.
2. **NAME_SERVER_ADDR_NOT_EXIST_URL**
- - **异常信息**
+ - **Error message**
```java
No name server address, please set it
```
- 或
+
+ or
+
```java
connect to xxx failed, maybe the domain name xxx not bind in /etc/hosts
```
- - **原因**
+ - **Cause**
- 1)Producer 或 Consumer,获取 NameServer 地址信息异常。
+ 1)The Producer or Consumer fails to obtain NameServer address information.
- - **解决方案**
+ - **Solution**
- 1)请参考:[5.1
客户端寻址方式](https://github.com/apache/rocketmq/blob/develop/docs/cn/best_practice.md
)
+ 1)Please refer to:[5.1 Client addressing
mode](https://github.com/apache/rocketmq/blob/develop/docs/cn/best_practice.md )
3. **GROUP_NAME_DUPLICATE_URL**
- - **异常信息**
+ - **Error message**
```java
The producer group[xxx] has been created before, specify another name
please.
```
- - **原因**
+ - **Cause**
- 1)相同名称的 Consumer Group 已经启动,注册失败。
+ 1)The Consumer Group with the same name has been started, but the
registration fails.
- - **解决方案**
+ - **Solution**
- 1)新 Consumer Group 重命名;
+ 1)New Consumer Group renamed;
- 2)相同名称的 Consumer Group 正常关闭后,再启动;
+ 2)After a Consumer Group with the same name is closed, it can be started
again.
4. **CLIENT_PARAMETER_CHECK_URL**
- - **异常信息**
+ - **Error message**
```java
consumerGroup can not equal ...
```
- 或
+
+ or
+
```java
allocateMessageQueueStrategy is null ...
```
- 或
+
+ or
+
```java
Long polling mode, the consumer consumerTimeoutMillisWhenSuspend must
greater than brokerSuspendMaxTimeMillis ...
```
- 除此之外,还有其他异常,不再一一列举。
+ In addition, there are other exceptions, will not list them all.
- - **原因**
+ - **Cause**
- 1)Consumer 参数校验失败。
+ 1)The Consumer parameter verification fails.
- - **解决方案**
+ - **Solution**
- 1)请参考: [5.2
客户端配置](https://github.com/apache/rocketmq/blob/develop/docs/cn/best_practice.md
)
+ 1)Please refer to [5.2 Client
Configuration](https://github.com/apache/rocketmq/blob/develop/docs/cn/best_practice.md
)
5. **SUBSCRIPTION_GROUP_NOT_EXIST**
- - **异常信息**
+ - **Error message**
```java
subscription group not exist
```
- - **原因**
+ - **Cause**
- 1)Consumer Group 或 DleayQueue 获取订阅信息异常。
+ 1)The Consumer Group or DelayQueue can't obtain subscription information.
- - **解决方案**
+ - **Solution**
- 1)确保 Consumer 订阅 Topic 信息与 NameServer 中存在的 Topic 信息一致;
+ 1)Ensure that the Consumer subscription Topic information is consistent
with the existing Topic information in NameServer.
- 2)确保 Broker 和 Consumer 连接的是同一 NameServer 集群;
+ 2)Ensure that the Broker and Consumer are connected to the same
NameServer cluster;
- 3)确保 Topic 的队列权限,对 Producer 是 6(rw-),或对 Consumer 至少是 2(-w-);
+ 3)Ensure that the queue permissions of the Topic are 6(rw-) for the
Producer, or at least 2(-w-) for the Consumer;
6. **CLIENT_SERVICE_NOT_OK**
- - **异常信息**
+ - **Error message**
```java
The xxx service state not OK, maybe started once
```
- - **原因**
+ - **Cause**
- 1)使用同一个 Producer/Consumer Group 在同一个JVM中启动多个 Producer/Consumer
实例可能会导致客户端无法启动。
+ 1)Starting multiple Producer/Consumer instances in the same JVM using the
same Producer/Consumer Group may cause the client to fail to start.
- - **解决方案**
+ - **Solution**
- 1)确保一个 Producer/Consumer Group 对应的 JVM 只启动一个 Producer/Consumer 实例。
+ 1)Ensure that the JVM corresponding to a Producer/Consumer Group starts
only one Producer/Consumer instance.
7. **NO_TOPIC_ROUTE_INFO**
- - **异常信息**
+ - **Error message**
```java
No route info of this topic:
```
- - **原因**
+ - **Cause**
- 1)将消息发送到一个路由信息对生产者不可用的主题时,就会发生这种情况。
+ 1)This occurs when a message is sent to a topic whose routing information
is not available to the producer.
- - **解决方案**
+ - **Solution**
- 1)确保生产者可以连接到名称服务器并且能够从中获取路由元信息;
+ 1)Ensure that producers can connect to NameServer and get routing
meta-information from it;
- 2)确保名称服务器确实包含主题的路由元信息。 您可以使用管理工具或 Web 控制台通过 TopicRoute 从名称服务器查询路由元信息;
+ 2)Make sure that NameServer does contain the routing meta-information for
the topic. You can use the TopicRoute management tool or the Web console to
query routing meta information from NameServer.
- 3)确保您的 Broker 将心跳发送到您的生产者正在连接的同一 NameServer 列表;
+ 3)Make sure that your Broker sends heartbeats to the same NameServer list
that your producers are connecting to;
- 4)确保主题的权限为6(rw-),或至少为2(-w-);
+ 4)Ensure that the subject has permissions of 6(rw-), or at least 2(-w-);
- 如果找不到此主题,请通过管理工具命令updateTopic或Web控制台在Broker上创建它。
+ If this topic cannot be found, create it on the Broker with the
administrative tool command updateTopic or the Web console.
8. **LOAD_JSON_EXCEPTION**
- - **异常信息**
+ - **Error message**
```java
readLocalOffset Exception
```
- - **原因**
+ - **Cause**
- 1)消费者在广播模式下,加载本地 offsets.json 文件异常;
+ 1)The consumer failed to load the local offset.json file in broadcast
mode.
- 2)损坏的 fastjson 文件也会导致同样的问题;
+ 2)Corrupted fastjson files can cause the same problem;
- - **解决方案**
+ - **Solution**
- 1)检查 fastjson 版本和 RocketMQ 使用版本是否一致;
+ 1)Check that the fastjson version is the same as the RocketMQ version.
- 2)升级 fastjson 版本;
+ 2)Update fastjson version;
9. **SAME_GROUP_DIFFERENT_TOPIC**
- - **异常信息**
+ - **Error message**
```java
the consumer's group info/subscription not exist
```
- - **原因**
- 1)Consumer 订阅 Topic 信息不存在.
- - **解决方案**
- 1)检查 Consumer 所在的 Consumer Group 是否存在;
- 2)检查 Consumer 订阅 Topic 是否存在;
+
+ - **Cause**
+
+ 1)Consumer subscription Topic information does not exist.
+
+ - **Solution**
+
+ 1)Check whether the Consumer Group to which the Consumer belongs exists.
+ 2)Check whether the Consumer subscription Topic exists;
+
10. **MQLIST_NOT_EXIST**
- - **异常信息**
+
+ - **Error message**
+
```java
Can not find Message Queue for this topic
```
- - **原因**
- 1)对于Producer,根据 Topic 未能获取对应的 Queue 信息。
- - **解决方案**
- 1)确保 Topic 已经正确配置 Queue 信息;
- 2)确保 Topic 对应的 Queue 至少有2(-w-)权限;
+
+ - **Cause**
+
+ 1)For the Producer, the corresponding Queue information cannot be
obtained according to the Topic.
+
+ - **Solution**
+
+ 1)Ensure that Queue information is correctly configured for the Topic.
+ 2)Ensure that the Queue corresponding to the Topic has at least 2(-w-)
permissions;
+
11. **SEND_MSG_FAILED**
- - **异常信息**
+
+ - **Error message**
+
```java
Send [xxx] times, still failed, cost [xxx]ms, Topic: xxx, BrokersSent ...
```
- - **原因**
- 1)Producer 消息发送异常。同步(SYNC)方式共发送3次,异步(ASYNC)和单向( ONEWAY)发送1次。
- - **解决方案**
- 1)Producer 发送消息,超时参数是否过小;
- 2)确保 Broker 正常;
- 3)确保 Producer 和 Broker 连接是否正常
+
+ - **Cause**
+
+ 1)The Producer message is incorrectly sent. A total of three times are
sent in SYNC mode and one time is sent in ASYNC and ONEWAY mode.
+
+ - **Solution**
+
+ 1)The Producer sends messages and whether the timeout parameter is too
small.
+ 2)Ensure that the Broker is working properly;
+ 3)Ensure that the Producer and Broker are properly connected
+
12. **UNKNOWN_HOST_EXCEPTION**
- - **异常信息**
+
+ - **Error message**
+
```java
InetAddress java.net.InetAddress.getLocalHost() throws
UnknownHostException
```
- - **原因**
-
- 1)主机可能有很多网络接口,并且一个接口可能绑定到多个IP地址。
-
- - **解决方案**
-
- 1)确保 host 对应的 IP 能够正常访问,使用 Ping 等网络命令检查网络情况;
-
+
+ - **Cause**
+
+ 1)A host may have many network interfaces, and an interface may be bound
to multiple IP addresses.
+
+ - **Solution**
+
+ 1)Ensure that the IP address corresponding to host can be accessed
properly. Run the Ping command to check the network status.
+
-## 5 其他
-1. Broker崩溃以后有什么影响?
-
- 1)Master节点崩溃
-
- 消息不能再发送到该 Broker 集群,但是如果您有另一个可用的 Broker 集群,那么在主题存在的条件下仍然可以发送消息。消息仍然可以从
Slave 节点消费。
-
- 2)一些Slave节点崩溃
-
- 只要有另一个工作的 Slave,就不会影响发送消息。 对消费消息也不会产生影响,除非消费者组设置为优先从该Slave消费。 默认情况下,消费者组从
Master 消费。
-
- 3)所有 Slave 节点崩溃
-
- 向 Master 发送消息不会有任何影响,但是,如果 Master是 SYNC_MASTER,Producer会得到一个
SLAVE_NOT_AVAILABLE ,表示消息没有发送给任何 Slave。 对消费消息也没有影响,除非消费者组设置为优先从 Slave 消费。
默认情况下,消费者组从 Master 消费。
\ No newline at end of file
+
+## 5 Others
+
+1. What are the effects of Broker crashes?
+
+ 1)The Master node crashes
+
+ Messages can no longer be sent to this cluster of brokers, but if you have
another cluster of brokers available, messages can still be sent in the
presence of a topic. Messages can still be consumed from the Slave node.
+
+ 2)Some Slave nodes crashed
+
+ As long as there is another working Slave, sending messages is not
affected. Consumption messages are also not affected unless the consumer group
is set to consume from this Slave preferentially. By default, the consumer
group consumes from the Master.
+
+ 3)All Slave nodes crash
+
+ Sending messages to the Master has no effect; however, if the Master is
SYNC_MASTER, the Producer gets a SLAVE_NOT_AVAILABLE, indicating that the
message is not being sent to any slaves. Consumption messages are also
unaffected unless the consumer group is set to consume from the Slave
preferentially. By default, the consumer group consumes from the Master.
\ No newline at end of file
diff --git a/versioned_docs/version-5.0/06-bestPractice/22FAQ.md
b/versioned_docs/version-5.0/06-bestPractice/22FAQ.md
index d2027b00c..8ae6303f9 100644
--- a/versioned_docs/version-5.0/06-bestPractice/22FAQ.md
+++ b/versioned_docs/version-5.0/06-bestPractice/22FAQ.md
@@ -1,312 +1,315 @@
-# FAQs
+# 常见问题解答
-The following are frequently asked questions about the RocketMQ project
+以下是关于RocketMQ项目的常见问题
-## 1 Basics
+## 1 基本
-1. **Why should we use RocketMQ instead of another product?**
+1. **为什么我们要使用 RocketMQ 而不是选择其他的产品?**
- Please refer to th[Why
RocketMQ](http://rocketmq.apache.org/docs/motivation/)
+ 请参考[为什么要选择RocketMQ](http://rocketmq.apache.org/docs/motivation/)
-2. **Do I need to install any other software to use RocketMQ, e.g. ZooKeeper
?**
+2. **我是否需要安装其他的软件才能使用 RocketMQ ,例如 ZooKeeper ?**
- No, RocketMQ can run independently.
+ 不需要,RocketMQ 能够独立的运行。
-## 2 Use
+## 2 使用
-1. **Where does the newly created Consumer ID start consuming messages?**
+1. **新创建的 ConsumerGroup 从哪里开始消费消息?**
- 1)5.x SDK,When it first comes online, it is consumed from the latest
message in the server, that is, from the end of the queue; After a second
restart, the consumption will continue from the last consumption position.
+ 1)5.x SDK,在首次上线时会从服务器中的最新消息开始消费,也就是从队列的尾部开始消费;再次重新启动后,会从最后一次的消费位置继续消费。
- 2)3.x/4.x SDK more complicated,If the first boot is sent within three days
of the message, then the consumer will start consuming from the first message
saved in the server; If the message sent is more than three days old, the
consumer starts consuming the latest message in the server, which is at the end
of the queue. After a second restart, the consumption will continue from the
last consumption position.
+ 2)3.x/4.x SDK
则比较复杂,如果首次启动是在发送的消息在三天之内,那么消费者会从服务器中保存的第一条消息开始消费;如果发送的消息已经超过三天,则消费者会从服务器中的最新消息开始消费,也就是从队列的尾部开始消费。再次重新启动后,会从最后一次的消费位置继续消费。
-2**How do you re-consume messages when consumption fails?**
+2. **当消费失败的时候如何重新消费消息?**
- 1)In cluster mode, the consuming business logic code returns a consumption
failure status or throws an exception, and if a message fails to be consumed,
it is retried for the set maximum number of retries, after which the message is
discarded.
+ 1)在集群模式下,消费的业务逻辑代码会返回消费失败状态,或者抛出异常,如果一条消息消费失败,则会按照设置的最大重试次数重试,之后该消息会被丢弃。
- 2)In broadcast consumption mode, broadcast consumption still guarantees
that the message will be consumed at least once, but does not provide the
option to resend it.
+ 2)在广播消费模式下,广播消费仍然保证消息至少被消费一次,但不提供重发的选项。
-3**How to find the failure message when consume fails?**
+3. **当消费失败的时候如何找到失败的消息?**
- 1)Using subject queries by time, you can query messages over a period of
time。
+ 1)使用按时间的主题查询,可以查询到一段时间内的消息。
- 2)Use the subject and message ID to accurately query the message.
+ 2)使用主题和消息 ID 来准确查询消息。
- 3)Use the subject and message key to query exactly for messages with the
same key across all messages.
+ 3)使用主题和消息的 Key 来准确查询所有消息 Key 相同的消息。
-4**Will the message be delivered only once?**
+4. **消息只会被传递一次吗?**
- RocketMQ ensures that all messages are delivered at least once. In most
cases, the message will not be repeated.
+ RocketMQ 确保所有消息至少传递一次。 在大多数情况下,消息不会重复。
-5**How do I add a new Broker?**
+5. **如何增加一个新的 Broker ?**
- 1)Start a new Broker and register it with the list of brokers in NameServer.
+ 1)启动一个新的 Broker 并将其注册到NameServer 中的 Broker 列表里。
- 2)By default, only internal system Topic and Consumer Group are
automatically created. If you want to have your business topics and consumer
groups on the new node, copy them from an existing Broker. We provide
administrative tools and the command line to handle this.
+ 2)默认只自动创建内部系统 Topic 和 Consumer Group。 如果您希望在新节点上拥有您的业务主题和消费者组,请从现有的 Broker
中复制它们。 我们提供了管理工具和命令行来处理此问题。
-## 3 Configuration
+## 3 配置相关
-The following answers are the default values and can be modified through
configuration.
+以下回答均为默认值,可通过配置修改。
-1. **How long messages can be kept on the server?**
+1. **消息在服务器上可以保存多长时间?**
- Stored messages will be kept for a maximum of 3 days, and unused messages
will be deleted after that.
+ 存储的消息将最多保存 3 天,超过 3 天未使用的消息将被删除。
-2. **What is the size limit for the message body?**
+2. **消息体的大小限制是多少?**
- It is usually 256 KB
+ 通常是256KB
-3. **How to set the number of consumer threads?**
+3. **怎么设置消费者线程数?**
- When you launch the consumer, you can set the properties. The parameter
name varies with the version.
+ 当你启动消费者的时候,可以设置属性。不同版本的参数名不一样。
-## 4 Error
+## 4 错误
1. **APPLY_TOPIC_URL**
- - **Error message**
+ - **异常信息**
```java
topic[xxx] not exist, apply first please!
```
- - **Cause**
+ - **原因**
- 1)This exception occurs when the Producer fails to obtain routing
information according to the Topic when sending or consuming messages.
+ 1)Producer 发送消息或 Consumer 消费消息时,根据 Topic 获取路由信息失败,会出现这个异常。
- - **Solution**
+ - **解决方案**
- 1)Make sure that NameServer does contain routing information for the
Topic. You can use the management tool or the Web console to query routing
information from NameServer through TopicRoute;
+ 1)确保 NameServer 确实包含 Topic 的路由信息。 您可以使用管理工具或 Web 控制台通过 TopicRoute 从
NameServer 查询路由信息;
- 2)Ensure that the Broker and Consumer are connected to the same
NameServer cluster;
+ 2)确保 Broker 和 Consumer 连接的是同一 NameServer 集群;
- 3)Ensure that the queue permissions of the topic are 6(rw-) for the
Producer, or at least 2(-w-) for the Consumer;
+ 3)确保主题的队列权限,对 Producer 是6(rw-),或对 Consumer 至少是2(-w-);
- If this topic cannot be found, create it on the Broker with the
administrative tool command updateTopic or the Web console.
+ 如果找不到此主题,请通过管理工具命令 updateTopic 或 Web 控制台在 Broker 上创建它。
2. **NAME_SERVER_ADDR_NOT_EXIST_URL**
- - **Error message**
+ - **异常信息**
```java
No name server address, please set it
```
- or
+
+ 或
+
```java
connect to xxx failed, maybe the domain name xxx not bind in /etc/hosts
```
- - **Cause**
+ - **原因**
- 1)The Producer or Consumer fails to obtain NameServer address information.
+ 1)Producer 或 Consumer,获取 NameServer 地址信息异常。
- - **Solution**
+ - **解决方案**
- 1)Please refer to:[5.1 Client addressing
mode](https://github.com/apache/rocketmq/blob/develop/docs/cn/best_practice.md )
+ 1)请参考:[5.1
客户端寻址方式](https://github.com/apache/rocketmq/blob/develop/docs/cn/best_practice.md
)
3. **GROUP_NAME_DUPLICATE_URL**
- - **Error message**
+ - **异常信息**
```java
The producer group[xxx] has been created before, specify another name
please.
```
- - **Cause**
+ - **原因**
- 1)The Consumer Group with the same name has been started, but the
registration fails.
+ 1)相同名称的 Consumer Group 已经启动,注册失败。
- - **Solution**
+ - **解决方案**
- 1)New Consumer Group renamed;
+ 1)新 Consumer Group 重命名;
- 2)After a Consumer Group with the same name is closed, it can be started
again.
+ 2)相同名称的 Consumer Group 正常关闭后,再启动;
4. **CLIENT_PARAMETER_CHECK_URL**
- - **Error message**
+ - **异常信息**
```java
consumerGroup can not equal ...
```
- or
+
+ 或
+
```java
allocateMessageQueueStrategy is null ...
```
- or
+
+ 或
+
```java
Long polling mode, the consumer consumerTimeoutMillisWhenSuspend must
greater than brokerSuspendMaxTimeMillis ...
```
- In addition, there are other exceptions, will not list them all.
+ 除此之外,还有其他异常,不再一一列举。
- - **Cause**
+ - **原因**
- 1)The Consumer parameter verification fails.
+ 1)Consumer 参数校验失败。
- - **Solution**
+ - **解决方案**
- 1)Please refer to [5.2 Client
Configuration](https://github.com/apache/rocketmq/blob/develop/docs/cn/best_practice.md
)
+ 1)请参考: [5.2
客户端配置](https://github.com/apache/rocketmq/blob/develop/docs/cn/best_practice.md
)
5. **SUBSCRIPTION_GROUP_NOT_EXIST**
- - **Error message**
+ - **异常信息**
```java
subscription group not exist
```
- - **Cause**
+ - **原因**
- 1)The Consumer Group or DelayQueue can't obtain subscription information.
+ 1)Consumer Group 或 DleayQueue 获取订阅信息异常。
- - **Solution**
+ - **解决方案**
- 1)Ensure that the Consumer subscription Topic information is consistent
with the existing Topic information in NameServer.
+ 1)确保 Consumer 订阅 Topic 信息与 NameServer 中存在的 Topic 信息一致;
- 2)Ensure that the Broker and Consumer are connected to the same
NameServer cluster;
+ 2)确保 Broker 和 Consumer 连接的是同一 NameServer 集群;
- 3)Ensure that the queue permissions of the Topic are 6(rw-) for the
Producer, or at least 2(-w-) for the Consumer;
+ 3)确保 Topic 的队列权限,对 Producer 是 6(rw-),或对 Consumer 至少是 2(-w-);
6. **CLIENT_SERVICE_NOT_OK**
- - **Error message**
+ - **异常信息**
```java
The xxx service state not OK, maybe started once
```
- - **Cause**
+ - **原因**
- 1)Starting multiple Producer/Consumer instances in the same JVM using the
same Producer/Consumer Group may cause the client to fail to start.
+ 1)使用同一个 Producer/Consumer Group 在同一个JVM中启动多个 Producer/Consumer
实例可能会导致客户端无法启动。
- - **Solution**
+ - **解决方案**
- 1)Ensure that the JVM corresponding to a Producer/Consumer Group starts
only one Producer/Consumer instance.
+ 1)确保一个 Producer/Consumer Group 对应的 JVM 只启动一个 Producer/Consumer 实例。
7. **NO_TOPIC_ROUTE_INFO**
- - **Error message**
+ - **异常信息**
```java
No route info of this topic:
```
- - **Cause**
+ - **原因**
- 1)This occurs when a message is sent to a topic whose routing information
is not available to the producer.
+ 1)将消息发送到一个路由信息对生产者不可用的主题时,就会发生这种情况。
- - **Solution**
+ - **解决方案**
- 1)Ensure that producers can connect to NameServer and get routing
meta-information from it;
+ 1)确保生产者可以连接到名称服务器并且能够从中获取路由元信息;
- 2)Make sure that NameServer does contain the routing meta-information for
the topic. You can use the TopicRoute management tool or the Web console to
query routing meta information from NameServer.
+ 2)确保名称服务器确实包含主题的路由元信息。 您可以使用管理工具或 Web 控制台通过 TopicRoute 从名称服务器查询路由元信息;
- 3)Make sure that your Broker sends heartbeats to the same NameServer list
that your producers are connecting to;
+ 3)确保您的 Broker 将心跳发送到您的生产者正在连接的同一 NameServer 列表;
- 4)Ensure that the subject has permissions of 6(rw-), or at least 2(-w-);
+ 4)确保主题的权限为6(rw-),或至少为2(-w-);
- If this topic cannot be found, create it on the Broker with the
administrative tool command updateTopic or the Web console.
+ 如果找不到此主题,请通过管理工具命令updateTopic或Web控制台在Broker上创建它。
8. **LOAD_JSON_EXCEPTION**
- - **Error message**
+ - **异常信息**
```java
readLocalOffset Exception
```
- - **Cause**
+ - **原因**
- 1)The consumer failed to load the local offset.json file in broadcast
mode.
+ 1)消费者在广播模式下,加载本地 offsets.json 文件异常;
- 2)Corrupted fastjson files can cause the same problem;
+ 2)损坏的 fastjson 文件也会导致同样的问题;
- - **Solution**
+ - **解决方案**
- 1)Check that the fastjson version is the same as the RocketMQ version.
+ 1)检查 fastjson 版本和 RocketMQ 使用版本是否一致;
- 2)Update fastjson version;
+ 2)升级 fastjson 版本;
9. **SAME_GROUP_DIFFERENT_TOPIC**
- - **Error message**
+ - **异常信息**
```java
the consumer's group info/subscription not exist
```
- - **Cause**
-
- 1)Consumer subscription Topic information does not exist.
-
- - **Solution**
-
- 1)Check whether the Consumer Group to which the Consumer belongs exists.
- 2)Check whether the Consumer subscription Topic exists;
-
+
+ - **原因**
+ 1)Consumer 订阅 Topic 信息不存在.
+
+ - **解决方案**
+ 1)检查 Consumer 所在的 Consumer Group 是否存在;
+ 2)检查 Consumer 订阅 Topic 是否存在;
+
10. **MQLIST_NOT_EXIST**
- - **Error message**
-
+ - **异常信息**
+
```java
Can not find Message Queue for this topic
```
-
- - **Cause**
- 1)For the Producer, the corresponding Queue information cannot be
obtained according to the Topic.
-
- - **Solution**
+ - **原因**
+ 1)对于Producer,根据 Topic 未能获取对应的 Queue 信息。
+
+ - **解决方案**
+ 1)确保 Topic 已经正确配置 Queue 信息;
+ 2)确保 Topic 对应的 Queue 至少有2(-w-)权限;
- 1)Ensure that Queue information is correctly configured for the Topic.
- 2)Ensure that the Queue corresponding to the Topic has at least 2(-w-)
permissions;
-
11. **SEND_MSG_FAILED**
- - **Error message**
-
+ - **异常信息**
+
```java
Send [xxx] times, still failed, cost [xxx]ms, Topic: xxx, BrokersSent ...
```
-
- - **Cause**
-
- 1)The Producer message is incorrectly sent. A total of three times are
sent in SYNC mode and one time is sent in ASYNC and ONEWAY mode.
-
- - **Solution**
-
- 1)The Producer sends messages and whether the timeout parameter is too
small.
- 2)Ensure that the Broker is working properly;
- 3)Ensure that the Producer and Broker are properly connected
-
+
+ - **原因**
+ 1)Producer 消息发送异常。同步(SYNC)方式共发送3次,异步(ASYNC)和单向( ONEWAY)发送1次。
+
+ - **解决方案**
+ 1)Producer 发送消息,超时参数是否过小;
+ 2)确保 Broker 正常;
+ 3)确保 Producer 和 Broker 连接是否正常
+
12. **UNKNOWN_HOST_EXCEPTION**
- - **Error message**
-
+ - **异常信息**
+
```java
InetAddress java.net.InetAddress.getLocalHost() throws
UnknownHostException
```
- - **Cause**
-
- 1)A host may have many network interfaces, and an interface may be bound
to multiple IP addresses.
-
- - **Solution**
-
- 1)Ensure that the IP address corresponding to host can be accessed
properly. Run the Ping command to check the network status.
-
+
+ - **原因**
+
+ 1)主机可能有很多网络接口,并且一个接口可能绑定到多个IP地址。
+
+ - **解决方案**
+
+ 1)确保 host 对应的 IP 能够正常访问,使用 Ping 等网络命令检查网络情况;
+
-## 5 Others
-1. What are the effects of Broker crashes?
+## 5 其他
+
+1. Broker崩溃以后有什么影响?
- 1)The Master node crashes
+ 1)Master节点崩溃
- Messages can no longer be sent to this cluster of brokers, but if you have
another cluster of brokers available, messages can still be sent in the
presence of a topic. Messages can still be consumed from the Slave node.
+ 消息不能再发送到该 Broker 集群,但是如果您有另一个可用的 Broker 集群,那么在主题存在的条件下仍然可以发送消息。消息仍然可以从
Slave 节点消费。
- 2)Some Slave nodes crashed
+ 2)一些Slave节点崩溃
- As long as there is another working Slave, sending messages is not
affected. Consumption messages are also not affected unless the consumer group
is set to consume from this Slave preferentially. By default, the consumer
group consumes from the Master.
+ 只要有另一个工作的 Slave,就不会影响发送消息。 对消费消息也不会产生影响,除非消费者组设置为优先从该Slave消费。 默认情况下,消费者组从
Master 消费。
- 3)All Slave nodes crash
+ 3)所有 Slave 节点崩溃
- Sending messages to the Master has no effect; however, if the Master is
SYNC_MASTER, the Producer gets a SLAVE_NOT_AVAILABLE, indicating that the
message is not being sent to any slaves. Consumption messages are also
unaffected unless the consumer group is set to consume from the Slave
preferentially. By default, the consumer group consumes from the Master.
\ No newline at end of file
+ 向 Master 发送消息不会有任何影响,但是,如果 Master是 SYNC_MASTER,Producer会得到一个
SLAVE_NOT_AVAILABLE ,表示消息没有发送给任何 Slave。 对消费消息也没有影响,除非消费者组设置为优先从 Slave 消费。
默认情况下,消费者组从 Master 消费。
\ No newline at end of file