Hi,
I use the rancher to build a docker swarm environment。The infrastructure list is as follows:
one rancher:stable and Three centos7 virtual machines with docker 1.13.1.
I added the host to the environment, but when the host was added, the swarmkit container never started properly. The error log for the swarmkit container is as follows:
Metadata not ready 2017-6-1 14:55:51Metadata not ready 2017-6-1 14:55:57Metadata not ready 2017-6-1 14:56:03Metadata not ready 2017-6-1 14:56:09Metadata not ready 2017-6-1 14:56:12time="2017-06-01T06:56:12Z" level=info msg="Listening on port: 2378" 2017-6-1 14:56:12+ docker swarm init --advertise-addr 172.16.187.191:2377 2017-6-1 14:56:13Swarm initialized: current node (5vi5l60pgjx16axvrbqj4rabr) is now a manager. 2017-6-1 14:56:13 2017-6-1 14:56:13+ set +x 2017-6-1 14:56:13To add a worker to this swarm, run the following command: 2017-6-1 14:56:13 2017-6-1 14:56:13 docker swarm join \ 2017-6-1 14:56:13 --token SWMTKN-1-20jd6ke0lxlyz7vh8c1p7pc6yz2wbfd6t3vg2hy0n4gzvfv0jw-750l5jegc48v0omvuimr9qsnw \ 2017-6-1 14:56:13 172.16.187.191:2377 2017-6-1 14:56:13 2017-6-1 14:56:13To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions. 2017-6-1 14:56:13 2017-6-1 14:56:14Set swarm join-tokens 2017-6-1 14:56:14Set host label swarm=manager 2017-6-1 14:56:44Error response from daemon: rpc error: code = 9 desc = attempting to demote the last manager of the swarm 2017-6-1 14:56:44Error response from daemon: rpc error: code = 9 desc = node 5vi5l60pgjx16axvrbqj4rabr is a cluster manager and is a member of the raft cluster. It must be demoted to worker before removal 2017-6-1 14:56:44Removed 5vi5l60pgjx16axvrbqj4rabr from the swarm. 2017-6-1 14:56:441 of 1 manager(s) reachable, 0 worker(s) active 2017-6-1 14:56:44No active workers present for promotion, add more nodes to enable reconciliation. 2017-6-1 14:57:15Error response from daemon: rpc error: code = 9 desc = attempting to demote the last manager of the swarm 2017-6-1 14:57:15Error response from daemon: rpc error: code = 9 desc = node 5vi5l60pgjx16axvrbqj4rabr is a cluster manager and is a member of the raft cluster. It must be demoted to worker before removal 2017-6-1 14:57:15Removed 5vi5l60pgjx16axvrbqj4rabr from the swarm. 2017-6-1 14:57:151 of 1 manager(s) reachable, 0 worker(s) active 2017-6-1 14:57:15No active workers present for promotion, add more nodes to enable reconciliation. 2017-6-1 14:57:45Error response from daemon: rpc error: code = 9 desc = attempting to demote the last manager of the swarm 2017-6-1 14:57:45Error response from daemon: rpc error: code = 9 desc = node 5vi5l60pgjx16axvrbqj4rabr is a cluster manager and is a member of the raft cluster. It must be demoted to worker before removal 2017-6-1 14:57:45Removed 5vi5l60pgjx16axvrbqj4rabr from the swarm. 2017-6-1 14:57:451 of 1 manager(s) reachable, 0 worker(s) active 2017-6-1 14:57:45No active workers present for promotion, add more nodes to enable reconciliation. 2017-6-1 14:58:15Error response from daemon: rpc error: code = 9 desc = attempting to demote the last manager of the swarm 2017-6-1 14:58:15Error response from daemon: rpc error: code = 9 desc = node 5vi5l60pgjx16axvrbqj4rabr is a cluster manager and is a member of the raft cluster. It must be demoted to worker before removal 2017-6-1 14:58:15Removed 5vi5l60pgjx16axvrbqj4rabr from the swarm. 2017-6-1 14:58:151 of 1 manager(s) reachable, 0 worker(s) active 2017-6-1 14:58:15No active workers present for promotion, add more nodes to enable reconciliation. 2017-6-1 14:58:45Error response from daemon: rpc error: code = 9 desc = attempting to demote the last manager of the swarm 2017-6-1 14:58:45Error response from daemon: rpc error: code = 9 desc = node 5vi5l60pgjx16axvrbqj4rabr is a cluster manager and is a member of the raft cluster. It must be demoted to worker before removal 2017-6-1 14:58:45Removed 5vi5l60pgjx16axvrbqj4rabr from the swarm. 2017-6-1 14:58:451 of 1 manager(s) reachable, 0 worker(s) active 2017-6-1 14:58:45No active workers present for promotion, add more nodes to enable reconciliation. 2017-6-1 14:59:16Error response from daemon: rpc error: code = 9 desc = attempting to demote the last manager of the swarm 2017-6-1 14:59:16Error response from daemon: rpc error: code = 9 desc = node 5vi5l60pgjx16axvrbqj4rabr is a cluster manager and is a member of the raft cluster. It must be demoted to worker before removal 2017-6-1 14:59:16Removed 5vi5l60pgjx16axvrbqj4rabr from the swarm. 2017-6-1 14:59:161 of 1 manager(s) reachable, 0 worker(s) active 2017-6-1 14:59:16No active workers present for promotion, add more nodes to enable reconciliation. 2017-6-1 14:59:46Manager 5vi5l60pgjx16axvrbqj4rabr demoted in the swarm. 2017-6-1 14:59:46Removed 5vi5l60pgjx16axvrbqj4rabr from the swarm. 2017-6-1 14:59:46Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager. 2017-6-1 14:59:46Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager. 2017-6-1 14:59:46Error response from daemon: This node is not a swarm manager. Worker nodes can't be used to view or modify cluster state. Please run this command on a manager node or promote the current node to a manager. 2017-6-1 14:59:46Removed 5vi5l60pgjx16axvrbqj4rabr from the swarm. 2017-6-1 14:59:46jq: error (at <stdin>:1): Cannot index string with string "Spec" 2017-6-1 14:59:46jq: error (at <stdin>:1): Cannot index string with string "Spec" 2017-6-1 14:59:46jq: error (at <stdin>:1): Cannot index string with string "Spec" 2017-6-1 14:59:46/opt/rancher/run.sh: line 245: + : syntax error: operand expected (error token is "+ ") 2017-6-1 14:59:47time="2017-06-01T06:59:47Z" level=info msg="Listening on port: 2378" 2017-6-1 14:59:47jq: error (at <stdin>:1): Cannot index string with string "Description" 2017-6-1 14:59:48jq: error (at <stdin>:1): Cannot index string with string "Spec" 2017-6-1 14:59:48jq: error (at <stdin>:1): Cannot index string with string "Spec" 2017-6-1 14:59:48jq: error (at <stdin>:1): Cannot index string with string "Spec" 2017-6-1 14:59:48/opt/rancher/run.sh: line 245: + : syntax error: operand expected (error token is "+ ")
I tried using docker 17.0.5 and 1.12.6 versions of docker on centos7, but it was the same
I tried using docker 17.0.3 on ubuntu 16.0.4, it is successful.
can you help me?