首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在amazonmanaged块链上向现有的超级分类器Fabric 1.2网络添加成员

在amazonmanaged块链上向现有的超级分类器Fabric 1.2网络添加成员
EN

Stack Overflow用户
提问于 2019-01-20 09:46:29
回答 1查看 213关注 0票数 1

我正在探索亚马逊管理的区块链。创建网络(Hyperledger 1.2),添加第一个成员,添加对等节点,并创建VPC服务端点。调用一个示例chainnode,我也可以查询链表节点。现在我想在现有的网络中增加另一个成员,但我无法这样做。我没有使用amazon管理的块链仪表板,而是使用AWS并使用下面的命令。

代码语言:javascript
复制
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显示了下面的错误。

代码语言:javascript
复制
An error occurred (ResourceLimitExceededException) when calling the CreateNetwork operation (reached max retries: 4): You cannot create a new network. You at any given time.

然后我尝试在一个新的网络中添加成员。但是错误是相似的。

代码语言:javascript
复制
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}}'

结果

代码语言:javascript
复制
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文档,他们还提到了相同的“创建-网络”命令来创建网络并在网络中添加成员。

创建网络时,还必须使用-成员配置选项在网络中创建第一个成员。由于托管Blockchain使用处理身份验证用户的每个成员创建证书颁发机构(CA),因此必须为管理员提供用户名和密码。您可以使用AdminUsername和AdminPassword属性指定这些属性。您使用的密码必须至少有8个字符,并且至少包含一个数字和一个大写字母。记住用户名和密码。以后在创建需要身份验证的用户和资源时都需要它们。 使用AWS命令创建网络,如下所示:

代码语言:javascript
复制
aws managedblockchain create-network

有人能在这方面帮助我吗?提前谢谢。

EN

回答 1

Stack Overflow用户

发布于 2019-01-20 10:02:24

您知道,亚马逊管理的区块链在这一阶段是预览的,只有在一个地区,美国-东-1。AWS只允许每个AWS帐户一个网络。参见AWS突出显示的限制。已知-问题-限制

代码语言:javascript
复制
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帐户中创建多个网络),您需要在AWS中使用create命令。以下是创建成员命令的概要。

代码语言:javascript
复制
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.

或者,您可以使用aws托管块链仪表板在现有网络中添加成员。见附页截图。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54275221

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档