Почему Juju не может развернуть мой защищенный кластер MongoDB?

Я пытаюсь развернуть защищенный кластер MongoDB в Amazon EC2, используя указания в http://manage.jujucharms.com/charms/precise/mongodb .

Однако (и я пробовал это три раза), мой модуль Монгос всегда терпит неудачу, с информацией о состоянии агента:

hook failed: "mongos-relation-changed"

Вот вывод статуса juju:

environment: amazon
machines:
  "0":
    agent-state: started
    agent-version: 1.16.6
    dns-name: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
    instance-id: i-e36159c2
    instance-state: running
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
  "1":
    agent-state: started
    agent-version: 1.16.6
    dns-name: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
    instance-id: i-b7645c96
    instance-state: running
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
  "2":
    agent-state: started
    agent-version: 1.16.6
    dns-name: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
    instance-id: i-d5645cf4
    instance-state: running
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
  "3":
    agent-state: started
    agent-version: 1.16.6
    dns-name: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
    instance-id: i-98665eb9
    instance-state: running
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
  "4":
    agent-state: started
    agent-version: 1.16.6
    dns-name: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
    instance-id: i-fa645cdb
    instance-state: running
    series: precise
    hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
services:
  configsvr:
    charm: cs:precise/mongodb-26
    exposed: false
    relations:
      configsvr:
      - mongos
      replica-set:
      - configsvr
    units:
      configsvr/0:
        agent-state: started
        agent-version: 1.16.6
        machine: "1"
        open-ports:
        - 27017/tcp
        - 27019/tcp
        - 27021/tcp
        - 28017/tcp
        - 28019/tcp
        public-address: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
  mongos:
    charm: cs:precise/mongodb-26
    exposed: true
    relations:
      mongos:
      - shard1
      - shard2
      mongos-cfg:
      - configsvr
      replica-set:
      - mongos
    units:
      mongos/0:
        agent-state: error
        agent-state-info: 'hook failed: "mongos-relation-changed"'
        agent-version: 1.16.6
        machine: "2"
        open-ports:
        - 27017/tcp
        - 27019/tcp
        - 28017/tcp
        public-address: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
  shard1:
    charm: cs:precise/mongodb-26
    exposed: true
    relations:
      database:
      - mongos
      replica-set:
      - shard1
    units:
      shard1/0:
        agent-state: started
        agent-version: 1.16.6
        machine: "3"
        open-ports:
        - 27017/tcp
        - 27019/tcp
        - 27021/tcp
        - 28017/tcp
        public-address: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com
  shard2:
    charm: cs:precise/mongodb-26
    exposed: true
    relations:
      database:
      - mongos
      replica-set:
      - shard2
    units:
      shard2/0:
        agent-state: started
        agent-version: 1.16.6
        machine: "4"
        open-ports:
        - 27017/tcp
        - 27019/tcp
        - 27021/tcp
        - 28017/tcp
        public-address: ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com

Вот вывод из tail /var/log/juju/unit-mongos-0.log на mongos / 0:

2014-03-05 19:59:44 INFO worker.uniter.jujuc server.go:108 running hook tool "juju-log" ["mongos_relation_change: undefined rel_type: None"]
2014-03-05 19:59:44 DEBUG worker.uniter.jujuc server.go:109 hook context id "mongos/0:mongos-cfg-relation-changed:7095643384867257998"; dir "/var/lib/juju/agents/unit-mongos-0/charm"
2014-03-05 19:59:44 INFO juju juju-log.go:66 mongos/0 mongos-cfg:5: mongos_relation_change: undefined rel_type: None
2014-03-05 19:59:45 ERROR juju.worker.uniter uniter.go:350 hook failed: exit status 1
2014-03-05 19:59:45 DEBUG juju.worker.uniter modes.go:423 ModeAbide exiting
2014-03-05 19:59:45 INFO juju.worker.uniter modes.go:421 ModeHookError starting
2014-03-05 19:59:45 DEBUG juju.worker.uniter.filter filter.go:418 want resolved event
2014-03-05 19:59:45 DEBUG juju.worker.uniter.filter filter.go:412 want forced upgrade true
2014-03-05 19:59:45 DEBUG juju.worker.uniter.filter filter.go:523 no new charm event
2014-03-05 20:06:32 DEBUG juju.worker.uniter.filter filter.go:338 got relations change

Что происходит? Как это исправить?

Обходной путь в порядке:)

0
задан 15.05.2020, 05:54

1 ответ

Первый запуск к отладке отказа как это должен смотреть на журналы единицы. Сделать это:

juju ssh mongos/0

cd /var/log/juju

, Если ошибка/решение не очевидна, не стесняются обновлять Ваш вопрос с журналами единицы.

0
ответ дан 15.05.2020, 05:54

Теги

Похожие вопросы