Skip to content

Containerized rabbitmq versions 3.6-management+ not working with conf file #600

@tinakurian-pki

Description

@tinakurian-pki

Hello!

I have a docker-compose setup to run rabbitmq in a container. The setup works on windows, but not on a mac. I've also recognized that version 3.5-management does work on a mac. However, anything newer, will not work. The issue is directly related to applying a rabbitmq.conf file.

docker-compose.yaml file:

version: '3.7'
networks:
  credentials_network:
    driver: bridge
    ipam:
      config:
        - subnet: 169.254.170.0/24
          gateway: 169.254.170.1
services:
  rabbitmq:
    container_name: my-rabbitmq
    image: 'rabbitmq:3.11.5-management' # if this is changed to 'rabbitmq:3.5-management' it works!
    environment:
      RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: '-rabbitmq_stream advertised_host rabbitmq'
    ports:
      - '5672:5672'
      - '5552:5552'
      - '15672:15672'
    volumes:
      - ./rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
     # - ./enabled_plugins:/etc/rabbitmq/enabled_plugins:ro
    healthcheck:
      test: rabbitmq-diagnostics -q ping
      interval: 15s
      timeout: 15s
      retries: 5
    networks:
      credentials_network:
        aliases:
          - rabbitmq
          - my-rabbitmq
volumes:
  data: {}

rabbitmq.conf file:

streamlistenerstcp1 = 5552
streamtcp_listen_optionsbacklog = 4096
streamtcp_listen_optionsrecbuf = 131072
streamtcp_listen_optionssndbuf = 131072
streamtcp_listen_optionskeepalive = true
streamtcp_listen_optionsnodelay = true
streamtcp_listen_optionsexit_on_close = true
streamtcp_listen_optionssend_timeout = 120

enabled_plugins file:
[rabbitmq_management,rabbitmq_prometheus,rabbitmq_stream,rabbitmq_stream_management].

The error i see is as follows:

Output ``` Attaching to my-rabbitmq my-rabbitmq | 2023-01-05 16:07:02.123357+00:00 [error] <0.132.0> File operation error: eperm. Target: /etc/rabbitmq/rabbitmq.conf. Function: get_file. Process: rabbit_prelaunch_sup. my-rabbitmq | 2023-01-05 16:07:02.155232+00:00 [error] <0.132.0> Error parsing configuration: my-rabbitmq | 2023-01-05 16:07:02.175412+00:00 [error] <0.132.0> - Could not open file (/etc/rabbitmq/rabbitmq.conf) for Reason undefined my-rabbitmq | 2023-01-05 16:07:02.175464+00:00 [error] <0.132.0> Are these files using the Cuttlefish format? my-rabbitmq | my-rabbitmq | BOOT FAILED my-rabbitmq | =========== my-rabbitmq | Error during startup: {error,failed_to_parse_configuration_file} my-rabbitmq | my-rabbitmq | 2023-01-05 16:07:02.180556+00:00 [error] <0.132.0> my-rabbitmq | 2023-01-05 16:07:02.180556+00:00 [error] <0.132.0> BOOT FAILED my-rabbitmq | 2023-01-05 16:07:02.180556+00:00 [error] <0.132.0> =========== my-rabbitmq | 2023-01-05 16:07:02.180556+00:00 [error] <0.132.0> Error during startup: {error,failed_to_parse_configuration_file} my-rabbitmq | 2023-01-05 16:07:02.180556+00:00 [error] <0.132.0> my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> supervisor: {local,rabbit_prelaunch_sup} my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> errorContext: start_error my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> reason: failed_to_parse_configuration_file my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> offender: [{pid,undefined}, my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> {id,prelaunch}, my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> {mfargs,{rabbit_prelaunch,run_prelaunch_first_phase,[]}}, my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> {restart_type,transient}, my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> {significant,false}, my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> {shutdown,5000}, my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> {child_type,worker}] my-rabbitmq | 2023-01-05 16:07:03.193079+00:00 [error] <0.132.0> my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> crasher: my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> initial call: application_master:init/4 my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> pid: <0.130.0> my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> registered_name: [] my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> exception exit: {{shutdown, my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> {failed_to_start_child,prelaunch, my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> failed_to_parse_configuration_file}}, my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> {rabbit_prelaunch_app,start,[normal,[]]}} my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> in function application_master:init/4 (application_master.erl, line 142) my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> ancestors: [<0.129.0>] my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> message_queue_len: 1 my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> messages: [{'EXIT',<0.131.0>,normal}] my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> links: [<0.129.0>,<0.44.0>] my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> dictionary: [] my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> trap_exit: true my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> status: running my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> heap_size: 233 my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> stack_size: 28 my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> reductions: 170 my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> neighbours: my-rabbitmq | 2023-01-05 16:07:03.193840+00:00 [error] <0.130.0> my-rabbitmq | 2023-01-05 16:07:03.210633+00:00 [notice] <0.44.0> Application rabbitmq_prelaunch exited with reason: {{shutdown,{failed_to_start_child,prelaunch,failed_to_parse_configuration_file}},{rabbit_prelaunch_app,start,[normal,[]]}} my-rabbitmq | {"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,failed_to_parse_configuration_file}},{rabbit_prelaunch_app,start,[normal,[]]}}}"} my-rabbitmq | Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,failed_to_parse_configuration_file}},{rabbit_prelaunch_app,start,[normal,[]]}}}) my-rabbitmq | my-rabbitmq exited with code 0 ```

Any help would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions