解决:If the number of processors is expected to increase from one, then you should configure the numbe

2022-04-13 15:53:52 浏览数 (1)

1. 按官方说明用 docker 部署 rocketmq ,启动 broker 报错:

代码语言:javascript复制
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
/opt/rocketmq-4.2.0/bin/runbroker.sh: line 71:    22 Killed

2. 按提示找到 对应文件

代码语言:javascript复制
find / -name *runbroker.sh

查找结果有3个同名文件 ,我不知道是改哪个,于是3个都改了。

代码语言:javascript复制
/var/lib/docker/overlay2/0aa7531560625ec8a0439bc215ef4628de9c8734ee83a0c503c13127ee723ee0/diff/opt/rocketmq-4.2.0/bin/runbroker.sh
/var/lib/docker/overlay2/cf56ab981f4fb785fc7a78efa1445ff605796bfa4c7f2ae2f621c5a5171408ee/merged/opt/rocketmq-4.2.0/bin/runbroker.sh
/var/lib/docker/overlay2/e0da31f0283ae25bbf6a949d2ebef676f5949f97f6001a4d4c4d63b7bece6c29/diff/opt/rocketmq-4.2.0/bin/runbroker.sh

3. 修改默认大小空间配置,原本是设置的为 4G、4G、8G,我的服务器内存没有那么大。改小就行了,见整个红框中设置。

黄框中是我改后的设置,上面注释掉的那行是原本配置。

改为:JAVA_OPT="${JAVA_OPT} -server -Xms256m -Xmx256m -Xmn128m"

0 人点赞