-1

I am trying to create a channel block but I get the error below. I am using an article in medium. Has anyone any ideas about this?

~/fabric/fabric-samples/multi-channel-network$ docker exec -e "CORE_PEER_LOCALMSPID=Org2MSP" -e "CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp" -e "CORE_PEER_ADDRESS=peer0.org2.example.com:7051" -it cli bash root@6379d63c48b5:/opt/gopath/src/github.com/hyperledger/fabric/peer# export ORDERER_CA=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem root@6379d63c48b5:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer channel create -o orderer.example.com:7050 -c channelall -f /opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts/channelall.tx --tls --cafile $ORDERER_CA 2019-09-24 10:46:28.542 UTC [main] InitCmd -> WARN 001 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-09-24 10:46:28.546 UTC [main] SetOrdererEnv -> WARN 002 CORE_LOGGING_LEVEL is no longer supported, please use the FABRIC_LOGGING_SPEC environment variable 2019-09-24 10:46:28.550 UTC [channelCmd] InitCmdFactory -> INFO 003 Endorser and orderer connections initialized Error: got unexpected status: BAD_REQUEST -- error validating channel creation transaction for new channel 'channelall', could not succesfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group] /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied

Trevor Oakley
  • 438
  • 5
  • 17

1 Answers1

0

How to create a channel block in hyperledger fabric. I'm writing the step from begining from where you generate your crypto materials, assuming that you're running first-network. which means you're in

cd fabric-samples/first-network

First, generate crypto materials

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

Export this path i,e. run this command

  1. export FABRIC_CFG_PATH=$PWD

Create a genesis block

  1. ../bin/configtxgen -profile SampleMultiNodeEtcdRaft -channelID byfn-sys-channel -outputBlock ./channel-artifacts/genesis.block

Export channel name

  1. export CHANNEL_NAME=mychannel

Create channel , this will create channel.tx

  1. ../bin/configtxgen -profile TwoOrgsChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID $CHANNEL_NAME
Adarsha Jha
  • 1,782
  • 2
  • 15
  • 37
  • I am asking about multi-channels which is not addressed by your answer. Your answer is the single channel case which is entirely different. – Trevor Oakley Oct 08 '19 at 14:47
  • to create multi-channels just start this step again and simply change the name of channel.tx to < anything you want > . – Adarsha Jha Oct 09 '19 at 06:45
  • I had a specific error which I posted. I can copy paste from the docs about channel creation. – Trevor Oakley Oct 09 '19 at 06:49