shazChaudhry / docker-elastic

Deploy Elastic stack in a Docker Swarm cluster. Ship application logs and metrics using beats & GELF plugin to Elasticsearch
347 stars 188 forks source link

This node is not a swarm manager. Use "docker swarm init" #27

Closed patsevanton closed 5 years ago

patsevanton commented 5 years ago
docker network create --driver overlay --attachable elastic
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
curl -XGET -u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} ${ELASTICSEARCH_HOST}':9200/_cat/health?v&pretty'
<html>
  <head>
    <!-- Bootstrap -->
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <style>
      body {
        padding-top: 50px
      }
    </style>
  </head>
  <body>
  <div class="container">
      <div class="panel panel-warning">
        <div class="panel-heading">
          <h3 class="panel-title">Docker Flow Proxy: 503 Service Unavailable</h3>
        </div>
      <div class="panel-body">
        No server is available to handle this request.
      </div>
  </div>
</body>
</html>
docker swarm init
Swarm initialized: current node (fcw7n672e51e6x8o6p1v4swj4) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-4btyozhvqpc56rp1m3j37d500dmrg7x6gmoncs4qk4gre1x28c-ah0o1pmkp5nlxg12p8lfxhg7w 10.233.60.118:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

After

docker swarm join --token SWMTKN-1-4btyozhvqpc56rp1m3j37d500dmrg7x6gmoncs4qk4gre1x28c-ah0o1pmkp5nlxg12p8lfxhg7w 10.233.60.118:2377

curl -XGET -u ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD} ${ELASTICSEARCH_HOST}':9200/_cat/health?v&pretty'
epoch      timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1553232949 05:35:49  DevOps  green           1         1      8   8    0    0        0             0                  -                100.0%

May be add docker swarm join to readme?

shazChaudhry commented 5 years ago

Hi Anton,

It is expected that you already have a docker swarm cluster. Please see the assumption section.

May I suggest you try the provided vagrantfile?

shazChaudhry commented 5 years ago

Closing this ticket as this is not an issue