amazon-web-services - docker exec cli 对等通道创建 | 未能创建新连接:超出上下文期限 | 亚马逊管理的区块链
问题描述
我正在尝试按照本指南使用亚马逊管理的区块链设置超级账本结构区块链网络。在第 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
帮我解决这个问题。
解决方案
必须检查 peer 容器是否能够与 orderer 容器通信。curl orderer.endpoint port
可用于检查连接。如果对等方无法通信,则排序容器已关闭或可能是由于不同的安全组。
更新:正如评论中提到的 OP,更改端口有助于解决问题。必须试一试。
推荐阅读
- android - ZXingScanner查看扫描区域全屏
- c# - C# 在另一个构造函数中使用构造函数
- docker - 如何在 docker compose v. 3.7 中翻译桥接网络
- java - 如何使用 Java 将动态 IP 地址列入白名单?
- java - 如何使变量可以从子类而不是实例 java 访问?
- php - laravel 5.5 中的全局变量
- r - LibraryExecutionError - 测试通过 Rstudio RRS 提要发布的 Web 服务
- reactjs - 如何使用反应正确编写条件类型?
- java - Java中无限并行流映射减少管道的时间限制
- flutter - Flutter:读写用户可见文件