HTTP status: 500 error on docker pull using docker-machine - docker

After removing and reinstalling a default machine using Docker Quickstart and VirtualBox any docker pull fails. Restarting docker-machine doesn't help.
For example:
~$ docker pull ubuntu:14.04
Error response from daemon: Get https://registry-1.docker.io/v2/library/ubuntu/manifests/14.04:
Received unexpected HTTP status: 500 Internal Server Error

Likely caused by an error at docker.io (500 should've been a red flag ;) that was intermittent. Next time double check from another machine if possible.
Earlier thoughts:
With the default docker-machine running, regenerating the tls certs:
docker-machine regenerate-certs
fixes the problem, sometimes, for one pull. But has also yielded:
Error response from daemon: Get <url omitted>: Get <url omitted>:
net/http: request canceled (Client.Timeout exceeded while awaiting headers)

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

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

Failed to pull image "levm38/server:latest": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: EOF

I am trying to deploy a docker image on my minikube using a specific image:
But I always get this error
Failed to pull image "levm38/server:latest": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: EOF
I am behind a firewall but I already pushed the image, so I am not sure whats failing
There are a couple of problems and solutions related to
Firewall
Proxy
Restarting and re-configuring docker
in this post:
https://forums.docker.com/t/error-response-from-daemon-get-https-registry-1-docker-io-v2/23741/13
also,
do minikush ssh to the VM and see if you can connect/pull from registry on minikube VM.

Docker Compose up Throws SSL error using Docker Machine

I connected my Virtualbox VM to my docker machine.And when i do docker-compose up from docker machine I am getting this following Error.
ERROR: SSL error: HTTPSConnectionPool(host='192.168.4.20', port=2376): Max retries exceeded with url: /v1.22/info (Caused by SSLError(CertificateError("hostname '192.168.4.20' doesn't match 'localhost'",),))
I know I'm a bit late to the party, but I just had this. Apparently, Docker Compose is not using the correct TLS version. You can fix this by having the following environment variable:
COMPOSE_TLS_VERSION=TLSv1_2
Here's the original link: https://stackify.com/docker-environment-variables/
I had the same issue, I could resolve renewing the certificate.
$ docker-compose up -d
ERROR: SSL error: HTTPSConnectionPool(host='192.168.99.100', port=2376):
Max retries exceeded with url: /v1.30/networks/docker_default
(Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),))
$ docker network ls
error during connect: Get https://192.168.99.100:2376/v1.40/networks: x509:
certificate has expired or is not yet valid
To fix:
$ docker-machine regenerate-certs --client-certs
$ docker-compose up -d
Starting couchdb-dev ... done
Starting consul-dev ... done
Starting postgres-dev ... done
Starting zipkin-dev ... done
Starting rabbitmq-dev ... done
Starting oracle-dev ... done
Starting cassandra-dev ... done
Works!
ps: I got this error after change the hour on clock from computer

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