apache / rocketmq-operator

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

After create cluster, pod/broker can not running #109

Closed kangzemin closed 2 years ago

kangzemin commented 2 years ago

when I deploy rocketmq cluster,pod/broker is not ready,and restart always.

  1. deploy step: 1.1 git clone https://github.com/apache/rocketmq-operator.git 1.2 cd rocketmq-operator 1.3 checkout 0.2.1 1.4 deployed ./deploy/crds/* deployed ./role & ./role_binding & ./serviceaccount deployed ./operator waiting operator is running ,after: 1.5 deployed ./example/rocketmq_v1alpha1_rocketmq_cluster.yaml pod/name-service is running but broker-0-master-0 is not ready,this is log:

image image

  1. Please tell us about your environment: kubernetes-version v1.20.0
caigy commented 2 years ago

@kangzemin Please provide the output of kubectl describe po broker-0-master-0 -n mq, let's check what was wrong. It seems that the pod was killed due to OOM.

kangzemin commented 2 years ago

@kangzemin Please provide the output of kubectl describe po broker-0-master-0 -n mq, let's check what was wrong. It seems that the pod was killed due to OOM. Thinks for your reply! this is output: image It looks like you're right.but why need so much resources?just a empty cluster, no data. and, How can I solve this problem?

kangzemin commented 2 years ago

@kangzemin Please provide the output of kubectl describe po broker-0-master-0 -n mq, let's check what was wrong. It seems that the pod was killed due to OOM.

ok,I set memory limit to 10Gi,pod is running. just empty cluster broker used memory is 8417Mi.Is this normal? image

caigy commented 2 years ago

@kangzemin IMO configurations in example need to be modified. Please try setting BROKER_MEM to " -Xms1g -Xmx1g -Xmn512m " in the following files: https://github.com/apache/rocketmq-operator/blob/f904c6604a58880d83444b25c4a331092737770a/example/rocketmq_v1alpha1_broker_cr.yaml#L21

kangzemin commented 2 years ago

@kangzemin IMO configurations in example need to be modified. Please try setting BROKER_MEM to " -Xms1g -Xmx1g -Xmn512m " in the following files:

https://github.com/apache/rocketmq-operator/blob/f904c6604a58880d83444b25c4a331092737770a/example/rocketmq_v1alpha1_broker_cr.yaml#L21

ok,thinks!