Still Stuck On Step 4 on Creating a Hyperledger Fabric Blockchain Network Using Amazon Managed Blockchain

0

Dear Community,

Sorry, I'm not a Tech-Savvy and I'm desperately need help for the following problem I've encountered using the CloudShell CLI on Step 4 --> https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/get-started-create-client.html

Below are the following problems:

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?

sudo usermod -a -G docker ec2-user@ec2-44-203-175-15.compute-1.amazonaws.com usermod: user 'ec2-user@ec2-44-203-175-15.compute-1.amazonaws.com' does not exist [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

My OS for running EC2 Instance, I'm using Amazon Linux. I'm using Macbook.

Thanks

2 個答案
1
已接受的答案

You would use Visual Studio Code to connect to your EC2. First you would have to Install the Remote SSH Extension in Visual Studio Code and then create a config file. Your config file would have to look like this:

# 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

An alternative option is to use Cloud9 for a fully managed development environment.

AWS
已回答 1 年前
profile picture
專家
已審閱 1 個月前
0

It appears from your response that you are using CloudShell, but CloudShell cannot launch Docker.
https://docs.aws.amazon.com/cloudshell/latest/userguide/vm-specs.html

Currently, the AWS CloudShell compute environment doesn't support Docker containers.

Are you accessing EC2 and executing commands?

First, access EC2 from your local PC via SSH or other means.
After that, Docker and other software must be installed.

Refer to the following instructions for SSH connection to EC2.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html

profile picture
專家
已回答 1 年前
  • @Riku - thanks for getting back to me and sorry for the late reply as it was after midnight in my time zone. Yes, I have Docker installed on my Mac and I have EC2 but unable to execute commands in CloudShell. Are you trying to say that I need to use the above method (the link you've provided) via my Mac Terminal?

  • Yes, connect to EC2 from your Mac. Then, after connecting to EC2, you need to execute "Step 4.1: Install Packages".

  • @Riku, thanks and sorry for late reply. After connecting to EC2 from my Mac, that part to Execute the all 4 Steps will be done on my Mac Terminal or in AWS CloudShell?

  • SSH is done from a Mac, so please operate from a Mac terminal.

  • @Riku, thanks but if operate from Mac Terminal. Will the dependencies install in the tutorial will link back to EC2? Also, in my Mac Terminal (I've followed the EC2 SSH Connection Instruction), I now have a new error, that is --> ssh: Could not resolve hostname enable: nodename nor servname provided, or not known.

    Where can I get the nodename or servname from AWS?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南