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)"

1

There are 1 best solutions below

0
On

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