授权更新:验证ReadSet时出错:readset预期键[Group] / Channel / Application为版本0,但版本为1

时间:2018-10-16 09:04:40

标签: hyperledger-fabric

在部署fabirc1.2时,创建频道时发生以下错误:

2018-10-16 16:30:17.388 CST [grpc] Printf -> DEBU 039 scheme "" not registered, fallback to default scheme
2018-10-16 16:30:17.388 CST [grpc] Printf -> DEBU 03a ccResolverWrapper: sending new addresses to cc: [{orderer0.org-rjj.ansible-example.ee-chain.com:7050 0  <nil>}]
2018-10-16 16:30:17.388 CST [grpc] Printf -> DEBU 03b ClientConn switching balancer to "pick_first"
2018-10-16 16:30:17.388 CST [grpc] Printf -> DEBU 03c pickfirstBalancer: HandleSubConnStateChange: 0xc42040eac0, CONNECTING
2018-10-16 16:30:17.390 CST [grpc] Printf -> DEBU 03d pickfirstBalancer: HandleSubConnStateChange: 0xc42040eac0, READY
2018-10-16 16:30:17.390 CST [channelCmd] InitCmdFactory -> INFO 03e Endorser and orderer connections initialized
2018-10-16 16:30:17.390 CST [msp] GetDefaultSigningIdentity -> DEBU 03f Obtaining default signing identity
2018-10-16 16:30:17.391 CST [msp] GetDefaultSigningIdentity -> DEBU 040 Obtaining default signing identity
2018-10-16 16:30:17.391 CST [msp/identity] Sign -> DEBU 041 Sign: plaintext: 0AAE070A2A70656572732E6F72672D72...53616D706C65436F6E736F727469756D
2018-10-16 16:30:17.391 CST [msp/identity] Sign -> DEBU 042 Sign: digest: B45F9CEA46DAB3F45512D117865BF48F4D4A9764BDFFE0D288E9F1D83DD01ECF
2018-10-16 16:30:17.391 CST [msp] GetDefaultSigningIdentity -> DEBU 043 Obtaining default signing identity
2018-10-16 16:30:17.391 CST [msp] GetDefaultSigningIdentity -> DEBU 044 Obtaining default signing identity
2018-10-16 16:30:17.391 CST [msp/identity] Sign -> DEBU 045 Sign: plaintext: 0AE6070A1608021A060899C396DE0522...92D719221F4CDF485C77CE23D8EF7E09
2018-10-16 16:30:17.391 CST [msp/identity] Sign -> DEBU 046 Sign: digest: 532D17D411B841DE2BC78A4BA98D1E42BF52AF7327034F01683DAAB4309C4A7B
2018-10-16 16:30:17.391 CST [grpc] Printf -> DEBU 047 parsed scheme: ""
2018-10-16 16:30:17.391 CST [grpc] Printf -> DEBU 048 scheme "" not registered, fallback to default scheme
2018-10-16 16:30:17.391 CST [grpc] Printf -> DEBU 049 ccResolverWrapper: sending new addresses to cc: [{orderer0.org-rjj.ansible-example.ee-chain.com:7050 0  <nil>}]
2018-10-16 16:30:17.391 CST [grpc] Printf -> DEBU 04a ClientConn switching balancer to "pick_first"
2018-10-16 16:30:17.391 CST [grpc] Printf -> DEBU 04b pickfirstBalancer: HandleSubConnStateChange: 0xc42040fe70, CONNECTING
2018-10-16 16:30:17.393 CST [grpc] Printf -> DEBU 04c pickfirstBalancer: HandleSubConnStateChange: 0xc42040fe70, READY
Error: got unexpected status: BAD_REQUEST -- error authorizing update: error validating ReadSet: readset expected key [Group]  /Channel/Application at version 0, but got version 1

我个人认为configtx.yml是错误的,但是在管理人员使用e2e_cli的示例中我没有发现任何问题

这是我的configtx.yml文件的内容:

########################################################################################
#                                                                                      #
# Reference:                                                                           #
# - https://hyperledger-fabric.readthedocs.io/en/release-1.2/commands/configtxgen.html #
# - https://github.com/hyperledger/fabric/blob/release-1.2/sampleconfig/configtx.yaml  #
#                                                                                      #
########################################################################################
Organizations:
    - &orderer0
        Name: orderers.org-rjj.ansible-example.ee-chain.com
        ID: orderers.org-rjj.ansible-example.ee-chain.com
        MSPDir: ../../output/ansible-example.ee-chain.com/crypto-config/ordererOrganizations/org-rjj.ansible-example.ee-chain.com/msp
        Policies: &orderer0-Policies
            Readers:
                Type: Signature
                Rule: "OR('orderers.org-rjj.ansible-example.ee-chain.com.member')"
                #Rule: "OR('peers.member1.example.com.member','peers.member2.example.com.member')"
            Writers:
                Type: Signature
                Rule: "OR('orderers.org-rjj.ansible-example.ee-chain.com.member')"
                #Rule: "OR('peers.member1.example.com.admin','peers.member2.example.com.admin')"
            Admins:
                Type: Signature
                Rule: "OR('orderers.org-rjj.ansible-example.ee-chain.com.admin')"
                #Rule: "OR('peers.member1.example.com.admin','peers.member2.example.com.admin')"
    - &rjj
        ID: peers.org-rjj.ansible-example.ee-chain.com
        Name: peers.org-rjj.ansible-example.ee-chain.com
        MSPDir: ../../output/ansible-example.ee-chain.com/crypto-config/peerOrganizations/org-rjj.ansible-example.ee-chain.com/msp
        Policies: &rjj-Policies
            Readers:
                Type: Signature
                Rule: "OR('peers.org-rjj.ansible-example.ee-chain.com.member')"
            Writers:
                Type: Signature
                Rule: "OR('peers.org-rjj.ansible-example.ee-chain.com.admin','peers.org-rjj.ansible-example.ee-chain.com.client')"
            Admins:
                Type: Signature
                Rule: "OR('peers.org-rjj.ansible-example.ee-chain.com.admin')"
        AnchorPeers:
            - Host: peer0.org-rjj.ansible-example.ee-chain.com 
              Port: 7051

