docker exec cli peer channel create |无法创建新连接:超出上下文截止日期 |亚马逊管理的区块链
docker exec cli peer channel create | failed to create new connection: context deadline exceeded | amazon managed blockchain
我正在尝试使用 this guide 之后的亚马逊托管区块链来设置 hyperledger fabric 区块链网络。在第 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 环境变量。他没有说清楚关于哪个 listenAddress 以及在 configtx.yaml 中添加该地址的信息。这是我的 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 在评论中提到的,更改端口有助于解决问题。一定要试一试。
我正在尝试使用 this guide 之后的亚马逊托管区块链来设置 hyperledger fabric 区块链网络。在第 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 环境变量。他没有说清楚关于哪个 listenAddress 以及在 configtx.yaml 中添加该地址的信息。这是我的 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 在评论中提到的,更改端口有助于解决问题。一定要试一试。