apache / rocketmq-operator

Apache RocketMQ Operator
https://rocketmq.apache.org/
Apache License 2.0
308 stars 126 forks source link

Can not run nameserver on cgroup v2 #198

Closed drivebyer closed 6 months ago

drivebyer commented 7 months ago

BUG REPORT

1. Please describe the issue you observed: When run nameserver on host which use cgroup v2, the nameserver exited with error:

cat: can't open '/sys/fs/cgroup/memory/memory.limit_in_bytes': No such file or directory
/root/rocketmq/nameserver/bin/runserver.sh: line 58: arithmetic syntax error

2. Please tell us about your environment:

截屏2023-11-23 15 15 32

The above picture show the host use cgroup v2.

3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc): We should enhance these code: https://github.com/apache/rocketmq-operator/blob/a8665716c8028741ec106814798e39fe07e6dcaa/images/namesrv/alpine/runserver-customize.sh#L57-L66