无法从一个主机到另一个主机的容器

时间:2017-05-03 18:35:12

标签: docker-swarm

我阅读了相关问题,但没有一个与我的问题完全吻合。但是,我的问题非常接近this one,但解决方案并不重要,因为我的配置与解决方案中详述的配置相符。

我在Swarm集群中集成了3个节点(VM),其中包含一个管理器。创建覆盖网络并将容器作为附加到此网络的服务启动后,来自一个主机的容器无法访问在其他主机上运行的容器。

注1:docker inspect <network>仅显示当前主机上运行的容器。

注2:pingcurl都适用于当前主机上运行的容器IP。

注意3:如果没有放入特定的网络,可以从evrywhere访问容器,我可以ping docker 172.17.0子网中的所有容器IP。它仍然无法在覆盖网络中工作。

请在下面找到常用信息,谢谢你的帮助。

root@docker-swarm-3:~# docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:10:56 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:10:56 2017
 OS/Arch:      linux/amd64
 Experimental: false


root@docker-swarm-3:~# docker info
Containers: 2
 Running: 2
 Paused: 0
 Stopped: 0
Images: 11
Server Version: 17.03.1-ce
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 61
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: active
 NodeID: jcpjbp5x7uxff4drjxgwg78w6
 Is Manager: true
 ClusterID: uegeaoike0nha4ic1wloidzsj
 Managers: 1
 Nodes: 3
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
 Node Address: 192.168.0.103
 Manager Addresses:
  192.168.0.103:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 4ab9917febca54791c5f071a9d1f404867857fcc
runc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
init version: 949e6fa
Kernel Version: 3.16.0-0.bpo.4-amd64
Operating System: Debian GNU/Linux 7 (wheezy)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 9.787 GiB
Name: docker-swarm-3
ID: GWKU:AR4H:TSS2:C7VX:X4LT:MPNW:GMPY:4H26:7OAA:7QE6:7TIF:ZD5K
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

0 个答案:

没有答案