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?

  • How to ssh from centos 6.4 into a docker container without a password?
  • Unable to provide CLASSPATH in docker?
  • How to check if docker daemon is running?
  • How to autoremove linked Docker container?
  • How stop containers run with `docker-compose run`
  • Cannot connect to postgres server in docker
  • 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 to access an docker's image file system
  • Java Development in Dockerized environment: Debugging And hot code reload
  • How to uninstall docker-engine?
  • Why does Docker run so many processes to map ports though to my application?
  • Setting environment variables when running docker in detached mode
  • Moving from Ubuntu 14.04 32 bit to Ubuntu 14.04 64 bit
  • 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.