0

I have a multi host, multi organization Hyperledger Fabric set up. 1 solo orderer and 2 peers on each org.

I am using Fabric 1.3 and composer 0.20.5. My network is runnign directly with the binaries, I'm not using docker.

Fabric network is working ok, no errors on the logs. Tested a simple chaincode and did invoke and queries on all peers.

I had a BNA installed and started working, now I tried to upgrade that one with another that had few changes, so I proceed like:

composer archive create --sourceType dir --sourceName ../
composer network install -c PeerAdmin@hlfv1 -a myBNA.bna
composer network upgrade -c PeerAdmin@hlfv1 -n myBNA -V 0.2.13

It installs successfully but I get this error when upgrading:

Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: error starting container: error starting container: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container 499d9b418f106ac1065fa18117b5a39dea1f623ff132cefe59b91d042deabced
Command failed

If I modify the files on composer-playground and click "Deploy Changes" I get the same error.

So I thought I'd restart the network and start directly the updated version:

composer network start -n myBNA -V 0.2.13 -A admin -S adminpw -c eb-PeerAdmin@hlfv1 -f admin.card

And got the same error.

If I go ahead and install and start the network with the previous version it works... but can't upgrade.

It's not a connection issue since I can ping the nodes and the installation is done succesfully.

Logs from the peeer:

^[[34m2018-12-17 18:59:50.129 UTC [lscc] executeInstall -> INFO 054^[[0m Installed Chaincode [myBNA] Version [0.2.13] to peer
^[[34m2018-12-17 18:59:50.129 UTC [endorser] callChaincode -> INFO 055^[[0m [][01b5adf7] Exit chaincode: name:"lscc"  (1ms)
^[[34m2018-12-17 18:59:50.456 UTC [endorser] callChaincode -> INFO 056^[[0m [mychannel][bc98ca67] Entry chaincode: name:"cscc"
^[[34m2018-12-17 18:59:50.456 UTC [endorser] callChaincode -> INFO 057^[[0m [mychannel][bc98ca67] Exit chaincode: name:"cscc"  (0ms)
^[[34m2018-12-17 18:59:50.610 UTC [endorser] callChaincode -> INFO 058^[[0m [mychannel][795d5d2f] Entry chaincode: name:"lscc"
^[[31m2018-12-17 18:59:50.750 UTC [chaincode-platform] func1 -> ERRO 059^[[0m Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /chaincode/input in container f$
^[[31m2018-12-17 18:59:50.750 UTC [dockercontroller] deployImage -> ERRO 05a^[[0m Error building images: Failed to generate platform-specific docker build: Error uploading input to container: API error (404): Could not find the file /cha$
^[[31m2018-12-17 18:59:50.750 UTC [dockercontroller] deployImage -> ERRO 05b^[[0m Image Output:
********************

********************
^[[34m2018-12-17 18:59:50.752 UTC [endorser] callChaincode -> INFO 05c^[[0m [mychannel][795d5d2f] Exit chaincode: name:"lscc"  (142ms)
^[[31m2018-12-17 18:59:50.752 UTC [endorser] SimulateProposal -> ERRO 05d^[[0m [mychannel][795d5d2f] failed to invoke chaincode name:"lscc" , error: Failed to generate platform-specific docker build: Error uploading input to cont$
error starting container
error starting container
^[[34m2018-12-17 19:00:02.220 UTC [endorser] callChaincode -> INFO 05e^[[0m [mychannel][b7a11129] Entry chaincode: name:"myBNA"
^[[34m2018-12-17 19:00:02.229 UTC [endorser] callChaincode -> INFO 05f^[[0m [mychannel][b7a11129] Exit chaincode: name:"myBNA"  (9ms)
emiliomarin
  • 362
  • 3
  • 22
  • Playground is not designed for multi-host or multi-org. ITs a simple dev playground. on the chaincode container build (which clearly shows its trying to build a docker container) - I suggest to read this thread -> https://lists.hyperledger.org/g/fabric/topic/24522778 and this one -> https://stackoverflow.com/questions/48070380/does-hyperledger-fabric-need-docker – Paul O'Mahony Dec 17 '18 at 21:49
  • @PaulO'Mahony thank you for your reply. I figured that playground wouldn't work for exactly what you said, but it should with the terminal commands. It's really weird that I'm able to install a start a BNA but then if I just modify the version number it throws that error – emiliomarin Dec 18 '18 at 08:10

1 Answers1

0

Although I wasn't using docker to run the nodes, my problem was to assume that I wasn't using docker at all. I believe that chaincode get installed in docker containers and since I didn't do a proper clean up that's why weird things were happening.

My solution was to do docker system prune -a -f to remove unused data.

After that I could start and upgrade my BNA and even deploy changes from the composer-playground.

emiliomarin
  • 362
  • 3
  • 22