What are the possibilities to debug a docker swarm? -


i'm trying create container's cluster using docker swarm engine , following official documentation: https://docs.docker.com/swarm/install-w-machine/. unfortunately till without success.

on documentation's step information swarm, 2 containers displayed (the ones swarm-master) instead of four. here output i'm getting:

$ docker info containers: 2 images: 7 storage driver: aufs  root dir: /mnt/sda1/var/lib/docker/aufs  backing filesystem: extfs  dirs: 11  dirperm1 supported: true execution driver: native-0.2 logging driver: json-file kernel version: 4.0.5-boot2docker operating system: boot2docker 1.7.0 (tcl 6.3); master : 7960f90 - thu jun 18     18:31:45 utc 2015 cpus: 1 total memory: 996.2 mib name: swarm-master id: m4z4:6zbe:lv53:nhs3:7ct6:hnwm:glq4:5wpy:3czr:hvaz:gpp2:g7i3 debug mode (server): true file descriptors: 20 goroutines: 33 system time: 2015-06-29t15:36:40.543771252z eventslisteners: 0 init sha1: init path: /usr/local/bin/docker docker root dir: /mnt/sda1/var/lib/docker labels:  provider=virtualbox 

the current docker machines are:

$ docker-machine ls local                     virtualbox   running   tcp://192.168.99.100:2376 swarm-agent-00            virtualbox   running   tcp://192.168.99.102:2376       swarm-master swarm-agent-01            virtualbox   running   tcp://192.168.99.103:2376       swarm-master swarm-master     *        virtualbox   running   tcp://192.168.99.101:2376       swarm-master (master) 

are there possibilities debug swarm machines find eventual wrong configurations ?

i found out there docker swarm instance running within docker host. connection established docker host , not swarm instance within it. flag "--swarm" key reach swarm instance, , missing in case.

here command check environment variables of docker host:

 $ docker-machine env swarm-master  export docker_tls_verify="1"  export docker_host="tcp://192.168.99.100:2376"  export docker_cert_path="/home/bksoft/.docker/machine/machines/swarm-master"  export docker_machine_name="swarm-master"  # run command configure shell:  # eval "$(docker-machine env swarm-master)" 

and command check docker swarm instance:

 $ docker-machine env --swarm swarm-master  export docker_tls_verify="1"  export docker_host="tcp://192.168.99.100:3376"  export docker_cert_path="/home/bksoft/.docker/machine/machines/swarm-master"  export docker_machine_name="swarm-master"  # run command configure shell:  # eval "$(docker-machine env swarm-master)" 

man recognize different exposed ports "2376" , "3376".

now output of docker info shows expected:

$ docker info containers: 5 images: 3 role: primary strategy: spread filters: affinity, health, constraint, port, dependency nodes: 3  swarm-agent-00: 192.168.99.101:2376   â containers: 1   â reserved cpus: 0 / 1   â reserved memory: 0 b / 1.022 gib   â labels: executiondriver=native-0.2, kernelversion=4.0.5-boot2docker,     operatingsystem=boot2docker 1.7.0 (tcl 6.3); master : 7960f90 - thu jun 18     18:31:45 utc 2015, provider=virtualbox, storagedriver=aufs  swarm-agent-01: 192.168.99.102:2376   â containers: 1   â reserved cpus: 0 / 1   â reserved memory: 0 b / 1.022 gib   â labels: executiondriver=native-0.2, kernelversion=4.0.5-boot2docker,     operatingsystem=boot2docker 1.7.0 (tcl 6.3); master : 7960f90 - thu jun 18     18:31:45 utc 2015, provider=virtualbox, storagedriver=aufs  swarm-master: 192.168.99.100:2376   â containers: 3   â reserved cpus: 0 / 1   â reserved memory: 0 b / 1.022 gib   â labels: executiondriver=native-0.2, kernelversion=4.0.5-boot2docker,     operatingsystem=boot2docker 1.7.0 (tcl 6.3); master : 7960f90 - thu jun 18     18:31:45 utc 2015, provider=virtualbox, storagedriver=aufs cpus: 3 total memory: 3.065 gib 

also output of virtual machines different. no asterisk displayed point current active machine:

$ docker-machine ls name             active   driver       state     url                             swarm swarm-agent-00            virtualbox   running   tcp://192.168.99.101:2376       swarm-master swarm-agent-01            virtualbox   running   tcp://192.168.99.102:2376       swarm-master swarm-master              virtualbox   running   tcp://192.168.99.100:2376       swarm-master (master) 

hope may else.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -