创世块生成:无法创建渠道组:无法创建订购者组:向订购者组添加策略时出错:未定义策略

时间:2020-02-20 09:31:28

标签: hyperledger-fabric ubuntu-18.04

我正在尝试生成系统创世纪块(HyperledgerFabricNetwork版本2.0.0,Ubuntu 18.04.4 Desktop), 但我收到错误消息:

(基本)marco @ pc01:〜/ hyperledgerFabric / FabricInstallConfig / Udemy-FabricNetworkDesignSetup /HLF2-v1.4-3.2/configtx/multi-org$ configtxgen -outputBlock ./acme-genesis.blocl -profile AirlineOrdererGenesis -channelID AirlineChannel

2020-02-20 09:30:23.662 CET [common.tools.configtxgen] main -> INFO 001 Loading 
configuration
2020-02-20 09:30:23.673 CET [common.tools.configtxgen.localconfig] completeInitialization ->
INFO 002 orderer type: solo
2020-02-20 09:30:23.673 CET [common.tools.configtxgen.localconfig] Load -> INFO 003 Loaded
configuration: /home/marco/hyperledgerFabric/FabricInstallConfig/Udemy- 
FabricNetworkDesignSetup/HLF2-v1.4-3.2/configtx/multi-org/configtx.yaml
2020-02-20 09:30:23.673 CET [common.tools.configtxgen] main -> FATA 004 Error on 
outputBlock: could not create bootstrapper: could not create channel group: could not create
orderer group: error adding policies to orderer group: no policies defined

这是configtx.yaml:

# policy.1
# Organization section updated with the policies
# Admin policies for Acme set such that either the
# admin of Acme org can take an admin action or the admin from
# Orderer org can take the action.   
# Budget Or admin actions require signatures from both Budget.admin
# and Orderer Org admin

# ORGANIZATIONS
Organizations:
  - &Orderer
    Name: Orderer
    ID: OrdererMSP
    MSPDir: MSPDir: /home/marco/hyperledgerFabric/FabricInstallConfig/Udemy-
                    FabricNetworkDesignSetup/HLF2-v1.4-3.2/cryptogen/multi-org/crypto-config
                    /ordererOrganizations/acme.com/msp
    Policies: &OrdererPolicies
    Readers:
        Type: Signature
        Rule: "OR('OrdererMSP.member')"
    Writers:
        Type: Signature
        Rule: "OR('OrdererMSP.member')"
    Admins:
        Type: Signature
        Rule: "OR('OrdererMSP.admin')"


  - &Acme
    Name: Acme
    ID: AcmeMSP
    MSPDir: /home/marco/hyperledgerFabric/FabricInstallConfig/Udemy-FabricNetworkDesignSetup
           /HLF2-v1.4-3.2/cryptogen/multi-org/crypto-config/peerOrganizations/acme.com/msp
    Policies: &AcmePolicies
      Readers:
          Type: Signature
          Rule: "OR('AcmeMSP.member')"
      Writers:
          Type: Signature
          Rule: "OR('AcmeMSP.member')"
      Admins:
          Type: Signature
          Rule: "OR('AcmeMSP.admin', 'OrdererMSP.admin')"
    AnchorPeers:
      - Host: localhost
        Port: 7051

  - &Budget
    Name: Budget
    ID: BudgetMSP
    MSPDir: /home/marco/hyperledgerFabric/FabricInstallConfig/Udemy-FabricNetworkDesignSetup
           /HLF2-v1.4-3.2/cryptogen/multi-org/crypto-config/peerOrganizations/budget.com/msp
    Policies: &BudgetPolicies
      Readers:
          Type: Signature
          Rule: "OR('BudgetMSP.member')"
      Writers:
          Type: Signature
          Rule: "OR('BudgetMSP.member')"
      Admins:
          Type: Signature
          Rule: "AND('BudgetMSP.admin','OrdererMSP.admin')"
    AnchorPeers:
      - Host: localhost
        Port: 8051

#   ORDERER
Orderer: &OrdererDefaults

  OrdererType: solo

  Addresses:
    - localhost:7050

  # Batch Timeout: The amount of time to wait before creating a batch
  BatchTimeout: 2s

  # Batch Size: Controls the number of messages batched into a block
  BatchSize:
    MaxMessageCount: 10
    AbsoluteMaxBytes: 98 MB
    PreferredMaxBytes: 512 KB

  Capabilities:

Application: &ApplicationDefaults

  Organizations:

    # Policies defines the set of policies at this level of the config tree
    # For Orderer policies, their canonical path is
    #   /Channel/Orderer/<PolicyName>
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
        # BlockValidation specifies what signatures must be included in the block
        # from the orderer for the peer to validate it.
        BlockValidation:
            Type: ImplicitMeta
            Rule: "ANY Writers"

#   CHANNEL
#Channel: &ChannelDefaults

#  Capabilities:


################################################################################
Channel: &ChannelDefaults
    # Policies defines the set of policies at this level of the config tree
    # For Channel policies, their canonical path is
    #   /Channel/<PolicyName>
    Policies:
        # Who may invoke the 'Deliver' API
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        # Who may invoke the 'Broadcast' API
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        # By default, who may modify elements at this config level
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"

    # Capabilities describes the channel level capabilities, see the
    # dedicated Capabilities section elsewhere in this file for a full
    # description
    Capabilities:
    #    <<: *ChannelCapabilities

################################################################################

我认为configtx.yaml中添加的策略就足够了... 如何解决问题?

期待您的帮助。 马可

功能:

0 个答案:

没有答案