I am trying to setup hyperledger fabric blockchain network using amazon managed blockchain following this guide. In the step 6, to create the channel I have executed the following command,

docker exec cli peer channel create -c hrschannel -f /opt/home/hrschannel.pb -o orderer.n-zzzz.managedblockchain.us-east-1.amazonaws.com:30001 --cafile /opt/home/managedblockchain-tls-chain.pem --tls

But I am getting the following error,

Error: failed to create deliver client: orderer client failed to connect to orderer.n-zzzz.managedblockchain.us-east-1.amazonaws.com:30001: failed to create new connection: context deadline exceeded

Help me to fix this issue.

Edited: I asked the same question in reddit. One user replied that he added listenAddress environment variable in my configtx.yaml file. He did not say clear information about which listenAddress and where to add that address in configtx.yaml. Here is my configtx.yaml file.

################################################################################

#

# Section: Organizations

#

# - This section defines the different organizational identities which will

# be referenced later in the configuration.

#

################################################################################

Organizations:

- &Org1

# DefaultOrg defines the organization which is used in the sampleconfig

# of the fabric.git development environment

Name: m-CUB6HI

# ID to load the MSP definition as

ID: m-B6HI

MSPDir: /opt/home/admin-msp

# AnchorPeers defines the location of peers which can be used

# for cross org gossip communication. Note, this value is only

# encoded in the genesis block in the Application section context

AnchorPeers:

- Host:

Port:


################################################################################

#

# SECTION: Application

#

# - This section defines the values to encode into a config transaction or

# genesis block for application related parameters

#

################################################################################

Application: &ApplicationDefaults

# Organizations is the list of orgs which are defined as participants on

# the application side of the network

Organizations:


################################################################################

#

# Profile

#

# - Different configuration profiles may be encoded here to be specified

# as parameters to the configtxgen tool

#

################################################################################

Profiles:

OneOrgChannel:

Consortium: AWSSystemConsortium

Application:

<<: *ApplicationDefaults

Organizations:

- *Org1

Help me to fix this issue.

1

There are 1 answers

0
Kartik Chauhan On BEST ANSWER

One must check if the peer container is able to communicate with the orderer container. curl orderer.endpoint port can be used to check the connection. If the peer is unable to communicate then either the orderer container is down or could be due to different security groups.

Update: As OP mentioned in the comments, changing the port helped in resolving the issue. One must give it a try.