Fly: Failed to ping docker registry - docker

I am trying to run a simple build by passing input task to the concourse. Here is my fly command,
fly -t tutorial e -c inputs_required.yml -i some-important-input=.
and my yml file,
---
platform: linux
image_resource:
type: docker-image
source: {repository: busybox}
inputs:
- name: some-important-input
run:
path: ls
args: ['-alR']
I am getting the below error message,
resource script '/opt/resource/check []' failed: exit status 1
stderr:
failed to ping registry: 2 error(s) occurred:
* ping https: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
* ping http: Get http://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
errored
Please note that I am not behind a proxy. I am also not able to ping https://registry-1.docker.io/v2/.

The simple reason is your host cannot reach docker registry which is docker.io by default.
I am not familiar with fly. But I think the image source in your yaml file { repository:busybox} should be a specific image which could be used in command docker pull.
For addition, you may try a local image on your host first. Then try a remote image in some remote registry.

Related

docker run - Client.Timeout exceeded while awaiting headers

I downloaded docker desktop on my Windows 10. When I try to:
docker run -d -p 80:80 docker/getting-started
it gives response
unable to find image ... localy
OK, there is no problem but next it should start to download that image but I am getting:
docker: Error response from daemon: Get https://registry-docker-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
I am using vpn to network connection

"Error response from daemon:proxyconnect tcp: dial tcp: lookup {proxy.example.com}: no such host". what should be placed instead of proxy.example.com?

