GitLab CI ERROR: Preparation failed: Post https…docker%3Adind: net/http: timeout awaiting response headers

Error thrown by GitLab CI since past hour, Not able to proceed. .gitlab-ci.yml is not changed and very simple (as shown in end).

Only Dockerfile is changed – but system is not event launching Dockerfile. What is the remedy?

  • Deploying new versions of an image instantly
  • How the docker git repo is showing different tags in pull requests like status/need-review
  • Docker Shipyard - deploying a container to a specific node
  • Visual Studio Team Service fails Task Docker Build
  • Hadoop and Docker
  • docker flannel subnet issues
  • ERROR LOG

    Running with gitlab-ci-multi-runner 1.9.0 (82714ae)
    Using Docker executor with image docker:latest ...
    Pulling docker image docker:dind ...
    ERROR: Preparation failed: Post https://67.205.149.124:2376/v1.18/images/create?fromImage=docker%3Adind: net/http: timeout awaiting response headers
    Will be retried in 3s ...
    Using Docker executor with image docker:latest ...
    Pulling docker image docker:dind ...
    ERROR: Preparation failed: Post https://67.205.141.137:2376/v1.18/images/create?fromImage=docker%3Adind: net/http: timeout awaiting response headers
    Will be retried in 3s ...
    Using Docker executor with image docker:latest ...
    Pulling docker image docker:dind ...
    ERROR: Preparation failed: Post https://192.241.149.44:2376/v1.18/images/create?fromImage=docker%3Adind: net/http: timeout awaiting response headers
    Will be retried in 3s ...
    ERROR: Build failed (system failure): Post https://192.241.149.44:2376/v1.18/images/create?fromImage=docker%3Adind: net/http: timeout awaiting response headers
    

    .gitlab-ci.yml

    image: docker:latest
    
    services:
      - docker:dind
    
    stages:
      - build
    
    variables:
      NAMEBRAN: registry.gitlab.com/myusername/project:$CI_BUILD_REF_NAME
      NAMELAST: registry.gitlab.com/myusername/project:latest
    
    build_image:
        stage: build
        script:
    
    #LOGIN     
        - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
    
    #BUILD [NEEDS PUSH TO NAME] WITH NAME = $NAMEBRAN
        - docker build -t $NAMEBRAN .
        - docker push $NAMEBRAN
    
    #TAG $NAMEBRAN as $NAMELAST
        - docker pull $NAMEBRAN
        - docker tag $NAMEBRAN $NAMELAST
        - docker push $NAMELAST   
    
        only:
        - dockerbranch
    

  • How do I reload haproxy.cfg on the default Dockerfile?
  • How many containers should exist per host in production? How should services be split?
  • Pushing Dockerfile or docker-compose to heroku
  • Whenever gem 'failed to load command: rake'
  • How to RUN plenv/rbenv in Dockerfile?
  • How to uninstall Docker completely from a Mac?
  • 2 Solutions collect form web for “GitLab CI ERROR: Preparation failed: Post https…docker%3Adind: net/http: timeout awaiting response headers”

    Started working without any modifications, Maybe internally gitlab server was overloaded hence timeout error.

    67.205.149 is a DigitalOcean IP address.
    DigitalOcean status is green, so it is not directly linked to the platform itself.
    And this does not seem to be a GitLab-CI gitlab-workhorse router issue.

    So check the state of the Docker registry hosted on that DigitalOcean instance used by GitLab: it (the docker registry) might be down (even though GitLab Status does not mention it).
    The OP confirms it is the case.

    Or use a built-in GitLab Docker registry of a private instance.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.