无法使用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 Antwort
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
EXPERTE
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen