无法使用cloudshell创建Amazon Managed Blockchain教程中的Hyperledger Fabric Client

0

【以下的问题经过翻译处理】 亲爱的社区,

很抱歉,我不是技术专家,我急需帮助解决使用CloudShell CLI在第四步遇到的问题 --> https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/get-started-create-client.html

以下是遇到的问题:

sudo service docker start 
sudo: service: command not found 
[cloudshell-user@ip-10-4-189-71 ~]$ sudo docker version Client: 
Version: 20.10.23 
API version: 1.41 
Go version: go1.18.9 
Git commit: 7155243 
Built: Tue Apr 11 22:56:36 2023 
OS/Arch: linux/amd64 
Context: default 
Experimental: true 
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

[cloudshell-user@ip-10-4-189-71 ~]$ sudo usermod -a -G docker ec2-44-203-175-15.compute-1.amazonaws.com usermod: user 'ec2-44-203-175-15.compute-1.amazonaws.com' does not exist

$ aws managedblockchain get-member n-J5V2Q5GB2JFDPFLTWAI7DLIBCM,m-37P3WWYDBREKHNB4YRCFH2KLS4.managedblockchain.us-east-1.amazonaws.com:30002

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run:

aws help aws <command> help aws <command> <subcommand> help

aws: error: the following arguments are required: --network-id, --member-id

我的EC2 AMI为Amazon Linux。

1回答
0

【以下的回答经过翻译处理】 您应当使用SSH客户端连接至您的EC2上执行该教程,譬如您可以使用Visual Studio Code连接到您的EC2实例(而非Cloudshell)。首先,您需要在Visual Studio Code中安装远程SSH扩展,然后创建一个配置文件。您的配置文件应该如下所示:

# 了解更多关于SSH配置文件的信息:# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host <name of EC2 instance>
    HostName <Public IPv4 DNS>
    User ec2-user
    IdentityFile <where you stored your key pair in you computer>/<key pair name>.pem

另一个选择是使用Cloud9作为完全托管的开发环境。

profile picture
エキスパート
回答済み 5ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