Rabbitmq-ha掌舵图,管理插件抛出错误

时间:2019-02-19 12:45:28

标签: kubernetes rabbitmq kubernetes-helm

我已经将rabbitmq-ha图表部署到kubernetes,然后使用kubectl端口转发来访问管理ui。我可以登录,但是在ui中看不到任何数据,某些选项卡显示错误:

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

我以以下方式部署。我有一个单一需求的图表,rabbitmq。

我运行命令

$ 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(来自github的默认设置,缩进到rabbitmq-ha

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

  ...

一切似乎都正确部署,我没有看到任何错误,我可以进入吊舱并使用rabbitmqctl,node_health_check命令成功,可以创建队列,等等。

要访问管理ui,请运行命令

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

然后访问localhost:15672并登录。

enter image description here

2 个答案:

答案 0 :(得分:0)

您使用哪个用户名登录?掌舵值定义了应用程序和管理凭据。使用管理用户登录时出现相同的错误,该用户仅具有运行状况检查等权限。您需要以访客用户身份登录

  

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

答案 1 :(得分:0)

您需要添加管理员权限,我不知道如何从图表级别进行操作,但是使用rabbitmqctl可以通过以下方式进行操作:

rabbitmqctl set_user_tags YOUR_USER administrator