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

user name and password aren't available in rabbitmq management #2801

Closed
nashpaz123 opened this issue Jun 10, 2020 · 9 comments
Closed

user name and password aren't available in rabbitmq management #2801

nashpaz123 opened this issue Jun 10, 2020 · 9 comments
Labels
stale 15 days without activity

Comments

@nashpaz123
Copy link

Which chart:
https://github.com/bitnami/charts/tree/master/bitnami/rabbitmq
version 6.26.0

Describe the bug
user name and password aren't available in rabbitmq management, when trying to log in or when viewing admin -> users. When entering with user:guest pass:guest under admin -> users, no users exists except guest

To Reproduce
Steps to reproduce the behavior:

  1. On an AWS EKS cluster, run:
    helm install rabbitmq bitnami/rabbitmq --set rabbitmq.username='admin',rabbitmq.password='admin',rabbitmq.erlangCookie=erlangCookiesecretcookie
    or
    helm install rabbitmq bitnami/rabbitmq
    then
    kubectl port-forward --namespace default svc/rabbitmq 15672:15672
  2. Browse to http://127.0.0.1:15672
  3. Try to enter with the users (If rabbitmq.username and rabbitmq.password weren't specified the helm install output gives the auto-generated user and password)
  4. See error: login failed, and when entering with user:guest pass:guest under admin -> users, no users exists except guest

Expected behavior
Ability to log in with the user and password provided or auto-generated, or see them under admin -> users

Version of Helm and Kubernetes:
AWS EKS,
Kubernetes version: 1.16

  • Output of helm version:
version.BuildInfo{Version:"v3.2.1", GitCommit:"fe51cd1e31e6a202cba7dead9552a6d418ded79a", GitTreeState:"clean", GoVersion:"go1.13.10"}
  • Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.3", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"clean", BuildDate:"2020-05-20T12:52:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.8-eks-e16311", GitCommit:"e163110a04dcb2f39c3325af96d019b4925419eb", GitTreeState:"clean", BuildDate:"2020-03-27T22:37:12Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}

Additional context
I did play with a bunch of images created with FROM bitnami/rabbitmq:3.8.3-debian-10-r100 before returning to installing from helm install rabbitmq bitnami/rabbitmq . I'm not sure that this is related.

@andresbono
Copy link
Member

Hi @nashpaz123, we have just tried and we couldn't reproduce the issue:

$ helm install rabbitmq bitnami/rabbitmq --set rabbitmq.username='admin',rabbitmq.password='admin',rabbitmq.erlangCookie=erlangCookiesecretcookie
$ kubectl port-forward --namespace default svc/rabbitmq 15672:15672

image

Does the logs of your pod show anything relevant?

@szymonrychu
Copy link

szymonrychu commented Jun 15, 2020

I have the same problem with helm chart bitnami/rabbitmq in version 6.27.0 :)
values.yaml:

fullnameOverride: cluster-rabbitmq

rabbitmq:
  usernmame: admin
  password: admin

then I'm running:
kubectl port-forward svc/cluster-rabbitmq 15672:15672

edit: removed RABBITMQ_VHOST, because it was shading the problem and didn't alter anything in the outputs/state of the issue.

@szymonrychu
Copy link

szymonrychu commented Jun 15, 2020

some more troubleshooting:

kubectl exec -it $(kubectl get pod | grep rabb | grep Running | head -1 | awk '{print $1}') -- bash
I have no name!@cluster-rabbitmq-0:/$ env | grep PASSW
RABBITMQ_PASSWORD=admin
I have no name!@cluster-rabbitmq-0:/$ cat /opt/bitnami/rabbitmq/conf/rabbitmq.conf
##username and password
default_user=user
default_pass=CHANGEME
## Clustering
cluster_formation.peer_discovery_backend  = rabbit_peer_discovery_k8s
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
cluster_formation.node_cleanup.interval = 10
cluster_formation.node_cleanup.only_log_warning = true
cluster_partition_handling = autoheal
# queue master locator
queue_master_locator=min-masters
# enable guest user
loopback_users.guest = false
#disk_free_limit.absolute = 50MB
#management.load_definitions = /app/load_definition.jsonI have no name!@cluster-rabbitmq-0:/$ cat /opt/bitnami/rabbitmq/conf/..2020_06_15_15_12_42.427351209/rabbitmq.conf
##username and password
default_user=user
default_pass=CHANGEME
## Clustering
cluster_formation.peer_discovery_backend  = rabbit_peer_discovery_k8s
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
cluster_formation.node_cleanup.interval = 10
cluster_formation.node_cleanup.only_log_warning = true
cluster_partition_handling = autoheal
# queue master locator
queue_master_locator=min-masters
# enable guest user
loopback_users.guest = false
#disk_free_limit.absolute = 50MB
I have no name!@cluster-rabbitmq-0:/$ cat /opt/bitnami/rabbitmq/etc/rabbitmq/rabbitmq.conf
##username and password
default_user=user
default_pass=admin
## Clustering
cluster_formation.peer_discovery_backend  = rabbit_peer_discovery_k8s
cluster_formation.k8s.host = kubernetes.default.svc.cluster.local
cluster_formation.node_cleanup.interval = 10
cluster_formation.node_cleanup.only_log_warning = true
cluster_partition_handling = autoheal
# queue master locator
queue_master_locator=min-masters
# enable guest user
loopback_users.guest = false
#disk_free_limit.absolute = 50MB
#management.load_definitions = /app/load_definition.jsonI have no name!@cluster-rabbitmq-0:/$

