rabbitmq / rabbitmq-server

Open source RabbitMQ: core server and tier 1 (built-in) plugins
https://www.rabbitmq.com/
Other
12k stars 3.9k forks source link

Prelaunch logging is not saved to a file #6210

Open lukebakken opened 1 year ago

lukebakken commented 1 year ago

A customer who runs RabbitMQ on Windows ran into an upgrade issue. Not all feature flags were enabled, which prevented the upgrade to version 3.11 from completing. Since RabbitMQ runs as a Windows service, the following error messages were not available to diagnose the issue:

2022-10-20 20:03:33.319025+00:00 [error] <0.229.0> Feature flags: `implicit_default_bindings`: required feature flag not enabled! It must be enabled before upgrading RabbitMQ.
2022-10-20 20:03:33.324292+00:00 [error] <0.229.0> Failed to initialize feature flags registry: {disabled_required_feature_flag,                                                    2022-10-20 20:03:33.324292+00:00 [error] <0.229.0>                                               implicit_default_bindings}

BOOT FAILED                                                                                                                                                                         ===========
2022-10-20 20:03:33.332480+00:00 [error] <0.229.0>
2022-10-20 20:03:33.332480+00:00 [error] <0.229.0> BOOT FAILED
2022-10-20 20:03:33.332480+00:00 [error] <0.229.0> ===========                                                                                                                      2022-10-20 20:03:33.332480+00:00 [error] <0.229.0> Error during startup: {error,failed_to_initialize_feature_flags_registry}                                                        2022-10-20 20:03:33.332480+00:00 [error] <0.229.0>

To reproduce this scenario using Docker, I put the following repo together - https://github.com/lukebakken/rabbitmq-upgrade-feature-flags-test

Prelauch logging should go to a file. Either the main RabbitMQ log file or one specific to startup.

What do you think @dumbbell?

cc @pivotal-aarati-somachudan

VESC-1051

michaelklishin commented 1 year ago

Prelaunch (the application) is unaware of most of configuration up to a certain point.

It can go into a new file in addition to standard output/error but only the logging directory and logger are set up.