Skip to content
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

"invalid credentials" error when logging in through a docker-compose setup #387

Closed
Strandedpirate opened this issue Jan 15, 2020 · 2 comments

Comments

@Strandedpirate
Copy link

If I run rabbitmq through the docker CLI I'm able to successfully set the default user/pass and login to the management portal. If I put the same configuration into a docker-compose file I get "invalid credentials" no matter what when attempting to login to the management portal.

I've tried different user/pass credentials. Checked that there are no spaces at the end of the environment user/pass variables and the rabbitmq.conf for both is identical.

What is causing this?

successful login through management using docker CLI:

docker run -d --hostname my-rabbit --name some-rabbit -p 15672:15672 -e RABBITMQ_DEFAULT_USER=test -e RABBITMQ_DEFAULT_PASS=test123 rabbitmq:3-management

rabbitmq configuration:

root@my-rabbit:/# cat etc/rabbitmq/rabbitmq.conf
loopback_users.guest = false
listeners.tcp.default = 5672
default_pass = test123
default_user = test
management.tcp.port = 15672
root@my-rabbit:/#

failed login through management using docker-compose CLI:

docker-compose.yml

version: '3.7'

services:
      
  local-rabbit:
    image: rabbitmq:3-management
    environment:
      - RABBITMQ_DEFAULT_USER=test
      - RABBITMQ_DEFAULT_PASS=test123
      - RABBITMQ_ERLANG_COOKIE=pR2mywvUspCjdhNv7JfLvYgaDpwfuG
      - RABBITMQ_NODENAME=rabbit@local-rabbit
    ports:
      - '15672:15672'

start a fresh instance and ensure no volumes persist:

docker-compose down -v
docker-compose up

rabbitmq configuration:

root@96a55800528a:/# cat etc/rabbitmq/rabbitmq.conf
loopback_users.guest = false
listeners.tcp.default = 5672
default_pass = test123
default_user = test
management.tcp.port = 15672
root@96a55800528a:/#
@Strandedpirate
Copy link
Author

nevermind; just started working for unknown reasons...

@andrelec1
Copy link

I have exacte same issue ...

Put default user / pwd in docker-compose , see login/pwd in log when i start the docker ... but can't connect ( wrong credential )
Start the docker with one big command line work perfect ...

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

2 participants