简体   繁体   中英

Channel creation fails with Hyperledger Fabric?

I build a customize network with Hyperledger fabric in docker. But when I try to build a channel It fails with this error.

 Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating DeltaSet: policy for [Group]  /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining

When I look for the logs of orderer It leaves me this on the terminal.

2019-03-05 04:24:56.368 UTC [orderer.common.server] Start -> INFO 007 Beginning to serve requests
2019-03-05 04:25:52.201 UTC [orderer.common.broadcast] ProcessMessage -> WARN 008 [channel: trafficfine] Rejecting broadcast of config message from 172.19.0.21:37180 because of error: error authorizing update: error validating DeltaSet: policy for [Group]  /Channel/Application not satisfied: Failed to reach implicit threshold of 1 sub-policies, required 1 remaining
2019-03-05 04:25:52.202 UTC [comm.grpc.server] 1 -> INFO 009 streaming call completed {"grpc.start_time": "2019-03-05T04:25:52.109Z", "grpc.service": "orderer.AtomicBroadcast", "grpc.method": "Broadcast", "grpc.peer_address": "172.19.0.21:37180", "grpc.code": "OK", "grpc.call_duration": "92.6116ms"}
2019-03-05 04:25:52.209 UTC [common.deliver] Handle -> WARN 00a Error reading from 172.19.0.21:37178: rpc error: code = Canceled desc = context canceled
2019-03-05 04:25:52.210 UTC [comm.grpc.server] 1 -> INFO 00b streaming call completed {"grpc.start_time": "2019-03-05T04:25:52.098Z", "grpc.service": "orderer.AtomicBroadcast", "grpc.method": "Deliver", "grpc.peer_address": "172.19.0.21:37178", "error": "rpc error: code = Canceled desc = context canceled", "grpc.code": "Canceled", "grpc.call_duration": "111.5112ms"}

This is how my orderer setup looks like.

orderer.example.com:
    container_name: orderer.example.com
    image: hyperledger/fabric-orderer:latest
    environment:
      - ORDERER_GENERAL_LOGLEVEL=INFO
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
      #enabled TLS
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    volumes:
      - ../channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
      - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/orderer/msp
      - ../crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/:/var/hyperledger/orderer/tls
      - orderer.example.com:/var/hyperledger/production/orderer
    ports:
      - 7050:7050

I tried everything suggested in this question.

peer channel creation fails in Hyperledger Fabric

But I was Unable to find out where I have done wrong. Can someone help me to solve this problem?. Thank you.

The error indicates that the channel you're trying to create is already created and you're trying to create it again using the channel.tx file. Probably you didn't clear your docker containers and hadn't completely restarted the containers.

To verify try changing the name of the channel, recreate the artifacts like anchor.tx and channel.tx files and resubmit with new name and files.

To clean the docker containers and completely restart follow:

Note : replace the <consortiumName > according to one specified in configtx.yaml file.

  • docker rm -f -v `docker ps -a --no-trunc | grep "<consortiumName>-" | cut -d ' ' -f 1` 2>/dev/null || true
  • docker rmi `docker images --no-trunc | grep "<consortiumName>-" | cut -d ' ' -f 1` 2>/dev/null || true

我也遇到了同样的问题,只是因为我在网络定义配置事务文件(configtx.yaml)中犯了一些愚蠢的错误,因此请一次验证您的通道工件配置。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM