创建consenter时出错:未能将TickInterval()解析为时间持续时间。

我正在按照《Fabric CA操作指南》(https:/hyperledger-fabric-ca.readthedocs.ioenlatestoperations_guide.html。)’.

在Hyperledger Fabric 2.0上测试。我的Topology在这里。

  • 主机1:tls-ca,org0-ca,orderer-org0,peer2-org1。
  • 主机2:org1-ca,peer1-org1。

我遇到了一个问题,就是使用configtxgen(v2.0.0)生成genesis block和channel tx,并执行orderer容器。容器在运行前就崩溃了。您能帮我解决这个问题吗?

崩溃日志

2020-04-23 01:35:06.266 UTC [orderer.common.server] initializeServerConfig -> INFO 004 Starting orderer with TLS enabled
2020-04-23 01:35:06.343 UTC [orderer.common.server] extractSysChanLastConfig -> INFO 005 Not bootstrapping because of 1 existing channels
2020-04-23 01:35:06.366 UTC [orderer.common.server] extractSysChanLastConfig -> INFO 006 System channel: name=syschannel, height=1, last config block number=0
2020-04-23 01:35:06.366 UTC [orderer.common.server] selectClusterBootBlock -> INFO 007 Cluster boot block is bootstrap (genesis) block; Blocks Header.Number system-channel=0, bootstrap=0
2020-04-23 01:35:06.373 UTC [orderer.common.server] Main -> INFO 008 Setting up cluster for orderer type etcdraft
2020-04-23 01:35:06.376 UTC [orderer.common.cluster] loadVerifier -> INFO 009 Loaded verifier for channel syschannel from config block at index 0
2020-04-23 01:35:06.376 UTC [orderer.common.server] reuseListener -> INFO 00a Cluster listener is not configured, defaulting to use the general listener on port 8050
2020-04-23 01:35:06.376 UTC [orderer.common.server] Main -> INFO 00b Not bootstrapping because of existing channels
2020-04-23 01:35:06.381 UTC [orderer.consensus.etcdraft] HandleChain -> INFO 00c EvictionSuspicion not set, defaulting to 10m0s
2020-04-23 01:35:06.381 UTC [orderer.commmon.multichannel] newChainSupport -> PANI 00d [channel: syschannel] Error creating consenter: failed to parse TickInterval () to time duration
panic: [channel: syschannel] Error creating consenter: failed to parse TickInterval () to time duration

goroutine 1 [running]:
github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc000220420, 0x0, 0x0, 0x0)
        /go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/zapcore/entry.go:229 +0x546
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).log(0xc0000100e0, 0x4, 0x10697aa, 0x2a, 0xc0002b39f8, 0x2, 0x2, 0x0, 0x0, 0x0)
        /go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:234 +0x100
github.com/hyperledger/fabric/vendor/go.uber.org/zap.(*SugaredLogger).Panicf(...)
        /go/src/github.com/hyperledger/fabric/vendor/go.uber.org/zap/sugar.go:159
github.com/hyperledger/fabric/common/flogging.(*FabricLogger).Panicf(...)
        /go/src/github.com/hyperledger/fabric/common/flogging/zap.go:74
github.com/hyperledger/fabric/orderer/common/multichannel.newChainSupport(0xc0001e0500, 0xc00053dac0, 0xc0004132f0, 0x7fa68c7d8dc8, 0xc0003655c0, 0xc00042e310, 0x11e00e0, 0xc00034e1e0, 0x0)
        /go/src/github.com/hyperledger/fabric/orderer/common/multichannel/chainsupport.go:83 +0xa33
github.com/hyperledger/fabric/orderer/common/multichannel.(*Registrar).Initialize(0xc0001e0500, 0xc0004132f0)
        /go/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:175 +0x26a
github.com/hyperledger/fabric/orderer/common/server.initializeMultichannelRegistrar(0xc000106bc0, 0xc00012e300, 0xc0001dfea0, 0x0, 0x0, 0xc00024d800, 0x3ed, 0x5ed, 0xc00039e900, 0xf1, ...)
        /go/src/github.com/hyperledger/fabric/orderer/common/server/main.go:721 +0x468
github.com/hyperledger/fabric/orderer/common/server.Main()
        /go/src/github.com/hyperledger/fabric/orderer/common/server/main.go:199 +0xcdf
main.main()
        /go/src/github.com/hyperledger/fabric/cmd/orderer/main.go:15 +0x20

configtx.yaml

---

