Failed Installing Hyperledger Fabric docker images - docker

I'm trying to install Hyperledger Fabric docker images, but I keep getting the following errors after it downloads the Hyperledger Fabric Binaries.
I'm on a Windows 10 Home edition PC and I have downloaded all the Prerequisites like curl, Docker Toolbox, Go Programming lang and Nodejs & NPM. I have also installed the Visual Studio C++ Build Tools and the NPM GRPC module.
However, after I ran the curl -sSL 'url shortened link' | bash -s command (even the unshortened version), It doesn't seem to download the Hyperledger Fabric docker images. It downloads the samples and the fabric binaries but when it gets to the Hyperledger Fabric docker images, I get the following error. I would appreciate assistance on how to find a solution for this.
==> FABRIC IMAGE: peer
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:48694->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-peer:1.4.0
==> FABRIC IMAGE: orderer
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:37648->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-orderer:1.4.0
==> FABRIC IMAGE: ccenv
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:56223->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-ccenv:1.4.0
==> FABRIC IMAGE: tools
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:57861->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-tools:1.4.0
==> FABRIC IMAGE: baseos
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:40361->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-baseos:1.4.0
==> FABRIC IMAGE: nodeenv
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:59697->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-nodeenv:1.4.0
==> FABRIC IMAGE: javaenv
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:36910->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-javaenv:1.4.0
===> Pulling fabric ca Image
==> FABRIC CA IMAGE
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:41696->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-ca:1.4.2
===> Pulling thirdparty docker images
==> THIRDPARTY DOCKER IMAGE: couchdb
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:47343->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-couchdb:0.4.15
==> THIRDPARTY DOCKER IMAGE: kafka
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:54708->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-kafka:0.4.15
==> THIRDPARTY DOCKER IMAGE: zookeeper
Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 10.0.2.3:53: read udp 10.0.2.15:50988->10.0.2.3:53: i/o timeout
Error response from daemon: No such image: hyperledger/fabric-zookeeper:0.4.15
===> List out hyperledger docker images```

There are two methods that you can try
Method 1: Uninstall docker and reinstall it from here
Method 2: Go to Preferences > Daemon > Advanced and set DNS server to 8.8.8.8.

Try to remove all docker images first
using
$ docker rmi -f $(docker images)
After that use each code in terminal one by one
sudo apt-get install curl
sudo apt-get install golang-go
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get install python
sudo apt-get install docker
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo apt-get install docker-compose
sudo apt-get upgrade
After that download samples here

On Docker for Windows, in 'system tray', right click on 'Docker' then 'switch to Linux containers'. After this is done, in 'Docker settings', go to [Docker > Settings > Resources > File Sharing] and share 'c drive'. Next in [Docker > Settings > Resources > Proxies] give http and httpsproxy URLS (Example: http://windows-domain-name%5Cwindows-user-name:url-encoded-password#proxy-server-or-ip:proxy-port/).
Also you need 'Virtualization' enabled on Windows 10, not sure if you'll have it in 'Windows 10 home edition', nevertheless you can see it in [Windows Task Manager > Performance Tab > Select CPU on left panel > On the right panel below the graph > you should have virtualization: Enabled]. Also, use 'git bash' to run your commands in Windows. You'll get this when you install 'git' I think.

Related

Docker daemon error failing to resolve reference

i updated docker desktop today and now i can't run anything anymore with the following errors:
MBP:basic_amethyst ap$ botfront up
⠋ Checking Docker images┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│error: 'Error: Command failed: docker pull mongo:latest │
│Error response from daemon: failed to resolve reference "docker.io/library/mongo:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/mongo/manifests/latest": proxyconnect tcp: dial tcp 172.17.0.1:3128: connect: connection refused │
│' stdout = '' stderr = 'Error response from daemon: failed to resolve reference "docker.io/library/mongo:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/mongo/manifests/latest": proxyconnect tcp: dial tcp 172.17.0.1:3128: connect: connection refused│
│' │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
✖ Could not download Docker images
This happened while i was trying to run botfront for rasa chatbot!
I also get the an error when running docker login (and yes i entered the correct credentials):
Error response from daemon: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: dial tcp 172.17.0.1:3128: connect: connection refused
Here the infos to my system:
docker --version - Docker version 20.10.17, build 100c701 |
Docker Desktop 4.12.0 (85629) is currently the newest version available. |
MacBook Pro (13-inch, 2019,....) | Private device so no company proxy | logged in via docker desktop
And this is what i tried so far:
restarting / shutting down and booting up again the device
setting the experimental to false
uninstalled docker and docker gui and reinstalled them
Any suggestions? Thinking of downgrading to previous (working) version as last resort. Thanks!
Uninstalling and reinstalling everything docker related solved it for me!

"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

Docker Pull fail in disconnected Enviornment

I have to install openshift on disconnected system so i followed following steps(original installation requires more image but for sake of understanding i am provided minimum steps)
on system with internet i did following steps
docker pull docker.io/openshift/origin-node:v3.11.0
docker save -o openshift-origin-v3.11.0-images.tar \
docker.io/openshift/origin-node:v3.11.0
on second disconnected system i did following
docker load -i openshift-origin-v3.11.0-images.tar
Now when i start script for installation it pull the images with command docker.io/openshift/origin-node:v3.11.0
which is throwing following error
Error getting v2 registry: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on [::1]:53: dial udp [::1]:53: connect: no route to host
When on second system i do docker images
[root#x ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/openshift/origin-node v3.11.0 14d965ab72d5 4 days ago 1.17 GB
Its showing me that image is available. Whats wrong here? My understanding is it should first look locally and then will check from dockerhub
Update1:
if i directly pull it saying
[root#x ~]# docker pull docker.io/openshift/origin-node:v3.11.0
Trying to pull repository docker.io/openshift/origin-node ...
Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.x.x:53: server misbehaving
I am expecting it should say
Status: Image is up to date for
I changed following in /etc/containers/registries.conf and it works
From
[registries.search]
registries = ['registry.access.redhat.com', 'docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.centos.org']
To
[registries.search]
registries = []
[registries.block]
registries = ['registry.access.redhat.com', 'docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.centos.org']

Error Starting Hyperledger Fabric

I am using the Hyperledger-composer install guide to create the environemnet in aws ubuntu instance.
I get the following error:
Development only script for Hyperledger Fabric control
Running 'startFabric.sh'
FABRIC_VERSION is unset, assuming hlfv1
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
#Detect architecture
ARCH=`uname -m`
uname -m
# Grab the current directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd
dirname "${BASH_SOURCE[0]}"
#
ARCH=$ARCH docker-compose -f "${DIR}"/composer/docker-compose.yml down
Removing orderer.example.com ... done
Removing ca.org1.example.com ... done
Removing couchdb ... done
Removing network composer_default
ARCH=$ARCH docker-compose -f "${DIR}"/composer/docker-compose.yml up -d
Creating network "composer_default" with the default driver
Creating orderer.example.com ...
Creating ca.org1.example.com ...
Creating couchdb ...
Creating orderer.example.com
Creating couchdb
Creating orderer.example.com ... error
ERROR: for orderer.example.com Cannot start service orderer.example.com: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.soCreating couchdb ... error
ERROR: for couchdb Cannot start service couchdb: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection Creating ca.org1.example.com ... error
ERROR: for ca.org1.example.com Cannot start service ca.org1.example.com: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused"
ERROR: for couchdb Cannot start service couchdb: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused"
ERROR: for ca.org1.example.com Cannot start service ca.org1.example.com: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused"
ERROR: for orderer.example.com Cannot start service orderer.example.com: connection error: desc = "transport: dial unix /var/run/docker/containerd/docker-containerd.sock: connect: connection refused"
ERROR: Encountered errors while bringing up the project.
The docker images are created properly.
How can I solve this error.

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