作者热门文章
- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
docker version 1.9.1
swarm version 1.0.1
为什么要将 3 个虚拟机(桥接网络)连接到 swarm。 “docker info”显示所有节点
Status pending.
3 个主机中的 1 个是 manager,所有输出都来自该主机。我不知道去哪里找。
在运行 swarm --debug manage token://XXXXX
输出>>
*INFO[0000] Listening for HTTP addr=127.0.0.1:2375 proto=tcp
DEBU[0000] Failed to validate pending node: Cannot connect to the docker engine endpoint Addr=10.32.1.38:2375
DEBU[0000] Failed to validate pending node: Cannot connect to the docker engine endpoint Addr=10.32.1.4:2375
DEBU[0000] Failed to validate pending node: Cannot connect to the docker engine endpoint Addr=10.32.1.33:2375
然后
root@ubuntu:~# ps -ef | grep swarm
root 2158 1391 0 12:28 pts/2 00:00:00 swarm join token://xxxxxxx --addr 10.32.1.4:2375
root 2407 1213 0 13:57 pts/1 00:00:00 swarm manage token://xxxxxxx -H 0.0.0.0:4243
root 2413 1391 0 13:57 pts/2 00:00:00 grep --color=auto swarm
然后
root@ubuntu:~# swarm list token://xxxxxxxxxxx
10.32.1.4:2375
10.32.1.33:2375
10.32.1.38:2375
然后
root@ubuntu:~# ps -ef | grep docker
root 2330 1 0 12:52 ? 00:00:00 /usr/bin/docker daemon
root 2421 1391 0 14:10 pts/2 00:00:00 grep --color=auto docker
心跳排序 - 在后台运行,检查端口,名称解析,可从管理器 ping。
最佳答案
docker daemon 可以监听三种不同类型的 Socket:unix、tcp 和 fd。
默认情况下,docker daemon 只监听 unix 套接字。
如果需要远程访问Docker daemon,需要开启tcp socket。
创建docker swarm集群时,swarm manager需要远程访问swarm agent节点的docker daemon。
因此,您需要重新配置 docker daemon
vim /etc/default/docker
添加以下行:
DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"
重启docker daemon
sudo restart docker
通过这样做,可以远程访问 docker daemon。
引用资料:
关于Docker-swarm >> 无法连接到 docker 引擎端点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34810779/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!