-
Notifications
You must be signed in to change notification settings - Fork 432
No default vhost or user created if definition.json exists #365
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
Comments
PS: If I use a complete definitions.json file, with users, permissions, vhost and policies sections, all is working as expected |
https://www.rabbitmq.com/management.html#load-definitions
Using environment variables modifies the $ docker run -d --rm -p 8080:15672 -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=password --name rabbit rabbitmq:test
8599aa036285a73822da5837c6e132825ba94a3429f9e143bc29057598945670
$ docker exec rabbit cat /etc/rabbitmq/rabbitmq.conf
loopback_users.guest = false
listeners.tcp.default = 5672
default_pass = password
default_user = user
management.listener.port = 15672
management.listener.ssl = false
management.load_definitions = /etc/rabbitmq/definitions.json
$ docker exec rabbit rabbitmqctl list_users
Listing users ...
|
Closing as this is the intentional behavior of RabbitMQ upstream. 👍 |
Thanks for the answers. |
@vincenzodnp could you show how your fully pleged defintions.json looks like to create default user with pass? |
I used this:
|
Had the same issue and this solved it! |
I've tried using From logs:
|
@v-bulynkin I have no idea how the method in this comment ever worked. Templating the Please start a new discussion and we can assist you. Attach your complete |
Hello there.
I'm trying to apply a definitions.json file to a rabbitmq 3.7 management container.
Here my Dockerfile
and here my definitions.json file
When I run the container, it starts correctly but no default user and password are set.
even if
rabbitmqctl environments shows:
I have tried also to run the container with RABBITMQ_DEFAULT_USER and RABBITMQ_DEFAULT_PASS variables, but no luck.
If I remove the vhosts section in definitions.json . container doesn' start and shows error
{error,<<"Please create virtual host \"\" prior to importing definitions.">>}
So has definitions.json precedence instead of rabbitmq.conf? Why empty database is not initialized BEFORE import definitions.json?
Thanks
Vincenzo
The text was updated successfully, but these errors were encountered: