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?

  • Access container environment variables in inline run command
  • How to debug a rails app in docker with pry?
  • Docker - Override or remove ENTRYPOINT from a base image
  • How to use Docker in the development/deployment workflow?
  • Cant get AngularJS site running in Docker Container
  • Wget numeric pattern in Dockerfile
  • 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
    

  • Can I schedule Docker to run on specific time on Amazon ECS?
  • Image Search Docker Private Registry 2
  • How to view Docker image layers on Docker Hub?
  • Consul agent are still marked as in critical state after terminating whole instance
  • Docker with hypervisor
  • How do I build docker images when my development environment mounts my codebase into the container?
  • 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.