Rabbitmq: the collect-env did not work due to the read-only file system
search cancel

Rabbitmq: the collect-env did not work due to the read-only file system

book

Article ID: 420822

calendar_today

Updated On:

Products

VMware Tanzu RabbitMQ

Issue/Introduction

Customer upgraded the Tanzu rabbitmq for K8s to 4.2.0 or later and the collect-env script did not work to collect the rabbitmq logs and the read-only error message is here:

Cause

This issue was caused by the security policy in the new version , so  the /tmp file system became read-only.

Resolution

R&D has updated the collect-env script.

https://github.com/rabbitmq/support-tools/blob/main/scripts/rabbitmq-collect-env

 

They shared two options to create another two folders for the log collection.

 

Environment Variables:
  RABBITMQ_COLLECT_ENV_OUTPUT_DIR
                 Directory where the final tarball will be created.
                 If not set, a temporary directory will be used.
                 The directory will be created if it doesn't exist.

  RABBITMQ_COLLECT_ENV_TEMP_DIR
                 Directory where temporary/intermediary artifacts will
                 be stored during collection. If not set, a system
                 temporary directory will be used and cleaned up on exit.
                 When set, artifacts are preserved after script completion.
                 The directory will be created if it doesn't exist.

 

 

 

For example, we can save the logs to the /var/lib/rabbitmq

export RABBITMQ_COLLECT_ENV_OUTPUT_DIR=/var/lib/rabbitmq

export RABBITMQ_COLLECT_ENV_TEMP_DIR=/var/lib/rabbitmq

./rabbitmq-collect-env.sh