Hyperledger Composer v16.06部署业务网络时Runtime安装失败求助
Hey there, let's work through that runtime install error you're hitting with Hyperledger Composer v0.16.06. Here are the most common fixes and checks to try:
1. Verify the PeerAdmin Card is Valid
First, make sure your PeerAdmin@hlfv1 card exists and is in good shape:
- Run
composer card listto check if the card is listed and shows a "Valid" status. - If it's missing or invalid, delete it first with
composer card delete --card PeerAdmin@hlfv1, then re-create it using your Fabric network's crypto materials:
Replacecomposer card create -p connection-profile.json -u PeerAdmin -c ./crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem -k ./crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/[your-private-key-file] -r PeerAdmin -r ChannelAdmin[your-private-key-file]with the actual name of the private key file in that directory, then import the card withcomposer card import --file PeerAdmin@hlfv1.card.
2. Check if Your Fabric Network is Running Properly
A down or misconfigured Fabric network is a common culprit:
- Run
docker psto see all active containers. Make sure your peer, orderer, and CA containers are all up and running. - If any containers are missing, restart your Fabric network: navigate to your Fabric docker-compose directory, run
docker-compose downto stop all containers, thendocker-compose up -dto restart them. - You can also verify peer connectivity by jumping into the CLI container:
If this returns a list of channels, your peer is connected correctly.docker exec -it cli bash export CORE_PEER_LOCALMSPID="Org1MSP" export CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp peer channel list
3. Confirm Your Business Network Setup is Correct
Double-check that your tutorial-network is properly prepared:
- Make sure you're running the install command from the root directory of your
tutorial-networkproject. - If you haven't already, generate the business network archive (BNA) file first with:
composer archive create -t dir -n . - Verify that the
--businessNetworkName tutorial-networkmatches thenamefield in your project'spackage.jsonfile. A mismatch here will cause the install to fail.
4. Get Detailed Error Logs
To pinpoint the exact issue, enable verbose logging:
- Re-run the install command with the
-vflag for verbose output:composer runtime install --card PeerAdmin@hlfv1 --businessNetworkName tutorial-network -v - You can also check the peer node's logs for specific errors:
Replacedocker logs peer0.org1.example.compeer0.org1.example.comwith your actual peer container name if it's different.
5. Ensure Version Compatibility
Hyperledger Composer v0.16.06 is designed to work with Hyperledger Fabric v1.0.x. If you're using a newer Fabric version (like 1.1+), you'll run into compatibility issues. Double-check your Fabric network version and re-deploy the correct v1.0.x version if needed.
内容的提问来源于stack exchange,提问作者Jony

