Skip to content

Provide more detailed rabbitmq.conf validation errors on startup #1985

@gmr

Description

@gmr

I'm spending a fair amount of time playing "spot the error" in rabbitmq.conf due to poor error output on startup failure. I'd be nice if instead of just reporting init terminating in do_boot (badarg) on startup failure, the parameter and value that is causing the failure is returned in the output.

The startup failure is early enough that I do not get any log information and only get the erl_crash.dump file.

I did work out I could use the cuttlefish binary provided as part of the distribution to troubleshoot where the failures are by running /usr/lib/rabbitmq/bin/cuttlefish -c /etc/rabbitmq/rabbitmq.conf -s /var/lib/rabbitmq/schema/, but did not find it in the configuration documentation as a possible troubleshooting step. Ideally the output from cuttlefish could be spit out on a startup failure due to config validation.

Ubuntu Xenial
Erlang 21.3.5-1 (From RabbitMQ bintray Repo)
RabbitMQ 3.7.14

Example of failure output:

root@ansible:/etc/rabbitmq# /usr/lib/rabbitmq/bin/rabbitmq-server 

BOOT FAILED
===========

Error description:
    rabbit:start_it/1 line 484
    rabbit:boot_error/2 line 972
    rabbit_lager:log_locations/0 line 97
    rabbit_lager:ensure_lager_configured/0 line 198
    rabbit_lager:lager_configured/0 line 206
    lager:list_all_sinks/0 line 341
    lager_config:get/2 line 71
    ets:lookup(lager_config, {'_global',handlers})
error:badarg
Log file(s) (may contain more information):

{"init terminating in do_boot",badarg}
init terminating in do_boot (badarg)

The traceback also makes it appear that it's a lager issue when I've been able to prove it to be something else multiple times, in my latest case, specifying management.inactivity_timeout instead of management.tcp.inactivity_timeout.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions