我正在探索亚马逊管理的区 block 链。创建网络(Hyperledger Fabric 1.2),添加第一个成员,添加对等节点并创建 VPC 服务端点。一个示例链节点被调用,我也能够查询链节点。 现在我想在现有网络中添加另一个成员,但我无法这样做。我没有使用亚马逊管理的区 block 链仪表板,而是使用 AWS CLI 并使用以下命令。
Using username "ec2-user".
Authenticating with public key "imported-openssh-key"
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-2/
aws managedblockchain create-network --network-configuration Name='nmynetwork, Description=mynetwork, Framework=HYPERLEDGER_FABRIC,FrameworkVersion=1.2' --member-configuration 'Name=mynetworkmember2, Description=mynetworkmember2, FrameworkConfiguration={Fabric={AdminUsername=adminxxxx, AdminPassword=Adminxxxx}}'
但 CLI 显示以下错误。
An error occurred (ResourceLimitExceededException) when calling the CreateNetwork operation (reached max retries: 4): You cannot create a new network. You at any given time.
然后我尝试在新网络中添加成员。但是错误是相似的。
aws managedblockchain create-network --network-configuration Name='newnetwork, Description=mynetwork, Framework=HYPERLEDGER_FABRIC,FrameworkVersion=1.2' --member-configuration 'Name=mynetworkmember2, Description=mynetworkmember2, FrameworkConfiguration={Fabric={AdminUsername=adminxxx, AdminPassword=Adminxxx}}'
结果
An error occurred (ResourceLimitExceededException) when calling the CreateNetwork operation (reached max retries: 4): You cannot create a new network. You at any given time.
我还查看了 AWS 文档,他们还提到了相同的“create-network”命令来创建网络并在网络中添加成员。
When you create the network, you also must create the first member in the network using the --member-configuration option. Because Managed Blockchain creates a certificate authority (CA) with each member that handles authenticating users, you must provide a user name and password for the administrator. You specify these using the AdminUsername and AdminPassword properties. The password you use must be a minimum of 8 characters, and contain at least one number and one capital letter. Remember the user name and password. You need them later any time you create users and resources that need to authenticate.
Create the network using an AWS CLI command similar to the following:
aws managedblockchain create-network
有人可以在这方面帮助我吗?提前致谢。
最佳答案
您知道亚马逊管理的区 block 链现阶段处于预览阶段,并且仅在 1 个区域 us-east-1 可用。 AWS 只允许每个 AWS 账户使用一个网络。请参阅 AWS 突出显示的限制。 known-issues-limits
Availability is limited to us-east-1.
Hyperledger Fabric is the only supported blockchain framework.
The maximum number of networks per AWS account is 1.
The maximum number of networks that an AWS account can be a member of is 1.
The maximum number of members per network is 5.
The maximum number of peer nodes per member is 1.
Peer nodes are limited to the bc.t3.small instance type.
您需要在 AWS CLI 中使用 create-member 命令,而不是使用 create-network(因为您不能在一个 AWS 账户中创建多个网络)。 这是 create-member 命令的概要。
NAME
create-member -
DESCRIPTION
Creates a member within the blockchain network.
See also: AWS API Documentation
See 'aws help' for descriptions of global parameters.
SYNOPSIS
create-member
[--client-request-token <value>]
--network-id <value>
--member-configuration <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
OPTIONS
--client-request-token (string)
An idempotency token. Set to an arbitrary unique value.
--network-id (string)
The unique identifier of the network in which the member is created.
--member-configuration (structure)
Member configuration parameters.
Shorthand Syntax:
Name=string,Description=string,FrameworkConfiguration={Fabric={AdminUsername=string,AdminPassword=string}}
JSON Syntax:
{
"Name": "string",
"Description": "string",
"FrameworkConfiguration": {
"Fabric": {
"AdminUsername": "string",
"AdminPassword": "string"
}
}
}
--cli-input-json (string) Performs service operation based on the JSON
string provided. The JSON string follows the format provided by --gen-
erate-cli-skeleton. If other arguments are provided on the command
line, the CLI values will override the JSON-provided values. It is not
possible to pass arbitrary binary values using a JSON-provided value as
the string will be taken literally.
--generate-cli-skeleton (string) Prints a JSON skeleton to standard
output without sending an API request. If provided with no value or the
value input, prints a sample input JSON that can be used as an argument
for --cli-input-json. If provided with the value output, it validates
the command inputs and returns a sample output JSON for that command.
See 'aws help' for descriptions of global parameters.
OUTPUT
MemberId -> (string)
The unique identifier of the member.
关于linux - 在 amazonmanaged 区 block 链上将成员添加到现有的 hyperledger Fabric 1.2 网络,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54275221/