Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
docker容器内没有http/https连接_Docker - Fatal编程技术网

docker容器内没有http/https连接

docker容器内没有http/https连接,docker,Docker,我对主机运行docker容器有问题。docker升级至17.09 ce后,docker容器内的连接中断: root@21a3edc71e4e:/# apt-get update Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease Ign:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease 0% [Waiting for headers]^C

我对主机运行docker容器有问题。docker升级至17.09 ce后,docker容器内的连接中断:

root@21a3edc71e4e:/# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
0% [Waiting for headers]^C              




 wget http://..../media/cache/8b/44/thumb3_HP_Color_LaserJet_Pro_M252dw.jpg
--2017-11-29 11:18:31--  http://www...../media/cache/8b/44/thumb3_HP_Color_LaserJet_Pro_M252dw.jpg
Resolving www.toner1.bg (www.toner1.bg)... 91.215.216.25
Connecting to www.toner1.bg (www.toner1.bg)|91.215.216.25|:80... connected.
HTTP request sent, awaiting response... ^C
Ping正在工作,但是DNS和DNS正常:

root@21a3edc71e4e:/# ping dir.bg
PING dir.bg (194.145.63.12): 56 data bytes
64 bytes from 194.145.63.12: icmp_seq=0 ttl=53 time=35.621 ms
64 bytes from 194.145.63.12: icmp_seq=1 ttl=53 time=35.674 m
码头工人信息:

docker info
Containers: 12
 Running: 0
 Paused: 0
 Stopped: 12
Images: 6
Server Version: 17.09.0-ce
Storage Driver: devicemapper
 Pool Name: docker-253:1-1039697-pool
 Pool Blocksize: 65.54kB
 Base Device Size: 10.74GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 7.693GB
 Data Space Total: 107.4GB
 Data Space Available: 20.39GB
 Metadata Space Used: 6.316MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.141GB
 Thin Pool Minimum Free Space: 10.74GB
 Udev Sync Supported: true
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: true
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.110 (2015-10-30)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.4.0-101-generic
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.859GiB
Name: bamboo-builder-20-shared
ID: TV3Q:SEG5:YVQP:2BWO:UDH6:MR27:RSCZ:N5B7:EK7P:NFW5:7F3D:CRBZ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
         Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
WARNING: No swap limit support
我正在运行Ubuntu 16.04 iptables:

iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
DOCKER     all  --  anywhere             anywhere             ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
DOCKER     all  --  anywhere            !loopback/8           ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  172.17.0.0/16        anywhere            

Chain DOCKER (2 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere  
ufw处于非活动状态 我已经重新安装了docker ce,问题仍然存在。
有什么建议吗?

我通过向主机添加以下内容解决了问题:

iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

但是不确定为什么需要这样做。

我已通过向主机添加以下内容解决了此问题:

iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

不知道为什么需要这样做。

非常感谢!这是唯一的解决方案,为你工作这么多!这是唯一对我有效的解决方案