0

Some time ago a created a bna file based on https://github.com/johnwalicki/IoT-AssetTracking-Perishable-Network-Blockchain/tree/master/Blockchain

Now I want to import a bna file on a different server.

$ composer network install --archiveFile perishable-network.bna --card PeerAdmin@hlfv1
$ composer network start --networkName perishable-network  --networkVersion 1.0.0 --card PeerAdmin@hlfv1 --networkAdmin admin --networkAdminEnrollSecret adminpw
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: cannot get package for chaincode (perishable-network:1.0.0)

I am aware of this other question but wouldn't know how to apply this (peer chaincode install) to my specific situation.

docker ps directly via VNC on the Ubuntu 18.04 VM where I start the composer-playground command:

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar$2Frun%2Fdocker.sock/v1.39/containers/json: dial unix /var/run/docker.sock: connect: permission denied

docker ps via SSH from my laptop (Mac):

peter@asset-tracker:~$ docker ps
CONTAINER ID        IMAGE                               COMMAND                  CREATED             STATUS              PORTS                                            NAMES
3167a355ed2d        hyperledger/fabric-peer:1.2.1       "peer node start"        14 hours ago        Up 14 hours         0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp   peer0.org1.example.com
75bf0cc3cdd1        hyperledger/fabric-couchdb:0.4.10   "tini -- /docker-ent…"   14 hours ago        Up 14 hours         4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp       couchdb
33322a1d07cd        hyperledger/fabric-orderer:1.2.1    "orderer"                14 hours ago        Up 14 hours         0.0.0.0:7050->7050/tcp                           orderer.example.com
05e542111f21        hyperledger/fabric-ca:1.2.1         "sh -c 'fabric-ca-se…"   14 hours ago        Up 14 hours         0.0.0.0:7054->7054/tcp                           ca.org1.example.com
jpsstack
  • 1,221
  • 4
  • 18
  • 29

1 Answers1

3

Dealing with the first error on the composer network start command:

" Error: cannot get package for chaincode (perishable-network:1.0.0) "

This says that the network with that name and version can't be found on the Peer - so either it isn't there or there is some mismatch in the name/version.

If you run the command composer archive list -a perishable-network.bna you will see the exact details from the bna, and you will see any mismatch with your composer network start command.

If the name./version are OK could also check the file system on the Peer to see it is actually successfully installed: docker exec peer0.org1.example.com ls /var/hyperledger/production/chaincodes

If the package is not visible from the command above then you will need to re-run the composer network install ... command - then recheck the file system on the peer using the previous command.

Have you stopped or restarted the Fabric between the composer network install and composer network start commands? Please see this previous Stack Overflow posting which explains how the startFabric.sh script works.

R Thatcher
  • 5,550
  • 1
  • 7
  • 15