Failed to write PID file "/var/lib/rabbitmq/mnesia/rabbit@rabbitmqcluster-server-0.rabbitmqcluster-nodes.default.pid": permission denied #1343
Unanswered
jairohelsing
asked this question in
Q&A
Replies: 3 comments 1 reply
-
Since you are using local provisioning, I guess the path On a side note, I would recommend to get familiar with GitHub formatting syntax. It will make your posts easier to read, and likely to get more attention. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
Good afternoon, I have a problem that has me stuck when it comes to raising the kubernetes cluster operator pods with rabbitmq, to install in kubernetes I have used this link https://github.com/rabbitmq/cluster-operator/releases/latest/ download /cluster operator.yml.
After successfully starting the rabbitmq service, I proceed with the pod start with the following yaml
apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
name: rabbitmqcluster
spec:
image: rabbitmq:3.11-management
replicas: 3
service:
type: ClusterIP
resources:
requests:
memory: 512Mi
rabbitmq:
additionalPlugins:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: persistent-rabbitmqcluster-server-0
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: persistent-rabbitmqcluster-server-1
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: persistent-rabbitmqcluster-server-2
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
apiVersion: v1
kind: PersistentVolume
metadata:
name: persistent-rabbitmqcluster-server-0
spec:
capacity:
storage: 10Gi
accessModes:
hostPath:
path: /opt/sac/rabbitmq
apiVersion: v1
kind: PersistentVolume
metadata:
name: persistent-rabbitmqcluster-server-1
spec:
capacity:
storage: 10Gi
accessModes:
hostPath:
path: /opt/sac/rabbitmq
apiVersion: v1
kind: PersistentVolume
metadata:
name: persistent-rabbitmqcluster-server-2
spec:
capacity:
storage: 10Gi
accessModes:
hostPath:
path: /opt/sac/rabbitmq
The error I am getting is the following:
Defaulted container "rabbitmq" out of: rabbitmq, setup-container (init)
2023-05-02 22:01:56.707876+00:00 [warning] <0.132.0> Failed to write PID file "/var/lib/rabbitmq/mnesia/rabbit@rabbitmqcluster-server-0.rabbitmqcluster-nodes.default.pid": permission denied
2023-05-02 22:01:58.310552+00:00 [notice] <0.44.0> Application syslog exited with reason: stopped
2023-05-02 22:01:58.310664+00:00 [notice] <0.233.0> Logging: switching to configured handler(s); following messages may not be visible in this log output
2023-05-02 22:01:58.325630+00:00 [notice] <0.233.0> Logging: configured log handlers are now ACTIVE
2023-05-02 22:01:58.358714+00:00 [error] <0.233.0>
2023-05-02 22:01:58.358714+00:00 [error] <0.233.0> BOOT FAILED
2023-05-02 22:01:58.358714+00:00 [error] <0.233.0> ===========
2023-05-02 22:01:58.358714+00:00 [error] <0.233.0> Error during startup: {error,
2023-05-02 22:01:58.358714+00:00 [error] <0.233.0> {cannot_create_mnesia_dir,
2023-05-02 22:01:58.358714+00:00 [error] <0.233.0> "/var/lib/rabbitmq/mnesia/rabbit@rabbitmqcluster-server-0.rabbitmqcluster-nodes.default/",
2023-05-02 22:01:58.358714+00:00 [error] <0.233.0> eacces}}
2023-05-02 22:01:58.358714+00:00 [error] <0.233.0>
BOOT FAILED
Error during startup: {error,
{cannot_create_mnesia_dir,
"/var/lib/rabbitmq/mnesia/rabbit@rabbitmqcluster-server-0.rabbitmqcluster-nodes.default/",
eacces}}
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> crasher:
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> initial call: application_master:init/4
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> pid: <0.232.0>
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> registered_name: []
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> exception exit: {{cannot_create_mnesia_dir,
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> "/var/lib/rabbitmq/mnesia/rabbit@rabbitmqcluster-server-0.rabbitmqcluster-nodes.default/",
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> eacces},
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> {rabbit,start,[normal,[]]}}
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> in function application_master:init/4 (application_master.erl, line 142)
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> ancestors: [<0.231.0>]
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> message_queue_len: 1
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> messages: [{'EXIT',<0.233.0>,normal}]
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> links: [<0.231.0>,<0.44.0>]
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> dictionary: []
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> trap_exit: true
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> status: running
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> heap_size: 610
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> stack_size: 28
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> reductions: 180
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0> neighbours:
2023-05-02 22:01:59.360761+00:00 [error] <0.232.0>
2023-05-02 22:01:59.374836+00:00 [notice] <0.44.0> Application rabbit exited with reason: {{cannot_create_mnesia_dir,"/var/lib/rabbitmq/mnesia/rabbit@rabbitmqcluster-server-0.rabbitmqcluster-nodes.default/",eacces},{rabbit,start,[normal,[]]}}
{"Kernel pid terminated",application_controller,"{application_start_failure,rabbit,{{cannot_create_mnesia_dir,"/var/lib/rabbitmq/mnesia/rabbit@rabbitmqcluster-server-0.rabbitmqcluster-nodes.default/",eacces},{rabbit,start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,rabbit,{{cannot_create_mnesia_dir,"/var/lib/rabbitmq/mnesia/rabbit@rabbitmqcluster-server-0.rabbitmqcluster-nodes.default/",eacces},{rabbit,start,[normal,[]]}}})
Crash dump is being written to: /var/log/rabbitmq/erl_crash.dump...done
Reproduction steps
installation with https://github.com/rabbitmq/cluster-operator/releases/latest/ download /cluster operator.yml.
Creating pods with above mentioned yaml file
When I want to enter the pod and try to modify the permissions with chmod rabbitmq:rabbitmq or chmod 777 for the mnesia folder I get permission denied
Expected behavior
What I hope is that you can help me to solve the problem in some way, since I need to start rabbitmq with cluster-operator
Additional context
Beta Was this translation helpful? Give feedback.
All reactions