问题
I am trying to run multiple peers in different terminals on an Ubuntu 16.04 LTS machine. I am able to generate the certs for the configuration and channel transaction using the cryptogen and configtxgen tools. I am also able to start a peer (peer0) using the below configuration (start-peer0.sh)
CORE_PEER_ENDORSER_ENABLED=true \
CORE_PEER_PROFILE_ENABLED=true \
CORE_PEER_ADDRESS=peer0:7051 \
CORE_PEER_CHAINCODELISTENADDRESS=peer0:7052 \
CORE_PEER_ID=org0-peer0 \
CORE_PEER_LOCALMSPID=Org0MSP \
CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0:7051 \
CORE_PEER_GOSSIP_USELEADERELECTION=true \
CORE_PEER_GOSSIP_ORGLEADER=false \
CORE_PEER_TLS_ENABLED=false \
CORE_PEER_TLS_KEY_FILE=/root/bcnetwork/conf/crypto-config /peerOrganizations/org0/peers/peer0.org0/tls/server.key \
CORE_PEER_TLS_CERT_FILE=/root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer0.org0/tls/server.crt \ CORE_PEER_TLS_ROOTCERT_FILE=/root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer0.org0/tls/ca.crt \ CORE_PEER_TLS_SERVERHOSTOVERRIDE=peer0 \ CORE_VM_DOCKER_ATTACHSTDOUT=true \ CORE_PEER_MSPCONFIGPATH=/root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer0.org0/msp \ peer node start --peer-defaultchain=false
But when i am trying to start the another peer (peer1) using other terminal following error occurs:
""panic: Error while trying to open DB: resource temporarily unavailable"
start-peer1.sh
CORE_PEER_ENDORSER_ENABLED=true \
CORE_PEER_PROFILE_ENABLED=true \
CORE_PEER_ADDRESS=peer1:7053 \
CORE_PEER_CHAINCODELISTENADDRESS=peer1:7054 \
CORE_PEER_ID=org0-peer1 \
CORE_PEER_LOCALMSPID=Org0MSP \
CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1:7053 \
CORE_PEER_GOSSIP_USELEADERELECTION=true \
CORE_PEER_GOSSIP_ORGLEADER=false \
CORE_PEER_TLS_ENABLED=false \
CORE_PEER_TLS_KEY_FILE=/root/bcnetwork/conf/crypto-config /peerOrganizations/org0/peers/peer1.org0/tls/server.key \
CORE_PEER_TLS_CERT_FILE=/root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer1.org0/tls/server.crt \
CORE_PEER_TLS_ROOTCERT_FILE=/root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer1.org0/tls/ca.crt \
CORE_PEER_TLS_SERVERHOSTOVERRIDE=peer1 \
CORE_VM_DOCKER_ATTACHSTDOUT=true \
CORE_PEER_MSPCONFIGPATH=/root/bcnetwork/conf/crypto-config/peerOrganizations/org0/peers/peer1.org0/msp \
peer node start --peer-defaultchain=false
Both the peers belongs to same organization.
Motive of this configuration is to deploy the same chaincode on both the peers and check if invoke is called on one peer, other peer will get the updated state of the ledger while querying the ledger.
Any suggestions and guidance will be a great help for me.
来源:https://stackoverflow.com/questions/47753284/hyperledger-fabric-panic-error-while-trying-to-open-db-resource-temporarily-u