0

I am getting this error on windows 10 and the command I am using is "./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript/ -ccl javascript" and the error I am getting is :

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

Docker version 20.10.7, build f0df350 docker-compose version 1.29.2, build 5becea4c

The command and the response of above :

/c/fabric-samples/test-network (main) $ ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-javascript/ -ccl javascript deploying chaincode on channel 'mychannel' executing with the following

  • CHANNEL_NAME: mychannel
  • CC_NAME: basic
  • CC_SRC_PATH: ../asset-transfer-basic/chaincode-javascript/
  • CC_SRC_LANGUAGE: javascript
  • 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
  • peer lifecycle chaincode package basic.tar.gz --path ../asset-transfer-basic/chaincode-javascript/ --lang node --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
  • Generally, Windows is not supported that well in the Fabric ecosystem, and we never test that windows works when we release new versions. It's better to try and deploy on Linux or Mac. – yacovm Aug 03 '21 at 18:51
  • yeah thats absolutely right, my team members able to install it in their window system but I got stuck here. any available possible solutions? – pavithra ramasamy Aug 04 '21 at 06:34
  • I have the same issue with this example under wndows with Docker version 23.0.5, build bc4487a. I try to work with the ubuntu shell, which was installed as part of the prereq in WSL2. – Myonara May 14 '23 at 13:34

1 Answers1

1

Ok, I am not 100% sure but to package nodejs chaincode on windows you need some necessary Visual Studio C++ Build Tools which seems to be missing /cause of error.

npm install --global windows-build-tools

Checkout Windows extra under - Prerequisites Hyperledger-fabric docs

  • I get an warning, that nodejs is now containing some windows tools, so I don't need it according to the warning message. apart from that there are some strange errors, when I try to install it in node 18.16.0 – Myonara May 14 '23 at 13:25