Capabilities:
    Global: &ChannelCapabilities
        V1_1: true
    Orderer: &OrdererCapabilities
        V1_1: true
    Application: &ApplicationCapabilities
        V1_2: true

Application: &ApplicationDefaults
    ACLs: &ACLsDefault
        lscc/ChaincodeExists: /Channel/Application/Readers
        lscc/GetDeploymentSpec: /Channel/Application/Readers
        lscc/GetChaincodeData: /Channel/Application/Readers
        lscc/GetInstantiatedChaincodes: /Channel/Application/Readers
        qscc/GetChainInfo: /Channel/Application/Readers
        qscc/GetBlockByNumber: /Channel/Application/Readers
        qscc/GetBlockByHash: /Channel/Application/Readers
        qscc/GetTransactionByID: /Channel/Application/Readers
        qscc/GetBlockByTxID: /Channel/Application/Readers
        cscc/GetConfigBlock: /Channel/Application/Readers
        cscc/GetConfigTree: /Channel/Application/Readers
        cscc/SimulateConfigTreeUpdate: /Channel/Application/Readers
        peer/Propose: /Channel/Application/Writers
        peer/ChaincodeToChaincode: /Channel/Application/Readers
        event/Block: /Channel/Application/Readers
        event/FilteredBlock: /Channel/Application/Readers
    Organizations:
    Policies: &ApplicationDefaultPolicies
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
    Capabilities:
        <<: *ApplicationCapabilities

Orderer: &OrdererDefaults
    OrdererType: solo
    Addresses:
        - orderer0.org-rjj.ansible-example.ee-chain.com:7050
    BatchTimeout: 3s
    BatchSize:
        MaxMessageCount: 10
        AbsoluteMaxBytes: 98 MB
        PreferredMaxBytes: 512 KB
    MaxChannels: 0
    Kafka:
        Brokers:
        - kafka0:9092
        - kafka1:9092
        - kafka2:9092
    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"
    Capabilities:
        <<: *OrdererCapabilities

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

Profiles:
    OrdererGenesis:
        <<: *ChannelDefaults
        Capabilities:
            <<: *ChannelCapabilities
        Orderer:
            <<: *OrdererDefaults
            Organizations:
                - *orderer0
            Capabilities:
                <<: *OrdererCapabilities
        Consortiums:
            SampleConsortium:
                Organizations:
                    - *rjj
    Channel:
        Consortium: SampleConsortium
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *rjj
            Capabilities:
                <<: *ApplicationCapabilities

这是我用于创建频道的shell脚本,因此我可以确保此处的频道名称正确

#!/bin/bash
# Created by g7tianyi on 8/10/2018

set -e

pushd $(dirname $0) > /dev/null
SCRIPTPATH=$(pwd -P)
popd > /dev/null
SCRIPTFILE=$(basename $0)

# ================================================================================

CLI_INSTALL_PATH=/opt/app/fabric/cli/bin

CHANNEL_NAME="pptchannel"

export FABRIC_CFG_PATH=${SCRIPTPATH}
export CORE_PEER_TLS_ENABLED=true
export CORE_PEER_TLS_CERT_FILE=${SCRIPTPATH}/tls/server.crt
export CORE_PEER_TLS_KEY_FILE=${SCRIPTPATH}/tls/server.key
export CORE_PEER_MSPCONFIGPATH=${SCRIPTPATH}/msp
export CORE_PEER_TLS_ROOTCERT_FILE=${SCRIPTPATH}/tls/ca.crt

export CORE_PEER_ID=cli
export CORE_LOGGING_LEVEL=DEBUG

export CORE_PEER_ADDRESS=peer0.org-rjj.ansible-example.ee-chain.com:7051
export CORE_PEER_LOCALMSPID=peers.org-rjj.ansible-example.ee-chain.com

${CLI_INSTALL_PATH}/peer channel create \
    -o orderer0.org-rjj.ansible-example.ee-chain.com:7050 \
    -c ${CHANNEL_NAME} \
    -f ${SCRIPTPATH}/channel-artifacts/${CHANNEL_NAME}.tx \
    --tls --cafile tlsca.org-rjj.ansible-example.ee-chain.com-cert.pem

我没有使用docker。我部署的是一种由多台机器和多节点组成的结构,configtx.yml我使用了一台机器,只有一个订购者节点和一个对等节点

此外,我检查了错误报告后订购者节点和对等节点是否都正常运行

他说:enter link description here 我检查了之前的步骤,没有问题

我希望有人能给我一个新主意,我真的没办法,谢谢

0 个答案:

没有答案