Try-1: I got this following error when I try to install laravel version 9 in my linux (ubuntu).
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
$ curl -s https://laravel.build/example-app | bash
Unable to find image 'laravelsail/php81-composer:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
bash: line 16: cd: example-app: No such file or directory
bash: line 18: ./vendor/bin/sail: No such file or directory
bash: line 19: ./vendor/bin/sail: No such file or directory
Get started with: cd example-app && ./vendor/bin/sail up
Try-2: I have beyond my company network when installing this and also I tried without being beyond my company network.so I changed my company network to my mobile network then I tried
Error response from daemon: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: dial tcp: lookup proxy.example.com: no such host
Try-3: When I changed http & https proxy to no proxy like this Environment=no_proxy=localhost,127.0.0.1 and changed nameserver like this nameserver 8.8.8.8 nameserver 8.8.4.4 I got below error.
*docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": x509: certificate is valid for .orchardmile.com, orchardmile.com, not registry-1.docker.io
Still same problem arises in different error message.
I have tried this solution : https://docs.docker.com/engine/admin/systemd/#httphttps-proxy in docker official documention and tried this also Error "Get https://registry-1.docker.io/v2/: net/http: request canceled" while building image from stackflow.
After reading above documentation I have one query that what does is (proxy.example.com) it mean in Environment variable in below config file.
Should I change this proxy.example.com to anything regard my company gateway or proxy address something like that or just leave it as it is ?
[Service]
Environment="HTTPS_PROXY=https://proxy.example.com:443/"
[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80/"
Above snippet code is from the docker documentation https://docs.docker.com/engine/admin/systemd/#httphttps-proxy

Failed to generate platform-specific docker build: Failed to pull hyperledger/fabric-ccenv:1.4: API error (500) on Kubernetes multiple nodes

I am trying to run fabric network on kubernetes multiple node. The problem occurred while instantiating the chaincode. It works fine on single node Kubernetes cluster but gives following error on chaincode instantiation on multiple nodes.
Error on Peer
2020-12-01 11:15:29.083 UTC [endorser] SimulateProposal -> ERRO 32b
[channel1][10d225ff] failed to invoke chaincode name:"lscc" , error:
Post
http://docker:2375/build?networkmode=host&t=nid1-org1peer1-cc-1.0-bb7b63f343a13a21a9c1a0d74aa7d87a8898eaa0f093e1c77941b4fc795223f3b4: Failed to generate platform-specific docker build: Failed to pull
hyperledger/fabric-ccenv:1.4: API error (500): Get
https://registry-1.docker.io/v2/: net/http: request canceled while
waiting for connection (Client.Timeout exceeded while awaiting
headers)
Error on docker-dind
time="2020-12-01T11:15:29.066402366Z" level=warning msg="Error getting
v2 registry: Get https://registry-1.docker.io/v2/: net/http: request
canceled while waiting for connection (Client.Timeout exceeded while
awaiting headers)" time="2020-12-01T11:15:29.066733856Z" level=info
msg="Attempting next endpoint for pull after error: Get
https://registry-1.docker.io/v2/: net/http: request canceled while
waiting for connection (Client.Timeout exceeded while awaiting
headers)"
When the fabric's chaincode is instantiated, it is created as a docker's container in the form of a sandbox.
The container above is created in a docker image called fabric-ccenv, which is defined in the peer's configuration (core.yaml).
When looking at the current log, it seems that the above image cannot be pulled.
It seems that it will be solved by executing the code below and downloading the image to the local repository.
docker pull hyperledger/fabric-ccenv:1.4
In addition, the error appears to be a problem related to the docker's DNS/proxy, and I also had the same issue.
I fixed this by setting 8.8.8.8 as the default DNS
-> docker/Preferences/Proxies
check System proxy
-> System Preferences
Then, add my system DNS server 8.8.8.8

Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

I am getting the error below while trying to build docker image. My operating system is CentOS 7 on a corporate setting.
Sending build context to Docker daemon 1.22GB
Step 1/20 : FROM centos
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
I followed the answers i got online.(related question). I followed the answer with the 24 votes, since it is given for CentOS 7
I created a file called docker inside the directory /etc/sysconfig/ and added the content below
HTTP_PROXY="http://proxy.example.com:80/"
HTTPS_PROXY="https://proxy.example.com:443/"
http_proxy="${HTTP_PROXY}"
https_proxy="${HTTPS_PROXY}"
But i am getting the error below.
Sending build context to Docker daemon 1.22GB
Step 1/20 : FROM centos
Get https://registry-1.docker.io/v2/: http: error connecting to proxy https://proxy.example.com:443/: dial tcp: lookup proxy.example.com on 127.0.0.1:53: no such host
My Docker version is
client :
version 17.05.0-ce
API version: 1.29
server :
version :17.05.0-ce
API version: 1.29

Docker pull failed with request canceled while waiting for connection

I am trying to pull images to default docker machine. But I always get
docker#default:/etc$ docker run hellow-world
Unable to find image 'hellow-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
docker#default:/etc$
Even if i give --dns option same error
docker#default:/etc$ docker run hellow-world --dns=8.8.8.8
Unable to find image 'hellow-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.
docker#default:/etc$
Tried adding DNS to config.json of the default machine
"EngineOptions": {
"Dns": [
"8.8.8.8",
"8.8.4.4"
]
}
resolv.conf has following entry in default machine
docker#default:/etc$
docker#default:/etc$ cat /etc/resolv.conf
search <company name>
nameserver 10.0.2.3
docker#default:/etc$
This machine sits behind the proxy and I am using kitematic for creating default machine
Kitematic is started by a custom script which will set proxies and start kitematic
Recommended and All images are displayed at the start of kitematic. But can not pull any images
Creating new machine also gives warning
PS C:\Program Files\Docker Toolbox\kitematic> docker-machine create -d virtualbox --engine-opt dns=8.8.8.8 test
Running pre-create checks...
(test) Unable to get the latest Boot2Docker ISO release version: Get https://api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp 192.30.253.116:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Creating machine...
(test) Unable to get the latest Boot2Docker ISO release version: Get https://api.github.com/repos/boot2docker/boot2docker/releases/latest: dial tcp 192.30.253.116:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Machine created with --dns option also has /etc/resolv.conf not as 8.8.8.8
docker#test:~$
docker#test:~$ cat /etc/resolv.conf
search <company name>
nameserver 10.0.2.3
docker#test:~$
PS:Issue solved after adding HTTP_PROXY to /var/lib/boot2docker/profile
Found solution
Either
add HTTP_PROXY to /var/lib/boot2docker/profile
or
create docker machine with --engine-env HTTP_PROXY=IP:PORT

Resources