v0.19.2版Hyperledger Composer网络启动失败求助
Hey there, let's work through this issue you're hitting. Since both your custom supply-chain-network.bna and the exported official my-basic-sample.bna are failing to start, the problem almost certainly lies in your environment setup rather than the network files themselves. Here are some actionable steps to diagnose and fix this:
Verify Fabric Container Health
First, check if all required Fabric containers are up and running. Run this command:docker ps
You should see containers for the orderer, peer, couchdb, and certificate authority (ca). If any container is missing or has exited, pull its logs to find the root cause:docker logs <container-id>Check PeerAdmin Card Validity
Confirm the PeerAdmin card was created correctly and is usable. Run:composer card list
Look forPeerAdmin@hlfv1in the output—its status should beAvailable. If it's missing or shows an error, re-run the creation script and watch for any errors in the output:./createPeerAdminCard.shEnsure Version Compatibility
Hyperledger Composer v0.19.2 requires Fabric 1.2.x. Double-check thatdownloadFabric.shpulled the right versions. List your Fabric images to verify:docker images | grep hyperledger/fabric
All core images (peer, orderer, couchdb, ca) should have tags matching1.2.x(e.g.,1.2.1). If not, clean up old images and re-run./downloadFabric.sh.Clean Slate Deployment
Residual state from previous attempts can cause weird issues. Let's reset everything:- Stop and tear down the Fabric network:
./stopFabric.sh && ./teardownFabric.sh - Delete the existing PeerAdmin card:
composer card delete -c PeerAdmin@hlfv1 - Reinitialize the environment:
./startFabric.sh && ./createPeerAdminCard.sh
Then try deploying your BNA again.
- Stop and tear down the Fabric network:
Get Detailed Deployment Errors
When deploying, add the verbose flag (-v) to get more context about what's failing. For example:composer network install -a my-basic-sample.bna -c PeerAdmin@hlfv1 -v
The detailed output will point you to specific issues like permission problems, connection timeouts, or missing dependencies.Check Virtual Machine Resources
Hyperledger Fabric needs a decent amount of resources to run smoothly. Make sure your Ubuntu VM has at least 2GB of RAM allocated—memory shortages often cause containers to crash silently.
内容的提问来源于stack exchange,提问作者Diogo Silva

