我能够使用RAFT订购服务创建频道并调用/实例化链码。
但是之后,在对等日志中出现此错误
2019-10-16 06:22:05.807 UTC [ConnProducer] NewConnection -> ERRO 040 Failed connecting to {oodjaeuen108-orderer2.orderer.com:7050 []} , error:context deadline exceeded
2019-10-16 06:22:08.808 UTC [ConnProducer] NewConnection -> ERRO 041 Failed connecting to {104.211.89.242:51013 []} , error: context deadline exceeded
2019-10-16 06:22:11.810 UTC [ConnProducer] NewConnection -> ERRO 042 Failed connecting to {104.211.89.242:51011 []} , error: context deadline exceeded
2019-10-16 06:22:14.811 UTC [ConnProducer] NewConnection -> ERRO 043 Failed connecting to {oodjaeuen108-orderer0.orderer.com:7050 []} , error:context deadline exceeded
2019-10-16 06:22:17.812 UTC [ConnProducer] NewConnection -> ERRO 044 Failed connecting to {104.211.89.242:51012 []} , error: context deadline exceeded
2019-10-16 06:22:20.814 UTC [ConnProducer] NewConnection -> ERRO 045 Failed connecting to {oodjaeuen108-orderer1.orderer.com:7050 []} , error:context deadline exceeded
2019-10-16 06:22:20.814 UTC [ConnProducer] NewConnection -> ERRO 046 Could not connect to any of the endpoints: [{oodjaeuen108-orderer2.orderer.com:7050 []} {104.211.89.242:51013 []} {104.211.89.242:51011 []} {oodjaeuen108-orderer0.orderer.com:7050 []} {104.211.89.242:51012 []} {oodjaeuen108-orderer1.orderer.com:7050 []}]
2019-10-16 06:22:20.815 UTC [deliveryClient] connect -> ERRO 047 Failed obtaining connection: could not connect to any of the endpoints: [{oodjaeuen108-orderer2.orderer.com:7050 []} {104.211.89.242:51013 []} {104.211.89.242:51011 []} {oodjaeuen108-orderer0.orderer.com:7050 []} {104.211.89.242:51012 []} {oodjaeuen108-orderer1.orderer.com:7050 []}]
2019-10-16 06:22:20.815 UTC [deliveryClient] try -> WARN 048 Got error: could not connect to any of the endpoints: [{oodjaeuen108-orderer2.orderer.com:7050 []} {104.211.89.242:51013 []} {104.211.89.242:51011 []} {oodjaeuen108-orderer0.orderer.com:7050 []} {104.211.89.242:51012 []} {oodjaeuen108-orderer1.orderer.com:7050 []}] , at 1 attempt. Retrying in 1s
2019-10-16 06:22:24.816 UTC [ConnProducer] NewConnection -> ERRO 049 Failed connecting to {oodjaeuen108-orderer2.orderer.com:7050 []} , error:context deadline exceeded
现在,我想将另一个组织添加到现有渠道中。我升级了财团和渠道。这样做没有任何错误,也能够加入频道。在调用时,我在同级中收到错误。
Creating ledger [swapchannel] with genesis block
2019-10-11 06:58:48.857 UTC [fsblkstorage] newBlockfileMgr -> INFO 02e Getting block information from block storage
2019-10-11 06:58:48.996 UTC [couchdb] CreateDatabaseIfNotExist -> INFO 02f Created state database swapchannel_
2019-10-11 06:58:49.150 UTC [kvledger] CommitWithPvtData -> INFO 030 [swapchannel] Committed block [0] with 1 transaction(s) in 142ms (state_validation=1ms block_and_pvtdata_commit=90ms state_commit=42ms) commitHash=[]
2019-10-11 06:58:49.193 UTC [ledgermgmt] CreateLedger -> INFO 031 Created ledger [swapchannel] with genesis block
2019-10-11 06:58:49.204 UTC [gossip.service] updateAnchors -> ERRO 032 Tried joining channel swapchannel but our org( abc1MSP ), isn't among the orgs of the channel: [SwapMSP] , aborting.
2019-10-11 06:58:49.258 UTC [gossip.state] NewGossipStateProvider -> INFO 033 Updating metadata information, current ledger sequence is at = 0, next expected block is = 1
2019-10-11 06:58:49.258 UTC [gossip.gossip] UpdateLedgerHeight -> WARN 034 No such channel [115 119 97 112 99 104 97 110 110 101 108]
2019-10-11 06:58:49.259 UTC [sccapi] deploySysCC -> INFO 035 system chaincode lscc/swapchannel(github.com/hyperledger/fabric/core/scc/lscc) deployed
2019-10-11 06:58:49.259 UTC [cscc] Init -> INFO 036 Init CSCC
2019-10-11 06:58:49.259 UTC [sccapi] deploySysCC -> INFO 037 system chaincode cscc/swapchannel(github.com/hyperledger/fabric/core/scc/cscc) deployed
2019-10-11 06:58:49.259 UTC [qscc] Init -> INFO 038 Init QSCC
2019-10-11 06:58:49.259 UTC [sccapi] deploySysCC -> INFO 039 system chaincode qscc/swapchannel(github.com/hyperledger/fabric/core/scc/qscc) deployed
2019-10-11 06:58:49.260 UTC [sccapi] deploySysCC -> INFO 03a system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled
2019-10-11 06:58:49.260 UTC [gossip.gossip] UpdateChaincodes -> WARN 03b No such channel [115 119 97 112 99 104 97 110 110 101 108]
2019-10-11 06:58:49.260 UTC [endorser] callChaincode -> INFO 03c [][0a258cff] Exit chaincode: name:"cscc"
2019-10-11 06:59:44.628 UTC [protoutils] ValidateProposalMessage -> WARN 0ec channel [swapchannel]: MSP error: MSP abc1MSP is unknown
2019-10-11 06:59:55.269 UTC [gossip.gossip] Gossip -> WARN 10a Failed obtaining gossipChannel of [115 119 97 112 99 104 97 110 110 101 108] aborting
2019-10-11 06:59:55.281 UTC [ConnProducer] NewConnection -> ERRO 10b Failed connecting to {oodjaeuen108-orderer0.orderer.com:7050 []} , error: context deadlineexceeded
2019-10-11 07:00:58.288 UTC [ConnProducer] NewConnection -> ERRO 142 Failed connecting to {oodjaeuen108-orderer1.orderer.com:7050 []} , error: context deadlineexceeded
2019-10-11 07:01:00.275 UTC [gossip.gossip] Gossip -> WARN 143 Failed obtaining gossipChannel of [115 119 97 112 99 104 97 110 110 101 108] aborting
此处是用于创建Genesis.block的configtx.yml
---
################################################################################
#
# Section: Organizations
#
# - This section defines the different organizational identities which will
# be referenced later in the configuration.
#
################################################################################
Organizations:
# SampleOrg defines an MSP using the sampleconfig. It should never be used
# in production but may be used as a template for other definitions
#PLACEHOLDER1
- &Orderer
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: Orderer
# ID to load the MSP definition as
ID: OrdererMSP
# MSPDir is the filesystem path which contains the MSP configuration
MSPDir: crypto-config/ordererOrganizations/orderer.com/msp
################################################################################
#
# SECTION: Capabilities
#
# - This section defines the capabilities of fabric network. This is a new
# concept as of v1.1.0 and should not be utilized in mixed networks with
# v1.0.x peers and orderers. Capabilities define features which must be
# present in a fabric binary for that binary to safely participate in the
# fabric network. For instance, if a new MSP type is added, newer binaries
# might recognize and validate the signatures from this type, while older
# binaries without this support would be unable to validate those
# transactions. This could lead to different versions of the fabric binaries
# having different world states. Instead, defining a capability for a channel
# informs those binaries without this capability that they must cease
# processing transactions until they have been upgraded. For v1.0.x if any
# capabilities are defined (including a map with all capabilities turned off)
# then the v1.0.x peer will deliberately crash.
#
################################################################################
Capabilities:
# Orderer capabilities apply only to the orderers, and may be safely
# used with prior release peers.
# Set the value of the capability to true to require it.
Orderer: &OrdererCapabilities
# V1.4.2 for Orderer is a catchall flag for behavior which has been
# determined to be desired for all orderers running at the v1.4.2
# level, but which would be incompatible with orderers from prior releases.
# Prior to enabling V1.4.2 orderer capabilities, ensure that all
# orderers on a channel are at v1.4.2 or later.
V1_4_2: true
# Application capabilities apply only to the peer network, and may be safely
# used with prior release orderers.
# Set the value of the capability to true to require it.
Application: &ApplicationCapabilities
# V1.4.2 for Application enables the new non-backwards compatible
# features and fixes of fabric v1.4.2.
V1_4_2: true
# V1.3 for Application enables the new non-backwards compatible
# features and fixes of fabric v1.3.
V1_3: false
# V1.2 for Application enables the new non-backwards compatible
# features and fixes of fabric v1.2 (note, this need not be set if
# later version capabilities are set)
V1_2: false
# V1.1 for Application enables the new non-backwards compatible
# features and fixes of fabric v1.1 (note, this need not be set if
# later version capabilities are set).
V1_1: false
################################################################################
#
# SECTION: Application
#
# - This section defines the values to encode into a config transaction or
# genesis block for application related parameters
#
################################################################################
Application: &ApplicationDefaults
# Organizations is the list of orgs which are defined as participants on
# the application side of the network
Organizations:
# Policies defines the set of policies at this level of the config tree
# For Application policies, their canonical path is
# /Channel/Application/<PolicyName>
Capabilities:
<<: *ApplicationCapabilities
################################################################################
#
# SECTION: Orderer
#
# - This section defines the values to encode into a config transaction or
# genesis block for orderer related parameters
#
################################################################################
Orderer: &OrdererDefaults
# Orderer Type: The orderer implementation to start
# Available types are "solo" and "kafka"
OrdererType: etcdraft
EtcdRaft:
Consenters:
#PLACEHOLDER2
- Host: oodjaeuen108-orderer2.orderer.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/oodjaeuen108-orderer2.orderer.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/oodjaeuen108-orderer2.orderer.com/tls/server.crt
- Host: oodjaeuen108-orderer1.orderer.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/oodjaeuen108-orderer1.orderer.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/oodjaeuen108-orderer1.orderer.com/tls/server.crt
- Host: oodjaeuen108-orderer0.orderer.com
Port: 7050
ClientTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/oodjaeuen108-orderer0.orderer.com/tls/server.crt
ServerTLSCert: crypto-config/ordererOrganizations/orderer.com/orderers/oodjaeuen108-orderer0.orderer.com/tls/server.crt
Organizations:
#PLACEHOLDER3
- *Orderer
Addresses:
#PLACEHOLDER4
- oodjaeuen108-orderer2.orderer.com:7050
- oodjaeuen108-orderer1.orderer.com:7050
- oodjaeuen108-orderer0.orderer.com: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:
# Max Message Count: The maximum number of messages to permit in a batch
MaxMessageCount: 10
# Absolute Max Bytes: The absolute maximum number of bytes allowed for
# the serialized messages in a batch.
AbsoluteMaxBytes: 99 MB
# Preferred Max Bytes: The preferred maximum number of bytes allowed for
# the serialized messages in a batch. A message larger than the preferred
# max bytes will result in a batch larger than preferred max bytes.
PreferredMaxBytes: 512 KB
# Organizations is the list of orgs which are defined as participants on
# the orderer side of the network
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"
################################################################################
#
# Profile
#
# - Different configuration profiles may be encoded here to be specified
# as parameters to the configtxgen tool
#
################################################################################
Profiles:
OrdererGenesis:
Orderer:
<<: *OrdererDefaults
Capabilities:
<<: *OrdererCapabilities
Consortiums:
defaultConsortium:
Organizations: