docker exec cli peer channel create|无法创建新连接:上下文截止日期已超过|amazo



我正试图按照本指南使用亚马逊管理的区块链建立超级账本结构区块链网络。在步骤6中,为了创建信道,我执行了以下命令,

docker exec cli peer channel create -c hrschannel -f /opt/home/hrschannel.pb -o orderer.n-zzzz.managedblockchain.us-east-1.amazonaws.com:30001 --cafile /opt/home/managedblockchain-tls-chain.pem --tls

但我得到了以下错误,

Error: failed to create deliver client: orderer client failed to connect to orderer.n-zzzz.managedblockchain.us-east-1.amazonaws.com:30001: failed to create new connection: context deadline exceeded

请帮助我解决此问题。

编辑时间:我在reddit上问了同样的问题。一位用户回答说,他在我的configtx.yaml文件中添加了listenAddress环境变量。他没有明确说明在configtx.yaml中添加哪个listenAddress和地址的位置。这是我的configtx.yaml文件。

################################################################################
#
# Section: Organizations
#
# - This section defines the different organizational identities which will
# be referenced later in the configuration.
#
################################################################################
Organizations:
- &Org1
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: m-CUB6HI
# ID to load the MSP definition as
ID: m-B6HI
MSPDir: /opt/home/admin-msp
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
AnchorPeers:
- Host:
Port:

################################################################################
#
# 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:

################################################################################
#
# Profile
#
# - Different configuration profiles may be encoded here to be specified
# as parameters to the configtxgen tool
#
################################################################################
Profiles:
OneOrgChannel:
Consortium: AWSSystemConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1

请帮助我解决此问题。

必须检查对等容器是否能够与订购方容器通信。curl orderer.endpoint port可用于检查连接。如果对等方无法通信,则订购方容器已关闭,或者可能是由于不同的安全组造成的。

更新:正如OP在评论中提到的,更改端口有助于解决问题。必须试一试。

最新更新