问题
I add the following two lines in the CouchDB container of docker-compose file.
volumes:
- ./couchdb:/opt/couchdb/data
My steps as follows:
- ./startFabric.sh
- composer network install -c PeerAdmin@hlfv1 -a tutorial-network.bna
- composer network start -n tutorial-network -A admin -S adminpw -c PeerAdmin@hlfv1 -V 0.0.2-deploy.10 -f admin@tutorial-network.card
It's ok ,and some data will store my couchdb directory. Then I stop&remove all container:
- ./stopFabrics.sh
- ./startFabrics.sh
- composer network install -c PeerAdmin@hlfv1 -a tutorial-network.bna
- composer network start -n tutorial-network -A admin -S adminpw -c PeerAdmin@hlfv1 -V 0.0.2-deploy.10 -f admin@tutorial-network.card Got error as follows:
✖ Starting business network definition. This may take a minute... Error: Error trying to start business network. Error: No valid responses from any peers. Response from attempted peer comms was an error: Error: 2 UNKNOWN: chaincode error (status: 500, message: chaincode exists tutorial-network) Command failed
Only when I delete the couchdb directory can it works.
来源:https://stackoverflow.com/questions/50166374/i-volume-a-directory-in-couchdb-have-error-when-i-run-composer-network-start