-
Notifications
You must be signed in to change notification settings - Fork 426
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
RabbitMQ can't logged in #276
Comments
Works fine, I can also connect through the webui $ docker run --rm -dP -e RABBITMQ_DEFAULT_USER=user -e RABBITMQ_DEFAULT_PASS=pass --name rabbitmq rabbitmq:management
$ docker exec -it rabbitmq bash
root@e46daef7596f:/# rabbitmqadmin --username=user --password=pass list exchanges
rabbitmqadmin --username=user --password=pass list exchanges
+--------------------+---------+
| name | type |
+--------------------+---------+
| | direct |
| amq.direct | direct |
| amq.fanout | fanout |
| amq.headers | headers |
| amq.match | headers |
| amq.rabbitmq.trace | topic |
| amq.topic | topic |
+--------------------+---------+ Don't know what caused |
helo @wglambert have yo tried my docker-compose script ? |
Seeing something similar, using the I have the Interestingly, guest/guest still works. |
Using your version: '3'
services:
rabbitmq:
image: rabbitmq:3.7-management
hostname: rabbitmq
environment:
RABBITMQ_ERLANG_COOKIE: SWQOKODSQALRPCLNMEQG
RABBITMQ_DEFAULT_USER: rabbitmq
RABBITMQ_DEFAULT_PASS: rabbitmq
RABBITMQ_DEFAULT_VHOST: /
volumes:
- ./docker/rabbitmq:/var/lib/rabbitmq
ports:
- 5672:5672
- 5671:5671
- 15672:15672
- 15671:15671 $ docker-compose up -d
Creating network "rabbitmq-276_default" with the default driver
Creating rabbitmq-276_rabbitmq_1 ... done
$ docker exec -it rabbitmq-276_rabbitmq_1 bash
root@rabbitmq:/# rabbitmqadmin --username=rabbitmq --password=rabbitmq list exchanges
+--------------------+---------+
| name | type |
+--------------------+---------+
| | direct |
| amq.direct | direct |
| amq.fanout | fanout |
| amq.headers | headers |
| amq.match | headers |
| amq.rabbitmq.trace | topic |
| amq.topic | topic |
+--------------------+---------+ |
So, this is probably because when you first did it, your syntax probably included quotes something like this: environment:
- RABBITMQ_DEFAULT_USER="rabbitmq"
- RABBITMQ_DEFAULT_PASS="rabbitmq" This sets the environment variables with literal quotes, which would explain why the quotes were required when logging in. With this syntax, you either want quotes around the entire string, or not at all (ala,
I believe this (and the crux of this issue) boil down to docker-library/postgres#203 (comment). When you set these variables, their values get embedded in the database itself as defaults and changing them in the environment/configuration will not change the data unless you also reset your database contents. See also #150 (comment). |
I can't login with user rabbitmq and password rabbitmq
Both on my application (java app) and rabbitmq management
Failed login with rabbitmq management
Failed login with spring app
Any help would be very appreciated
The text was updated successfully, but these errors were encountered: