1

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.

dwp
  • 908
  • 4
  • 24
  • 42

2 Answers2

0

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
Captain Levi
  • 804
  • 7
  • 18
  • My consortium has 6 organizations.does it matter? – dwp Mar 05 '19 at 07:02
  • no, number of orgs do not matter. Can you go through the docker logs of orderer and post exactly where the error had first been reported? make sure the logging is in debug. – Captain Levi Mar 05 '19 at 07:32
  • I tried to change the log level of orderer but it is always at the Info level. How can I change to DEBUG level? – dwp Mar 08 '19 at 06:08
  • did you ever figure this out? Getting this error since I updated to 1.4.3 – Moriarty Sep 05 '19 at 20:07
0

I was also having the same issue only because I have made some silly mistakes in the network definition config transaction file (configtx.yaml), so verify your channel artifacts configuration once.