Skip to content

Importing definitions.json crashes since version 3.8.7-management image #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gbtec-ext-fernandoquiroga opened this issue Sep 22, 2020 · 9 comments

Comments

@gbtec-ext-fernandoquiroga
Copy link

gbtec-ext-fernandoquiroga commented Sep 22, 2020

When updating my rabbitmq docker image from 3.8.6-management to 3.8.7-management the load of the definitions.json fails and throws this error:

rabbitmq_1 | Configuring logger redirection
rabbitmq_1 | 05:46:42.747 [error] management.load_definitions invalid, file doesn't exist or isn't readable
rabbitmq_1 | 05:46:42.749 [error] Error preparing configuration in phase validation:
rabbitmq_1 | 05:46:42.751 [error] - management.load_definitions invalid, file doesn't exist or isn't readable
rabbitmq_1 | 05:46:42.753 [error]
rabbitmq_1 |
rabbitmq_1 | BOOT FAILED
rabbitmq_1 | ===========
rabbitmq_1 | Error during startup: {error,failed_to_prepare_configuration}
rabbitmq_1 |
rabbitmq_1 | 05:46:42.753 [error] BOOT FAILED
rabbitmq_1 | 05:46:42.753 [error] ===========
rabbitmq_1 | 05:46:42.753 [error] Error during startup: {error,failed_to_prepare_configuration}
rabbitmq_1 | 05:46:42.753 [error]
rabbitmq_1 | 05:46:43.755 [error] Supervisor rabbit_prelaunch_sup had child prelaunch started with rabbit_prelaunch:run_prelaunch_first_phase() at undefined exit with reason failed_to_prepare_configuration in context start_error
rabbitmq_1 | 05:46:43.756 [error] CRASH REPORT Process <0.153.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,prelaunch,failed_to_prepare_configuration}},{rabbit_prelaunch_app,start,[normal,[]]}} in application_master:init/4 line 138
rabbitmq_1 | {"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,failed_to_prepare_configuration}},{rabbit_prelaunch_app,start,[normal,[]]}}}"}
rabbitmq_1 | Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,failed_to_prepare_configuration}},{rabbit_prelaunch_app,start,
rabbitmq_1 |

What changed in that makes my configuration not valid anymore? The same configuration works with 3.8.6 but fails with 3.8.7 and newest

@wglambert
Copy link

Seems related to the change made in #430

@michaelklishin
Copy link
Collaborator

management.load_definitions invalid, file doesn't exist or isn't readable means just that: the file this setting points to fails validation (which checks that the file exists and is readable). We cannot suggest much more since you haven't pasted the contents of rabbitmq.conf and the state of the configuration file directory.

As of #430, management.load_definitions is no longer used by this image. Instead, it uses load_definitions (and the issue explains the reasoning behind this change).

@gbtec-ext-fernandoquiroga
Copy link
Author

This is the rabbitmq.conf

listeners.tcp.default = 5672

default_vhost = /

loopback_users = none

management.load_definitions = /etc/rabbitmq/definitions.json

nothing out of the ordinary, and when I check the path to the load_definitions it exists but it keeps failing to start up

@michaelklishin
Copy link
Collaborator

@gbtec-ext-fernandoquiroga for management.load_definitions to pass config file validation, the management plugin must be enabled, the file must exist and be readable by the effective RabbitMQ user.

load_definitions (without the prefix) doesn't have the plugin dependency but has the same validators: file existence and readability.

Not that it has anything to do with definition import but I cannot just ignore this: allowing remote access for user guest (by clearing the loopback_users list) is a terrible practice which is highly discouraged.

@gbtec-ext-fernandoquiroga
Copy link
Author

This configuration didn't change at all and with version 3.8.6 this configuration works, but with version 3.8.7 and newer it doesn't work, what changed in the container for this not to be working after a minor release?

@yosifkit
Copy link
Member

Looking at the changes just before the version bump to now, the only major changes would be #422 and #430.

Can you provide your full rabbitmq setup to help us reproduce the issue? (docker run line or compose.yml)

@gbtec-ext-fernandoquiroga
Copy link
Author

I tried to copy the definitions.json file into the /etc/rabbitmq/definitions.d directory but I got the same issue

@michaelklishin
Copy link
Collaborator

@gbtec-ext-fernandoquiroga can you please share a repository that we can use to reproduce? Guessing is a very time-consuming approach to debugging. We won't be able to help you with the amount of information provided. Please help us help you.

@michaelklishin
Copy link
Collaborator

@yosifkit @wglambert @tianon I suggest that we close this as there isn't enough information to offer an informed advice and the image has moved on from management.load_definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants