Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set user and password for rabbitmq on docker container

Tags:

docker

I am trying to create a rabbitmq docker container with default user and password but when I try to enter to the management plugin those credentials doesn't work

This is how I create the container:

docker run -d -P --hostname rabbit -p 5009:5672 -p 5010:15672 --name rabbitmq -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=pass -v /home/desarrollo/rabbitmq/data:/var/lib/rabbitmq rabbitmq:3.6.10-management

What am I doing wrong?,

Thanks in advance

like image 940
Alan Gaytan Avatar asked Aug 03 '17 18:08

Alan Gaytan


People also ask

How do I change my RabbitMQ Docker username and password?

If you wish to change the default username and password of guest / guest , you can do so with the RABBITMQ_DEFAULT_USER and RABBITMQ_DEFAULT_PASS environmental variables. These variables were available previously in the docker-specific entrypoint shell script but are now available in RabbitMQ directly.

How do I connect to RabbitMQ in Docker container?

Open a terminal, navigate to your rabbitmq-go folder and run docker-compose up . This command will pull the rabbitmq:3-management-alpine image, create the container rabbitmq and start the service and webUI. You should see something like this: Once you see this, open your browser and head over to http://localhost:15672.

What is default username and password for RabbitMQ?

Enter guest as the Username and Password. Note: The default user “guest” is an administrative user and its login credentials are published on the official RabbitMQ web site. It is recommended that you update this user or delete it as per your local security policies.


1 Answers

The default user is created only if the database does not exist. Therefore the environment variables have no effect if the volume already exists.

like image 191
drizzd Avatar answered Sep 29 '22 03:09

drizzd