加入最近创建的频道后出现错误 &{NOT_FOUND}
Got error &{NOT_FOUND} after joining a recently created channel
我是 运行 遵循此架构的自定义 Hyperledger Fabric 网络:
- org1
- peer0(锚点)
- 同行 1
- 订购者 0
- org2
- peer0(锚点)
- 同行 1
- 订购者 0
- org3
- 订购者 0
部署后,似乎一切正常。但是,如果我创建一个频道并从每个对等方加入它,我会在其中收到以下日志警告。即使是警告,我想这也意味着它无法正常工作。
2019-10-07 10:38:17.323 UTC [blocksProvider] DeliverBlocks -> WARN 044 [global] Got error &{NOT_FOUND}
CLI 上(当我加入频道时)和排序者上都没有显示错误,但是在对等节点加入频道后这些错误中有一些 activity,因此可以检测到更改。频道名称是 global
,包括所有组织和同行。
这是完整的日志(没有 gossip 或 grpc 消息):
2019-10-07 10:38:10.875 UTC [endorser] callChaincode -> INFO 024 [][ae2945c0] Entry chaincode: name:"cscc"
2019-10-07 10:38:10.877 UTC [ledgermgmt] CreateLedger -> INFO 025 Creating ledger [global] with genesis block
2019-10-07 10:38:10.886 UTC [fsblkstorage] newBlockfileMgr -> INFO 026 Getting block information from block storage
2019-10-07 10:38:10.899 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 027 Created state database global_
2019-10-07 10:38:10.960 UTC [kvledger] CommitWithPvtData -> INFO 028 [global] Committed block [0] with 1 transaction(s) in 60ms (state_validation=0ms block_and_pvtdata_commit=7ms state_commit=52ms) commitHash=[]
2019-10-07 10:38:10.961 UTC [ledgermgmt] CreateLedger -> INFO 029 Created ledger [global] with genesis block
2019-10-07 10:38:10.997 UTC [sccapi] deploySysCC -> INFO 034 system chaincode lscc/global(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-10-07 10:38:10.998 UTC [cscc] Init -> INFO 035 Init CSCC
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 036 system chaincode cscc/global(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-10-07 10:38:10.998 UTC [qscc] Init -> INFO 037 Init QSCC
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 038 system chaincode qscc/global(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 039 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-10-07 10:38:10.998 UTC [endorser] callChaincode -> INFO 03a [][ae2945c0] Exit chaincode: name:"cscc" (123ms)
2019-10-07 10:38:17.002 UTC [blocksProvider] DeliverBlocks -> WARN 040 [global] Got error &{NOT_FOUND}
有什么方法可以消除 NOT_FOUND 警告?我没有尝试遵循和部署链码,但我很确定它不会起作用。
感谢您的帮助。
更新:这是我的configtx.yaml文件:
Capabilities:
Global: &ChannelCapabilities
V1_3: true
Orderer: &OrdererCapabilities
V1_1: true
Application: &ApplicationCapabilities
V1_3: true
Organizations:
- &org1
Name: org1
ID: org1MSP
MSPDir: /data/orgs/org1/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org1MSP.member')"
Writers:
Type: Signature
Rule: "OR('org1MSP.member')"
Admins:
Type: Signature
Rule: "OR('org1MSP.admin')"
AnchorPeers:
- Host: peer0.org1
Port: 7051
- &org2
Name: org2
ID: org2MSP
MSPDir: /data/orgs/org2/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org2MSP.member')"
Writers:
Type: Signature
Rule: "OR('org2MSP.member')"
Admins:
Type: Signature
Rule: "OR('org2MSP.admin')"
AnchorPeers:
- Host: peer0.org2
Port: 7051
- &org3
Name: org3
ID: org3MSP
MSPDir: /data/orgs/org3/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org3MSP.member')"
Writers:
Type: Signature
Rule: "OR('org3MSP.member')"
Admins:
Type: Signature
Rule: "OR('org3MSP.admin')"
Orderer: &OrdererDefaults
OrdererType: kafka
Addresses:
- orderer0.org1:7050
- orderer0.org2:7050
- orderer0.org3:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 98 MB
PreferredMaxBytes: 512 KB
MaxChannels: 0
Kafka:
Brokers:
- bootstrap.kafka:9092
Organizations:
- *org1
- *org2
- *org3
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
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
Profiles:
OrgsOrdererGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *org1
- *org2
- *org3
Capabilities:
<<: *OrdererCapabilities
Application:
<<: *ApplicationDefaults
Organizations:
- *org1
- *org2
- *org3
Capabilities:
<<: *ApplicationCapabilities
Consortiums:
SampleConsortium:
Organizations:
- *org1
- *org2
OrgsChannel:
Capabilities:
<<: *ChannelCapabilities
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *org1
- *org2
Capabilities:
<<: *ApplicationCapabilities
错误是因为您使用创世块加入频道,而不是当您使用文件 channel.tx 创建频道时,将生成一个名为 channel.block 的文件,在您的对等频道加入命令中传递该文件
peer channel join -b channel.block
我是 运行 遵循此架构的自定义 Hyperledger Fabric 网络:
- org1
- peer0(锚点)
- 同行 1
- 订购者 0
- org2
- peer0(锚点)
- 同行 1
- 订购者 0
- org3
- 订购者 0
部署后,似乎一切正常。但是,如果我创建一个频道并从每个对等方加入它,我会在其中收到以下日志警告。即使是警告,我想这也意味着它无法正常工作。
2019-10-07 10:38:17.323 UTC [blocksProvider] DeliverBlocks -> WARN 044 [global] Got error &{NOT_FOUND}
CLI 上(当我加入频道时)和排序者上都没有显示错误,但是在对等节点加入频道后这些错误中有一些 activity,因此可以检测到更改。频道名称是 global
,包括所有组织和同行。
这是完整的日志(没有 gossip 或 grpc 消息):
2019-10-07 10:38:10.875 UTC [endorser] callChaincode -> INFO 024 [][ae2945c0] Entry chaincode: name:"cscc"
2019-10-07 10:38:10.877 UTC [ledgermgmt] CreateLedger -> INFO 025 Creating ledger [global] with genesis block
2019-10-07 10:38:10.886 UTC [fsblkstorage] newBlockfileMgr -> INFO 026 Getting block information from block storage
2019-10-07 10:38:10.899 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 027 Created state database global_
2019-10-07 10:38:10.960 UTC [kvledger] CommitWithPvtData -> INFO 028 [global] Committed block [0] with 1 transaction(s) in 60ms (state_validation=0ms block_and_pvtdata_commit=7ms state_commit=52ms) commitHash=[]
2019-10-07 10:38:10.961 UTC [ledgermgmt] CreateLedger -> INFO 029 Created ledger [global] with genesis block
2019-10-07 10:38:10.997 UTC [sccapi] deploySysCC -> INFO 034 system chaincode lscc/global(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-10-07 10:38:10.998 UTC [cscc] Init -> INFO 035 Init CSCC
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 036 system chaincode cscc/global(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-10-07 10:38:10.998 UTC [qscc] Init -> INFO 037 Init QSCC
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 038 system chaincode qscc/global(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-10-07 10:38:10.998 UTC [sccapi] deploySysCC -> INFO 039 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-10-07 10:38:10.998 UTC [endorser] callChaincode -> INFO 03a [][ae2945c0] Exit chaincode: name:"cscc" (123ms)
2019-10-07 10:38:17.002 UTC [blocksProvider] DeliverBlocks -> WARN 040 [global] Got error &{NOT_FOUND}
有什么方法可以消除 NOT_FOUND 警告?我没有尝试遵循和部署链码,但我很确定它不会起作用。
感谢您的帮助。
更新:这是我的configtx.yaml文件:
Capabilities:
Global: &ChannelCapabilities
V1_3: true
Orderer: &OrdererCapabilities
V1_1: true
Application: &ApplicationCapabilities
V1_3: true
Organizations:
- &org1
Name: org1
ID: org1MSP
MSPDir: /data/orgs/org1/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org1MSP.member')"
Writers:
Type: Signature
Rule: "OR('org1MSP.member')"
Admins:
Type: Signature
Rule: "OR('org1MSP.admin')"
AnchorPeers:
- Host: peer0.org1
Port: 7051
- &org2
Name: org2
ID: org2MSP
MSPDir: /data/orgs/org2/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org2MSP.member')"
Writers:
Type: Signature
Rule: "OR('org2MSP.member')"
Admins:
Type: Signature
Rule: "OR('org2MSP.admin')"
AnchorPeers:
- Host: peer0.org2
Port: 7051
- &org3
Name: org3
ID: org3MSP
MSPDir: /data/orgs/org3/msp
AdminPrincipal: Role.ADMIN
Policies:
Readers:
Type: Signature
Rule: "OR('org3MSP.member')"
Writers:
Type: Signature
Rule: "OR('org3MSP.member')"
Admins:
Type: Signature
Rule: "OR('org3MSP.admin')"
Orderer: &OrdererDefaults
OrdererType: kafka
Addresses:
- orderer0.org1:7050
- orderer0.org2:7050
- orderer0.org3:7050
BatchTimeout: 2s
BatchSize:
MaxMessageCount: 10
AbsoluteMaxBytes: 98 MB
PreferredMaxBytes: 512 KB
MaxChannels: 0
Kafka:
Brokers:
- bootstrap.kafka:9092
Organizations:
- *org1
- *org2
- *org3
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
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
Profiles:
OrgsOrdererGenesis:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
Organizations:
- *org1
- *org2
- *org3
Capabilities:
<<: *OrdererCapabilities
Application:
<<: *ApplicationDefaults
Organizations:
- *org1
- *org2
- *org3
Capabilities:
<<: *ApplicationCapabilities
Consortiums:
SampleConsortium:
Organizations:
- *org1
- *org2
OrgsChannel:
Capabilities:
<<: *ChannelCapabilities
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *org1
- *org2
Capabilities:
<<: *ApplicationCapabilities
错误是因为您使用创世块加入频道,而不是当您使用文件 channel.tx 创建频道时,将生成一个名为 channel.block 的文件,在您的对等频道加入命令中传递该文件
peer channel join -b channel.block