簡體   English   中英

使用Hyperledger Fabric通道創建失敗?

[英]Channel creation fails with Hyperledger Fabric?

我在Docker中使用Hyperledger架構構建了一個自定義網絡。 但是,當我嘗試建立頻道時,此錯誤失敗。

 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

當我查找訂購者的日志時,將其留在終端上。

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"}

這是我的訂購器設置的樣子。

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

我嘗試了這個問題中提出的所有建議。

Hyperledger Fabric中對等通道創建失敗

但是我無法找出我做錯了什么。 有人可以幫我解決這個問題嗎? 謝謝。

該錯誤表明您要創建的通道已經創建,並且您正在嘗試使用channel.tx文件再次創建它。 可能您沒有清除docker容器,也沒有完全重啟容器。

要進行驗證,請嘗試更改通道的名稱,重新創建構件,例如anchor.txchannel.tx文件,然后使用新的名稱和文件重新提交。

要清理docker容器並完全重新啟動,請執行以下操作:

注意 :根據configtx.yaml文件中指定的內容替換<consortiumName >

  • 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)中犯了一些愚蠢的錯誤,因此請一次驗證您的通道工件配置。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM