Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker image fetching issue faced #252

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

docker image fetching issue faced #252

wants to merge 3 commits into from

Conversation

yousafkhamza
Copy link

I just resolved the issue with those 2 lines under your compose file
CONCOURSE_GARDEN_DNS_PROXY_ENABLE=true CONCOURSE_WORKER_GARDEN_DNS_PROXY_ENABLE=true

@cyrilou242
Copy link

Had the same problem: image pulling did not work:

initializing
initializing check: image
selected worker: 0dc9a7447888
failed to ping registry: 2 error(s) occurred:

* ping https: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
* ping http: Get "http://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

The proposed fix worked for me. Thanks @yousafkhamza.

@norman-abramovitz
Copy link
Contributor

Discovered what is going on.

In concourse 7.3.X releases and earlier the docker image included the PROXY environment variables. Starting in the 7.4.X and later releases they removed those lines from the docker image. I looked at the concourse 7.4.0 release notes and nothing sticks out to me why this change was made.

I will add something to the tutorial to cover this case after some more research so I can explain why you might need those lines.

@norman-abramovitz
Copy link
Contributor

I believe these lines were removed when they decided to start integrating in the new container orchestration code Guardian.

@JasonTheMain
Copy link

I Had some success with fixing this on my windows subsystem Linux environment by changing the DNS of my docker after i followed this stackoverflowers advice https://stackoverflow.com/questions/48056365/error-get-https-registry-1-docker-io-v2-net-http-request-canceled-while-b. If anyone has a windows issue in the future this is a good option if you don't want to fix it using the concourse fix

@devopslearn21
Copy link

cant not login in to docker hub from linux machine.

error response from daemon: get "https://registry-1.docker.io/v2/": context deadline exceeded (client.timeout exceeded while awaiting headers) is coming.

already docker hub login success in website. But not connecting through linux command

@petatemarvin26
Copy link

petatemarvin26 commented Nov 15, 2022

cant not login in to docker hub from linux machine.

error response from daemon: get "https://registry-1.docker.io/v2/": context deadline exceeded (client.timeout exceeded while awaiting headers) is coming.

already docker hub login success in website. But not connecting through linux command

Hi there! I am try to explore inbound and outbound traffics into its deeper architecture that possible in VPC, by the way I notice this situation when I specify the outbound rules of the machine, that the only traffic the machine should to use is what you have specified tcp/ip:port, to address this issue you may put entire tcp/ip:port translation to like 0.0.0.0/0 or if you know the tcp/ip:port of docker hub,

but if I remember I resolve that issue when I put entire tcp/ip:port at outbound traffic of the machine, which had a sense since we are using docker hub from your machine

@mattwelke
Copy link

mattwelke commented Feb 8, 2023

I think I'm running into this error today when I started the tutorial.

The first time I ran the execute command, I got this error after waiting a long time:

> fly -t tutorial execute -c task_hello_world.yml
executing build 1 at http://127.0.0.1:8080/builds/1
initializing
initializing check: image
selected worker: 2c7f8c70416f
failed to ping registry: 2 error(s) occurred:

* ping https: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
* ping http: Get "http://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
image check failed
errored

Then, I tried it again but looked at the logs from the Concourse container in Docker Compose while I did it. I saw errors in the logs:

concourse-tutorial-concourse-1     | {"timestamp":"2023-02-08T20:28:02.326848892Z","level":"info","source":"atc","message":"atc.tracker.notify.run.errored","data":{"build":"2","build_id":2,"error":"run check: 1 error occurred:\n\t* context canceled\n\n","session":"26.3.2","team":"main"}}

And so I cancelled the execute:

> fly -t tutorial execute -c task_hello_world.yml
executing build 2 at http://127.0.0.1:8080/builds/2
initializing
initializing check: image
selected worker: c7a465c646bd
^C
aborting...
interrupted
interrupted
aborted

The workaround here where the two environment variables are added to my docker-compose.yml file didn't help. I ran docker compose down, then ran docker compose up, then tried it again, and got the same result. Now, my docker-compose.yml file looks like this:

---
version: "3"

services:
  concourse-db:
    image: postgres
    environment:
      - POSTGRES_DB=concourse
      - POSTGRES_PASSWORD=concourse_pass
      - POSTGRES_USER=concourse_user
      - PGDATA=/database

  concourse:
    image: concourse/concourse
    command: quickstart
    privileged: true
    depends_on: [concourse-db]
    ports: ["8080:8080"]
    environment:
      - CONCOURSE_POSTGRES_HOST=concourse-db
      - CONCOURSE_POSTGRES_USER=concourse_user
      - CONCOURSE_POSTGRES_PASSWORD=concourse_pass
      - CONCOURSE_POSTGRES_DATABASE=concourse
      - CONCOURSE_EXTERNAL_URL
      - CONCOURSE_ADD_LOCAL_USER=admin:admin
      - CONCOURSE_MAIN_TEAM_LOCAL_USER=admin
      - CONCOURSE_WORKER_RUNTIME=containerd
      - CONCOURSE_GARDEN_DNS_PROXY_ENABLE=true
      - CONCOURSE_WORKER_GARDEN_DNS_PROXY_ENABLE=true

Note how I have the two env vars suggested, CONCOURSE_GARDEN_DNS_PROXY_ENABLE and CONCOURSE_WORKER_GARDEN_DNS_PROXY_ENABLE, but also a third added env var, CONCOURSE_WORKER_RUNTIME. That's because I ran into a separate issue when starting the tutorial that I had to fix with the workaround suggested in #251.

I do see some errors in the Concourse container's logs that I don't understand right now:

concourse-tutorial-concourse-1     | time="2023-02-08T20:55:40.981886849Z" level=error msg="failed to enable controllers ([cpuset cpu io memory hugetlb pids rdma misc])" error="failed to write subtree controllers [cpuset cpu io memory hugetlb pids rdma misc] to \"/sys/fs/cgroup/cgroup.subtree_control\": write /sys/fs/cgroup/cgroup.subtree_control: device or resource busy"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants