Juju 服务部署不正确

Juju 服务部署不正确

向您的 MAAS 部署魅力现在您已准备好进行最激动人心的部分:向您的 MAAS 部署魅力!

juju deploy mysql MAAS 现在将为 Juju 分配一个节点,然后 Juju 将 MySQL charm 部署到该节点。同样,在安装 Ubuntu 并部署 charm 时需要几分钟才能完成。

让我们快速检查一下状态:

符咒状态一旦符咒被部署,你就会看到它反映在环境的状态中。

如果您有另一个空闲节点,您可以部署 WordPress 并将其连接到我们刚刚部署的 MySQL 服务:

juju 部署 wordpress juju 添加关系 wordpress mysql juju 公开 wordpress juju 状态

从: https://wiki.ubuntu.com/ServerTeam/MAAS/Juju

我得到了这个:

hsf@ubuntuserwer:~$ juju status
2012-10-03 12:47:16,340 INFO Connecting to environment...
Enter passphrase for key '/home/hsf/.ssh/id_rsa':
2012-10-03 12:47:19,446 INFO Connected to environment.
machines:
  0:
    agent-state: running
    dns-name: ubuntuone
    instance-id: /MAAS/api/1.0/nodes/node-5ac593cc-0c76-11e2-a143-001185e67955/
    instance-state: unknown
  1:
    agent-state: not-started
    dns-name: node-001185e677fe.local
    instance-id: /MAAS/api/1.0/nodes/node-f108eb80-0d3a-11e2-ad9f-001185e67955/
    instance-state: unknown
  2:
    agent-state: not-started
    dns-name: node-001185e6772b.local
    instance-id: /MAAS/api/1.0/nodes/node-cc14c3c8-0d42-11e2-864b-001185e67955/
    instance-state: unknown
services:
  mysql:
    charm: cs:precise/mysql-8
    relations:
      db:
      - wordpress
    units:
      mysql/1:
        agent-state: pending
        machine: 1
        public-address: null
  wordpress:
    charm: cs:precise/wordpress-9
    exposed: true
    relations:
      db:
      - mysql
      loadbalancer:
      - wordpress
    units:
      wordpress/1:
        agent-state: pending
        machine: 2
        open-ports: []
        public-address: null
2012-10-03 12:47:20,404 INFO 'status' command finished successfully

我试了几次,问题还是一样。aget-state 说机器没有启动,但实际上已经启动了。

我做错了什么?

此外,当我运行 juju debug-log 时,我得到:

hsf@ubuntuserwer:~$ juju debug-log
2012-10-03 14:04:16,661 INFO Connecting to environment...
Enter passphrase for key '/home/hsf/.ssh/id_rsa':
2012-10-03 14:04:19,264 INFO Connected to environment.
2012-10-03 14:04:19,265 INFO Enabling distributed debug log.
2012-10-03 14:04:19,269 INFO Tailing logs - Ctrl-C to stop.
2012-10-03 13:56:03,513 Machine:0: juju.agents.machine INFO: Machine agent start                                                                                        ed id:0
2012-10-03 14:03:21,113 Machine:0: twisted ERROR: Unhandled error in Deferred:
2012-10-03 14:03:21,145 Machine:0: twisted ERROR: Unhandled Error
Traceback (most recent call last):
Failure: zookeeper.NodeExistsException: node exists

答案1

成功了!我再次安装 ubuntu 服务器,这次一切顺利,但有一件事。现在当我使用 juju status 时,我看到了以下内容:

2012-10-04 13:32:21,110 INFO Connected to environment.
machines:
  0:
    agent-state: running
    dns-name: node-00127968a7be.local
    instance-id: /MAAS/api/1.0/nodes/node-ab7c5eb6-0e08-11e2-bb37-001185e67955/
    instance-state: unknown
  1:
    agent-state: running
    dns-name: node-001185e677fe
    instance-id: /MAAS/api/1.0/nodes/node-82beae92-0e09-11e2-a134-001185e67955/
    instance-state: unknown
  2:
    agent-state: running
    dns-name: node-001185e6772b.local
    instance-id: /MAAS/api/1.0/nodes/node-5c21dc18-0e0a-11e2-a134-001185e67955/
    instance-state: unknown
services:
  mysql:
    charm: cs:precise/mysql-8
    relations:
      db:
      - wordpress
    units:
      mysql/0:
        agent-state: started
        machine: 1
        public-address: node-001185e677fe.localdomain
  wordpress:
    charm: cs:precise/wordpress-9
    exposed: true
    relations:
      db:
      - mysql
      loadbalancer:
      - wordpress
    units:
      wordpress/0:
        agent-state: started
        machine: 2
        open-ports:
        - 80/tcp
        public-address: node-001185e6772b.local

公共地址似乎很奇怪,因为它是我的节点的名称。我检查了节点的路由器地址,其中有 wordpress,并在 webbrowser 上输入,但我得到了

502 错误网关 nginx/1.1.19

我不知道该怎么办。请帮帮我。

相关内容