前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >rocketMQ安装中遇到的坑

rocketMQ安装中遇到的坑

作者头像
爱撸猫的杰
发布2019-04-01 14:54:18
2.5K0
发布2019-04-01 14:54:18
举报
文章被收录于专栏:爱撸猫的杰

安装步骤是这些:

Prerequisite

The following softwares are assumed installed:

  1. 64bit OS, Linux/Unix/Mac is recommended;
  2. 64bit JDK 1.8+;
  3. Maven 3.2.x;
  4. Git;
  5. 4g+ free disk for Broker server

Download & Build from Release

Click here to download the 4.4.0 source release. Also you could download a binary release from here.

Now execute the following commands to unpack 4.4.0 source release and build the binary artifact.

代码语言:javascript
复制
  > unzip rocketmq-all-4.4.0-source-release.zip
  > cd rocketmq-all-4.4.0/
  > mvn -Prelease-all -DskipTests clean install -U
  > cd distribution/target/apache-rocketmq

Start Name Server

代码语言:javascript
复制
  > nohup sh bin/mqnamesrv &
  > tail -f ~/logs/rocketmqlogs/namesrv.log
  The Name Server boot success...

Start Broker

代码语言:javascript
复制
  > nohup sh bin/mqbroker -n localhost:9876 &
  > tail -f ~/logs/rocketmqlogs/broker.log 
  The broker[%s, 172.30.30.233:10911] boot success...

Send & Receive Messages

Before sending/receiving messages, we need to tell clients the location of name servers. RocketMQ provides multiple ways to achieve this. For simplicity, we use environment variable NAMESRV_ADDR

代码语言:javascript
复制
 > export NAMESRV_ADDR=localhost:9876
 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
 SendResult [sendStatus=SEND_OK, msgId= ...

 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer
 ConsumeMessageThread_%d Receive New Messages: [MessageExt...

Shutdown Servers

代码语言:javascript
复制
> sh bin/mqshutdown broker
The mqbroker(36695) is running...
Send shutdown request to mqbroker(36695) OK

> sh bin/mqshutdown namesrv
The mqnamesrv(36664) is running...
Send shutdown request to mqnamesrv(36664) OK


问题1:我yum install java  安装了1.8 默认openJDK,坑啊!
问题2:安装好启动的时候一直起不来,发现打了栈信息,查了很久发现内在最小8G以上,我的机器才2G(最低配置就8G吗)

问题3:测试的时候报 No route info of this topic, TopicTest。
nohup sh bin/mqbroker -n localhost:9876 &  需要改成 nohup sh mqbroker -n localhost:9876 autoCreateTopicEnable=true &
还是不行,查原因是防火墙没关,systemctl status firewalld 查看状态。systemctl stop firewalld.

问题4:RemotingTooMuchRequestException: sendDefaultImpl call timeout 发送失败
namesrver 要改成自己的IP。启动namesrver:
nohup sh bin/mqnamesrv -n "200.200.3.38:9876" &

启动broker ,强制加上本机ip:

echo 'brokerIP1=200.200.3.38' > conf/broker.properties nohup sh bin/mqbroker -n localhost:9876 -c conf/broker.properties autoCreateTopicEnable=true &

   问题5:安装 rocketmq-console-ng 界面 包的时候,maven  pom.xml 的 rocketmq.version 竟然用得是SNAPSHOT 的包,完全编译不了!!!

 最后去了maven 官网去找的版本包编译。

代码语言:javascript
复制
感觉一点没有rabbitMq好用,不能再多爱了!!!
代码语言:javascript
复制
代码语言:javascript
复制
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-03-29 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Prerequisite
  • Download & Build from Release
  • Start Name Server
  • Start Broker
  • Send & Receive Messages
  • Shutdown Servers
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档