FABRIC returns Error: Got unexpected status: BAD_REQUEST

前端 未结 8 1475
谎友^
谎友^ 2021-01-05 08:47

From fabric document create-join-channel, when I execute the command

peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/         


        
8条回答
  •  迷失自我
    2021-01-05 09:16

    Got unexpected status: BAD_REQUEST

    Unfortunately, this error message can mean many things. FYI, in the upcoming fabric v1.1 release, this message has been enhanced to include additional text.

    Most commonly, for channel creation, this status indicates that the submitter does not have channel creation rights (which usually equates to admin authority for an org). However, as mac indicates, if the channel already exists you might also get this error.

    peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

    This command strikes me as the likely culprit. This command should usually be paired with lines like:

    export CORE_PEER_MSPCONFIGPATH=`pwd`/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp 
    export CORE_PEER_LOCALMSPID=PeerOrg1 
    

    Which tell the peer command that the channel creation request should be signed using a particular admin's certificate. The default paths for the peer command's certificate material usually result in a standard user cert being used to sign.

提交回复
热议问题