Organizations:

    - &org0
        Name: org0
        ID: org0MSP
        MSPDir: ../organizations/org0/msp
        Policies:
            Readers:
                Type: Signature
                Rule: "OR('org0MSP.member')"
            Writers:
                Type: Signature
                Rule: "OR('org0MSP.member')"
            Admins:
                Type: Signature
                Rule: "OR('org0MSP.admin')"

    - &org1
        Name: org1
        ID: org1MSP
        MSPDir: ../organizations/org1/msp
        Policies:
            Readers:
                Type: Signature
                Rule: "OR('org1MSP.member')"
            Writers:
                Type: Signature
                Rule: "OR('org1MSP.member')"
            Admins:
                Type: Signature
                Rule: "OR('org1MSP.admin')"
            Endorsement:
                Type: Signature
                Rule: "OR('org1MSP.member')"
        AnchorPeers:
            - Host: 10.21.10.200
              Port: 8051

Capabilities:
    Channel: &ChannelCapabilities
        V2_0: true
    Orderer: &OrdererCapabilities
        V2_0: true
    Application: &ApplicationCapabilities
        V2_0: true

Application: &ApplicationDefaults

    Organizations:

    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
        LifecycleEndorsement:
            Type: ImplicitMeta
            Rule: "MAJORITY Endorsement"
        Endorsement:
            Type: ImplicitMeta
            Rule: "MAJORITY Endorsement"

    Capabilities:
        <<: *ApplicationCapabilities

Orderer: &OrdererDefaults

    OrdererType: etcdraft

    Addresses:
        - 10.1.203.12:8050

    BatchTimeout: 2s

    BatchSize:
        MaxMessageCount: 10
        AbsoluteMaxBytes: 99 MB
        PreferredMaxBytes: 512 KB

    Organizations:

    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
        BlockValidation:
            Type: ImplicitMeta
            Rule: "ANY Writers"

Channel: &ChannelDefaults
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
    Capabilities:
        <<: *ChannelCapabilities

Profiles:

    OrgsOrdererGenesis:
        <<: *ChannelDefaults
        Orderer:
            <<: *OrdererDefaults
            OrdererType: etcdraft
            EtcdRaft:
                Consenters:
                    - Host: 10.1.203.12
                      Port: 8050
                      ClientTLSCert: ../organizations/org0/orderer/tls-msp/signcerts/cert.pem
                      ServerTLSCert: ../organizations/org0/orderer/tls-msp/signcerts/cert.pem 
            Addresses:
                - 10.1.203.12:8050

            Organizations:
            - *org0
            Capabilities:
                <<: *OrdererCapabilities
        Application:
            <<: *ApplicationDefaults
            Organizations:
            - <<: *org0
        Consortiums:
            SampleConsortium:
                Organizations:
                - *org1

    OrgsChannel:
        Consortium: SamplepConsortium
        <<: *ChannelDefaults
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *org1
            Capabilities:
                <<: *ApplicationCapabilities

docker-compose-orderer-org0.yml。

version: '2'

services:
  orderer-org0:
    container_name: orderer-org0_bh
    image: hyperledger/fabric-orderer:2.0
    environment:
      - ORDERER_HOME=/tmp/hyperledger/org0/orderer
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_LISTENPORT=8050
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/tmp/hyperledger/org0/orderer/genesis.block
      - ORDERER_GENERAL_LOCALMSPID=org0MSP
      - ORDERER_GENERAL_LOCALMSPDIR=/tmp/hyperledger/org0/orderer/msp
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_CERTIFICATE=/tmp/hyperledger/org0/orderer/tls-msp/signcerts/cert.pem
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/tmp/hyperledger/org0/orderer/tls-msp/keystore/key.pem
      - ORDERER_GENERAL_TLS_ROOTCAS=[/tmp/hyperledger/org0/orderer/tls-msp/tlscacerts/tls-10-1-203-12-8052.pem]
      - ORDERER_GENERAL_LOGLEVEL=debug
      - ORDERER_DEBUG_BROADCASTTRACEDIR=data/logs
    volumes:
      - /home/bhlee/fabric_multi_ca/organizations/org0/orderer:/tmp/hyperledger/org0/orderer/
    ports:
      - 8050:8050

我在等你的帮助,谢谢。

解决方案:

请检查您的 configtxgen 是对应最新的版本。另外,请尝试用新的卷挂载重启订单器。

给TA打赏
共{{data.count}}人
人已打赏
解决方案

想在linux上通过cron运行一个脚本,并在终端上显示。

2022-5-11 17:00:16

解决方案

当运行.configure安装Kerberos v5时出现错误。

2022-5-11 17:00:18

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索