@szymonrychu
Copy link

I've added the user by kubectl exec -it $(kubectl get pod | grep rabb | grep Running | head -1 | awk '{print $1}') -- bash and using commands below:

rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator

Unfortunately the chart doesn't provide a way to add sidecar containers, so there is no fancy sidecar container I can share with community as a workaround :(

@andresbono
Copy link
Member

Hi @szymonrychu, thanks for all the detailed information. It looks like there is a typo in your values.yaml #2801 (comment). Please change usernmame to username. With that, the user credentials should be updated. This is what we have tried:

helm install rabbitmq bitnami/rabbitmq  --set rabbitmq.username=admin,rabbitmq.password=admin,fullnameOverride=cluster-rabbitmq
kubectl exec -it $(kubectl get pod | grep rabb | grep Running | head -1 | awk '{print $1}') -- bash
$ cat /opt/bitnami/rabbitmq/conf/rabbitmq.conf
##username and password
default_user=admin
default_pass=CHANGEME

$ cat /opt/bitnami/rabbitmq/conf/..2020_06_16_09_30_12.048156592/rabbitmq.conf
##username and password
default_user=admin
default_pass=CHANGEME

$ cat /opt/bitnami/rabbitmq/etc/rabbitmq/rabbitmq.conf
##username and password
default_user=admin
default_pass=admin

$ rabbitmqctl list_users
Listing users ...
user	tags
admin	[administrator]

@nashpaz123
Copy link
Author

nashpaz123 commented Jun 16, 2020

It turns out that a team mate deployed rabbitmq by pulling it to a local folder, and setting a docker image instead of the original image:
registry: docker.io
repository: bitnami/rabbitmq
tag: 3.8.3-debian-10-r100
deploying with helm install rabbitmq bitnami/rabbitmq --set rabbitmq.username='admin',rabbitmq.password='admin',rabbitmq.erlangCookie=erlangCookiesecretcookie works fine.
The Dockerfile used was:

FROM bitnami/rabbitmq:3.8.3-debian-10-r100

COPY rabbitmq_delayed_message_exchange-3.8.0.ez /opt/bitnami/rabbitmq/plugins/rabbitmq_delayed_message_exchange-3.8.0.ez
RUN rabbitmq-plugins enable --offline rabbitmq_delayed_message_exchange

Shouldn't the chart run with an image made with that Dockerfile?

Also, I'd love to know if it's possible to take the 3.8.3-debian-10-r100 Dockerfile from here:
https://github.com/bitnami/bitnami-docker-rabbitmq/blob/3.8.3-debian-10-r100/3.8/debian-10/Dockerfile

and add those COPY and RUN commands to it, set the resulting image with the chart and install?

@andresbono
Copy link
Member

Shouldn't the chart run with an image made with that Dockerfile?

In principle, yes, I think that Dockerfile is correct. If you push that image to a container registry and specify the reference in the values of the chart, it will use that custom image.

Also, I'd love to know if it's possible to take the 3.8.3-debian-10-r100 Dockerfile from here:
https://github.com/bitnami/bitnami-docker-rabbitmq/blob/3.8.3-debian-10-r100/3.8/debian-10/Dockerfile

and add those COPY and RUN commands to it, set the resulting image with the chart and install?

Yes, it is possible to extend the Dockerfile or just modify the one that you pointed.

@stale
Copy link

stale bot commented Jul 3, 2020

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@stale stale bot added the stale 15 days without activity label Jul 3, 2020
@stale
Copy link

stale bot commented Jul 10, 2020

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@stale stale bot closed this as completed Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale 15 days without activity
Projects
None yet
Development

No branches or pull requests

3 participants