Question regarding the advanced.config file format #4162
-
Hi, I already posted this question via slack, but figured, it might be better suited here for asynchronous discussion: I'm currently implementing the automatic generation of the advanced.config file for usage in openstack project kolla-ansible
What is the problem here? PS: Notice that the objective is currently to only make rabbitmq listen on specific ip addresses and to make it work for ipv4 and ipv6. I found these related erlang docs, which explain the format (somewhat): https://www.erlang.org/doc/man/inet.html according to https://www.erlang.org/doc/man/inet.html#type-ip_address an ipv{4,6} address can be enclosed in curly braces, or am I misreading the syntax definition? is something else missing? I checked with the provided advanced.config example and maybe I didn't see it, but I don't know which parts of it are required or optional. If you need more logs or config files, these are linked from the above code review, but I also saved them to my local machine. PPS: This is the crash dump according to the docker logs: 2022-02-17T14:31:11.638069718Z Running command: '/usr/sbin/rabbitmq-server'
2022-02-17T14:31:13.336833958Z 2022-02-17 14:31:13.319206+00:00 [erro] <0.130.0> Failed to load advanced configuration file "/etc/rabbitmq/advanced.config": 5: syntax error before:
2022-02-17T14:31:13.339637574Z
2022-02-17T14:31:13.339813953Z BOOT FAILED
2022-02-17T14:31:13.339882104Z 2022-02-17 14:31:13.339339+00:00 [erro] <0.130.0>
2022-02-17T14:31:13.339895335Z 2022-02-17 14:31:13.339339+00:00 [erro] <0.130.0> BOOT FAILED
2022-02-17T14:31:13.339903135Z 2022-02-17 14:31:13.339339+00:00 [erro] <0.130.0> ===========
2022-02-17T14:31:13.339907280Z 2022-02-17 14:31:13.339339+00:00 [erro] <0.130.0> Error during startup: {error,failed_to_read_advanced_configuration_file}
2022-02-17T14:31:13.339911686Z 2022-02-17 14:31:13.339339+00:00 [erro] <0.130.0>
2022-02-17T14:31:13.340033744Z ===========
2022-02-17T14:31:13.340185248Z Error during startup: {error,failed_to_read_advanced_configuration_file}
2022-02-17T14:31:13.340284094Z
2022-02-17T14:31:14.348088857Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> supervisor: {local,rabbit_prelaunch_sup}
2022-02-17T14:31:14.348127429Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> errorContext: start_error
2022-02-17T14:31:14.348132431Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> reason: failed_to_read_advanced_configuration_file
2022-02-17T14:31:14.348136783Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> offender: [{pid,undefined},
2022-02-17T14:31:14.348140871Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> {id,prelaunch},
2022-02-17T14:31:14.348144894Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> {mfargs,{rabbit_prelaunch,run_prelaunch_first_phase,[]}},
2022-02-17T14:31:14.348149124Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> {restart_type,transient},
2022-02-17T14:31:14.348152981Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> {significant,false},
2022-02-17T14:31:14.348156789Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> {shutdown,5000},
2022-02-17T14:31:14.348160609Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0> {child_type,worker}]
2022-02-17T14:31:14.348187985Z 2022-02-17 14:31:14.347130+00:00 [erro] <0.130.0>
2022-02-17T14:31:14.359977876Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> crasher:
2022-02-17T14:31:14.360007056Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> initial call: application_master:init/4
2022-02-17T14:31:14.360011496Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> pid: <0.128.0>
2022-02-17T14:31:14.360015305Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> registered_name: []
2022-02-17T14:31:14.360018824Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> exception exit: {{shutdown,
2022-02-17T14:31:14.360022455Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> {failed_to_start_child,prelaunch,
2022-02-17T14:31:14.360025968Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> failed_to_read_advanced_configuration_file}},
2022-02-17T14:31:14.360029608Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> {rabbit_prelaunch_app,start,[normal,[]]}}
2022-02-17T14:31:14.360033177Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> in function application_master:init/4 (application_master.erl, line 142)
2022-02-17T14:31:14.360036907Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> ancestors: [<0.127.0>]
2022-02-17T14:31:14.360040438Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> message_queue_len: 1
2022-02-17T14:31:14.360044099Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> messages: [{'EXIT',<0.129.0>,normal}]
2022-02-17T14:31:14.360047617Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> links: [<0.127.0>,<0.44.0>]
2022-02-17T14:31:14.360051403Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> dictionary: []
2022-02-17T14:31:14.360054824Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> trap_exit: true
2022-02-17T14:31:14.360058347Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> status: running
2022-02-17T14:31:14.360062211Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> heap_size: 376
2022-02-17T14:31:14.360065717Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> stack_size: 29
2022-02-17T14:31:14.360069061Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> reductions: 167
2022-02-17T14:31:14.360072574Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0> neighbours:
2022-02-17T14:31:14.360075996Z 2022-02-17 14:31:14.348163+00:00 [erro] <0.128.0>
2022-02-17T14:31:14.360165506Z 2022-02-17 14:31:14.359571+00:00 [noti] <0.44.0> Application rabbitmq_prelaunch exited with reason: {{shutdown,{failed_to_start_child,prelaunch,failed_to_read_advanced_configuration_file}},{rabbit_prelaunch_app,start,[normal,[]]}}
2022-02-17T14:31:15.888074324Z {"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,failed_to_read_advanced_configuration_file}},{rabbit_prelaunch_app,start,[normal,[]]}}}"}
2022-02-17T14:31:15.898655787Z Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,failed_to_read_advanced_configuration_file}},{rabbit_prelaunch_app,start,[normal,[]]}}})
2022-02-17T14:31:15.901572985Z
2022-02-17T14:31:16.030655534Z Crash dump is being written to: erl_crash.dump...done |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is the correct format. Note the addition of an outer
The file must be readable by Also, see the example https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbit/docs/advanced.config.example |
Beta Was this translation helpful? Give feedback.
This is the correct format. Note the addition of an outer
[].
The file must be readable by
file:consult/1
.Also, see the example
advanced.config
here -https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbit/docs/advanced.config.example