简体   繁体   中英

Hyperledger Fabric test network chaincode installation Error 500 on windows 10

I have installed the Hyperledger test-network on windows 10, following the procedure described in the Hyperledger homepage. I know it is better ran on Unix/Linux still, I have successfully created the default channel, and the sandboxes for Org1 and Org2 are up.

Continuing the default installation, while attempting to deploy the basic test chaincode I get the following "cannot connect to the Docker endpoint" Error:

$ ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go deploying chaincode on channel 'mychannel' executing with the following

  • CHANNEL_NAME: mychannel
  • CC_NAME: basic
  • CC_SRC_PATH: ../asset-transfer-basic/chaincode-go
  • CC_SRC_LANGUAGE: go
  • CC_VERSION: 1.0
  • CC_SEQUENCE: 1
  • CC_END_POLICY: NA
  • CC_COLL_CONFIG: NA
  • CC_INIT_FCN: NA
  • DELAY: 3
  • MAX_RETRY: 5
  • VERBOSE: false Vendoring Go dependencies at ../asset-transfer-basic/chaincode-go ~/go/src/github.com/arianagnostakis/fabric-samples/asset-transfer-basic/chaincode-go ~/go/src/github.com/arianagnostakis/fabric-samples/test-network ~/go/src/github.com/arianagnostakis/fabric-samples/test-network Finished vendoring Go dependencies
  • peer lifecycle chaincode package basic.tar.gz --path ../asset-transfer-basic/chaincode-go --lang golang --label basic_1.0
  • res=0 Chaincode is packaged Installing chaincode on peer0.org1... Using organization 1
  • peer lifecycle chaincode install basic.tar.gz
  • res=1 Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image inspection failed: cannot connect to Docker endpoint Chaincode installation on peer0.org1 has failed Deploying chaincode failed

Any idea is much appreciated, since i fight with this for a couple of days now...

Solved. (Thank you @Gelu , @david_k)

The problem was that Docker did not expose the containers correctly to the Git-bash CLI I was using (...)

SO, I tried WSL2: it took me just about 30 minutes to set Ubuntu, install Hyperledger and GO in it and get the sample chaincode up and running.

I did not re-install Docker. I am using Docker Desktop version 4.1.1 (69879), which in Settings-->Resources-->WSL INTEGRATION has an amazing feature of exposing the containers to all WSL-installed distros(!).

The test chaincode runs fast and very smoothly since the very first attempt.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM