Closed fmarmori closed 8 years ago
@fmarmori We included better node management in swarm:master
so that nodes are being marked as unhealthy rather than not being registered at all. Thus you can see those nodes on docker info
at the pending
state waiting for validation.
So if the Manager can't connect to the Swarm node, It'll still register this node and output the error message to help debugging connectivity issues like the one you described.
I'm guessing that this is what you're looking for but let me know if I missed an important detail :smile:
@abronan Thank you for the quick feedback.
I fully understand the purpose. However, in my installation I can't get any state information about the nodes from the master, this is the output of the master docker info
Containers: 0
Images: 0
Role: primary
Strategy: spread
Filters: health, port, dependency, affinity, constraint
Nodes: 0
CPUs: 0
Total Memory: 0 B
Name: 80f9c8ac62e
I can also add that going back to version 1.0.0 do not solve the issue.
Did you try with swarm 1.0.1
or swarm:master
building the latest binary? It was just included so maybe you had a wrong build?
/cc @dongluochen Any idea?
Make sure you pull the latest swarm Image: dockerswarm:master
, or build the latest binary. If this still persists with master could you please provide the full output of swarm manage
with the --debug
flag? That would be helpful. Thanks!
@fmarmori I want to clarify how you start your swarm join on node02. Can you show your command? I see port mapping 0.0.0.0:2375->2375/tcp
which doesn't look right here. Swarm join doesn't need to open host TCP port. It just registers docker daemon's service endpoint to your consul. What is docker daemon's TCP port? Make sure --advertise
equals to node02_ip:daemon_port.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
132ea657481e swarm "/swarm join --advert" 26 minutes ago Up 26 minutes 0.0.0.0:2375->2375/tcp swarm
@dongluochen I think the mapping is required since I'm testing a multi-host deployment. Here is the full docker run command of one of my nodes:
docker run -d -p 2375:2375 swarm join --advertise=192.168.100.11:2375 consul://192.168.100.10:8500/swarm
@fmarmori This doesn't look right. Swarm join
only registers your docker daemon to consul. On node02 there should be 2 processes. The first one runs docker daemon where you can access it from external with docker -H node02:docker_port info
. The second process runs swarm join which registers node02:docker_port
to consul. I don't think port 2375 is your docker daemon port, otherwise your command docker run -d -p 2375:2375 swarm join --advertise=192.168.100.11:2375 consul://192.168.100.10:8500/swarm
should fail because port 2375 is used by docker daemon. Please run docker -H node02:2375 info
to validate.
@dongluochen Thanks for the hint. I found the issue. Actually my docker vhosts where listening only on the unix socket. I had to fix it in the /etc/default/docker
file, by adding an additional -H tcp://<node-ip>:2375
. Thanks for your support guys.
Swarm (v1.0.1) nodes are not listening as supposed on port :2375.
In consul everything is fine. The join process boots correctly (no errors), but the manager just fail to connect... for obvious reasons. Here is the output of the manager: