RocketMQ常见的错误
1、Please set the JAVA_HOME variable in your environment, We need java(x64)
解决:
本地需要配置 JAVA_HOME 使⽤命令 vim ~/.bash_profile
JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home"
export JAVA_HOME
CLASS_PATH="$JAVA_HOME/lib"
PATH=".$PATH:$JAVA_HOME/bin"
2、maven编译失败报错
[ERROR] Failed to execute goal on project rocketmq-console-ng:
Could not resolve dependencies for project org.apache:rocketmq-console-ng:jar:1.0.0:
The following artifacts could not be resolved: ketmq:rocketmq-tools:jar:4.4.0-SNAPSHOT, ketmq:rocketmq-namesrv:jar:4.4.0 -SNAPSHOT,
ketmq:rocketmq-broker:jar:4.4.0-SNAPSHOT:
Could not find artifact ketmq:rocketmq-tools:jar:4.4.0-SNAPSHOT ->[Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
解决:
<rocketmq.version>4.4.0-SNAPSHOT</rocketmq.version>改为:<rocketmq.version>4.4.0</rocketmq.version>
3、⽆法连接获取broker信息
解决:
修改配置⽂件,名称路由地址为 namesrvAddr,例如我本机地址为
src/main/resources/application.properties
4、连接不成功
解决:
在阿⾥云,腾讯云或者虚拟机,记得检查端⼝号和防⽕墙是否启动
阿⾥云控制台有安全组,需要开放对应的端⼝
5、maybe your broker machine memory too small
解决:
磁盘空间不够
6、NameServer内存或者Broker内存不够怎么处理
[root@iZwz94sw188z3yfl7lpmmsZ apache-rocketmq]# sh bin/mqnamesrv
Java HotSpot(TM)64-Bit Server VM warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release
Java HotSpot(TM)64-Bit Server VM warning: UseCMSCompactAtFullCollection is deprecated and will likely be removed in a future release.
Java HotSpot(TM)64-Bit Server VM warning: INFO: os::commit_memory(0x00000006ec800000,2147483648,0) failed; error='Cannot allocate memory'(e rrno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 2147483648 bytes for committing reserved memory.
variable怎么记# An error report file with more information is saved as:
# /usr/local/software/rocketmq-all-4.4.0/distribution/target/apache-rocketmq/hs_err_pid8993.log
解决:
到 runserver.sh 修改 JAVA_OPT
JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m"
到 runbroker.sh 修改 JAVA_OPT
JAVA_OPT="${JAVA_OPT} -server -Xms528m -Xmx528m -Xmn256m"
7、ption.RemotingTooMuchRequestException: sendDefaultImpl call timeout
解决:
原因:阿⾥云存在多⽹卡,rocketmq都会根据当前⽹卡选择⼀个IP使⽤,
当你的机器有多块⽹卡时,很有可能会有问题。
⽐如,我遇到的问题是我机器上有两个IP,⼀个公⽹IP,⼀个私⽹IP,
因此需要配置f 指定当前的公⽹ip,然后重新启动broker
新增配置:f (属性名称brokerIP1=broker所在的公⽹ip地址)
新增这个配置:brokerIP1=120.76.62.137
启动命令:nohup sh bin/mqbroker -n localhost:9876-c ./f &
8、MQClientException: No route info of this topic, TopicTest1
解决:
原因:Broker 禁⽌⾃动创建 Topic,且⽤户没有通过⼿⼯⽅式创建此Topic,或者broker和Nameserver⽹络不通
通过 sh bin/mqbroker -m 查看配置
autoCreateTopicEnable=true则⾃动创建topic
Centos7关闭防⽕墙 systemctl stop firewalld
9、控制台查看不了数据,提⽰连接 10909错误
解决:
原因:Rocket默认开启了VIP通道,VIP通道端⼝为10911-2=10909
阿⾥云安全组需要增加⼀个端⼝10909
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论