Docker Download Image report Net/http:tls handshake timeout

Source: Internet
Author: User
Tags docker ps docker run

Problem Description:

Using the command yum-y install Docker installed on the CENTOS7 system, when downloading the image is very slow, the last mirror download failed, and reported "Net/http:tls Handshake Timeout" error:

[[email protected] ~]# Docker run-d--restart=unless-stopped-p 8080:8080-p 9345:9345 rancher/server:stable-- Db-host 10.0.0.101--db-port 3306--db-user rancher--db-pass rancher--db-name rancher--advertise-address 10.0.0.10 3Unable to find image ' rancher/server:stable ' locallytrying-to-pull repository docker.io/rancher/server ... Stable:pullin G from docker.io/rancher/serverbae382666908:pulling FS layer 29ede3c02ff2:pulling FS layer da4e69f33106:pulling FS Laye R 8d43e5f5d27f:waiting b0de1abb17d6:waiting 422f47db4517:waiting 79d37de643ce:waiting 69d13e08a4fe:waiting 2ddfd3c6a 2b7:waiting bc433fed3823:waiting b82e188df556:waiting dae2802428a4:waiting a6247572ea3c:waiting 884c916ebae4:waitin G 85517c9c5365:waiting 02dded9fe690:waiting fd9f433c3bc6:waiting 44d91b3fea45:waiting 0d463387dfeb:waiting 60753c4d2 6f0:waiting A003892966fe:waiting/usr/bin/docker-current:error pulling Image configuration:get Https://dseasb33srnrn . cloudfront.net/registry-v2/dOcker/registry/v2/blobs/sha256/d6/d63b9b4bd2059242e826eaf0cbc879d5728a82cb6ddcd9dcd844bb9257f3fd0a/data? expires=1521809033&signature=jbuzpxx14~-i6-mnzbmr5d4at3su~0tszpc8dhni45orrxk8dlxzk-au3azk~ J-phdxj3q6w7w9y6-wfu8m36frxfdzc8xwwze-kvztzg8mcjc~vabpiq8rqasxuk9iieiktfyoc4mut2n~lwm34dguooygyueeivwisvxu8uus _&key-pair-id=apkajech5m7vwis5yz6q:net/http:tls handshake Timeout. See '/usr/bin/docker-current run--help '.  [[email protected] ~]#
Cause Analysis:

Docker default image pull address for foreign warehouse download slow, will error "Net/http:tls handshake timeout".
At this point, you only need to change the pull address to the domestic mirror warehouse.

Resolution process:

Add "--registry-mirror=https://fzhifedh.mirror.aliyuncs.com" to the options in the Docker configuration file/etc/sysconfig/docke

[[email protected] ~]# vim /etc/sysconfig/docker# /etc/sysconfig/docker# Modify these options if you want to change the way the docker daemon runs#OPTIONS=‘--selinux-enabled --log-driver=journald --signature-verification=false‘OPTIONS=‘--selinux-enabled --log-driver=journald --signature-verification=false --registry-mirror=https://fzhifedh.mirror.aliyuncs.com ‘    #换默认源地址#DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io"if [ -z "${DOCKER_CERT_PATH}" ]; then    DOCKER_CERT_PATH=/etc/dockerfi# Do not add registries in this file anymore. Use /etc/containers/registries.conf# from the atomic-registries package.#

Then re-download the image, fast, and normal:

[[email protected] ~]# docker ps -aCONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS              PORTS                                                      NAMES6e3e55edcc21        rancher/server:stable   "/usr/bin/entry --..."   9 minutes ago       Up 9 minutes        3306/tcp, 0.0.0.0:9345->9345/tcp, 0.0.0.0:8080->8080/tcp   flamboyant_haibt[[email protected] ~]#

Docker Download Image report Net/http:tls handshake timeout

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.