3
votes

I have deployed the rabbitmq-ha chart to kubernetes, then used kubectl port-forwarding to access the management ui. I can log in, but I dont see any data in the ui, some tabs are showing the error:

TypeError: Cannot read property 'name' of undefined TypeError: Cannot read property 'name' of undefined at Array.process (eval at compile (http://localhost:15672/js/ejs-1.0.min.js:1:6654), :100:139) at EJS.render (http://localhost:15672/js/ejs-1.0.min.js:1:1885) at format (http://localhost:15672/js/main.js:1086:21) at http://localhost:15672/js/main.js:444:24 at with_reqs (http://localhost:15672/js/main.js:1068:9) at http://localhost:15672/js/main.js:1064:17 at XMLHttpRequest.req.onreadystatechange (http://localhost:15672/js/main.js:1144:17)

https://github.com/helm/charts/tree/master/stable/rabbitmq-ha

I have deployed in the following way. I have a chart with a single requirement, rabbitmq.

I run the commands

$ helm dependency build ./rabbitmq
$ helm template --namespace rabbitmq-test --name rabbitmq-test . --output-dir ./output
$ kubectl apply -n rabbitmq-test -Rf ./output

/rabbitmq/Chart.yaml

apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: rabbitmq-ha
version: 0.1.0

/rabbitmq/requirements.yaml

dependencies:
  - name: rabbitmq-ha
    version: 1.19.0
    repository: https://kubernetes-charts.storage.googleapis.com

/rabbitmq/values.yaml (default settings from github, indented under rabbitmq-ha

rabbitmq-ha: 
  ## RabbitMQ application credentials
  ## Ref: http://rabbitmq.com/access-control.html
  ##
  rabbitmqUsername: guest
  # rabbitmqPassword:

  ...

Everything appears to deploy correctly, I see no errors, I can enter the pod and use rabbitmqctl, the node_health_check command is successful, I can create queues etc.

To access management ui I run the command

kubectl port-forward -n rabbitmq-test rabbitmq-test-rabbitmq-ha-0 15672:15672

Then visit localhost:15672 and log in.

enter image description here

2
What does the javascript console of your browser show? How about the network tracing? I'd be curious to see if any HTTP requests come back as 404 or other errors.Luke Bakken

2 Answers

3
votes

Which username are you logging in with? The helm values define application and management credentials. I had the same errors when logging in using the management user, that user only has permission for health checks etc. You need to login with the guest user

charts/values.yaml

## RabbitMQ application credentials
## Ref: http://rabbitmq.com/access-control.html
##
rabbitmqUsername: guest
# rabbitmqPassword:

## RabbitMQ Management user used for health checks
managementUsername: management
managementPassword: E9R3fjZm4ejFkVFE
0
votes

You need to add administrator permissions, I don't know how to do it from chart level but with rabbitmqctl you can do it in that way:

rabbitmqctl set_user_tags YOUR_USER administrator