FABRIC returns Error: Unexpected status received: BAD_REQUEST

From factory document create-join-channel when I execute the command

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

returns the error code of the following message:

2017-08-16 01: 34: 13.902 UTC [msp] GetLocalMSP → DEBU 00c Returning existing local MSP 2017-08-16 01: 34: 13.902 UTC [msp] GetDefaultSigningIdentity → DEBU 00d Obtaining default signing identity 2017-08-16 01 : 34: 13.902 UTC [msp / identity] Sign → DEBU 00e Sign: plaintext: 0AC3060A1508021A060895C2CECC0522 ... 7E2E59E3CFD14AC765C92FBF36614E79 2017-08-16 01: 34: 13.902 UTC [msp / identity] Sign → DEBU 00f Sign: digest: FA75790826EF23E1A7C46AD3B9AE0DB7321DC271B8BE93A29BAC2F6EEACBB8B0 Error: Got unexpected status: BAD_REQUEST Usage: peer channel create [flags]

Flags:

The commands are as follows:

cryptogen generate --config=./crypto-config.yaml

export FABRIC_CFG_PATH=$PWD

configtxgen -profile TwoOrgsOrdererGenesis -outputBlock ./channel-artifacts/genesis.block

export CHANNEL_NAME=mychannel

configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME

configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP

configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org2MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org2MSP

CHANNEL_NAME=$CHANNEL_NAME TIMEOUT=10000 docker-compose -f docker-compose-cli.yaml up -d

docker exec -it cli bash

export CHANNEL_NAME=mychannel

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
+6
8

, , , .

, CHANNEL_NAME=mychannel, , - export CHANNEL_NAME=mychannelanother

0

: BAD_REQUEST

, . FYI, v1.1, , .

, ( ). , mac, , .

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

. , :

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

peer, . peer , .

0

, , , , docker-compose-cli.yaml script.sh script. , script, . :

# Comment out the line like the example below by adding a #
# command: /bin/bash -c './scripts/script.sh ${CHANNEL_NAME} ${DELAY} ${LANG}; sleep $TIMEOUT'```

, .

0

. , , CHANNEL_NAME docker-compose ( ?). , [ "-c $CHANNEL_NAME" "-c mychannel" ]:

peer channel create -o orderer.example.com:7050 -c mychannel -f./channel-artifacts/channel.tx --tls --cafile/opt/gopath/src/github.com/hyperledger/fabric///ordererOrganizations/example.com//orderer.example.com/MSP/tlscacerts/tlsca.example.com-cert.pem

.

0

@Phil, . :

, script CLI , Whats, ? . , , .

.

0

, , , , .

0

/etc/hosts ( example.com)

: "sudo/etc/hosts" "127.0.0.1 example.com" ctrl + o , "y", ctrl + x .

try again .. should work.

0
source
./byfn.sh -m restart -c mychannel
0
source

Source: https://habr.com/ru/post/1683794/


All Articles