Amazon Managed Blockchain(AMB) Hyperledger Fabric Setup Issues and Solutions

Shivaganesh
3 min readMay 18, 2021

--

Have you tried setting up Hyperledger Fabric Network locally or in the cloud or as managed service? If yes, you may have faced several issues which might be due to infra/network/configuration issues. There are multiple channels/supports available to from fabric community to solve these issues.

Here I am listing down some of the issues which I faced when I tried setting up a fabric network in Amazon Managed Blockchain. Currently, v1.2 and v1.4 are supported.

Q 1. Unable to connect to the CA, Orderer, Peer endpoints. Also aws cli commands are not getting executed

If you are under proxy, set proper proxies like http_proxy, https_proxy, no_proxy, and then retry.

Q 2. Trying to copy managedblockchain-tls-chain.pem using aws s3 copy command but facing error: fatal error: An error occurred (403) when calling the HeadObject operation:Forbidden

Try with no-sign-request option: aws --no-sign-request s3 cp s3://…

Q 3. Error while enrolling the member administrator using the fabric-ca-client enroll command

This may be due to some of the special characters in AdminPassword. Escape the special characters using ‘\’ character. Eg: If password is Xyz123!, escaped password will be Xyz123\!

Q 4. In channel creation step facing an error “Error: got unexpected status: BAD_REQUEST -- Attempted to include a member which is not in the consortium”

This issue can occur when wrong certificates or non-existing/wrong member id is specified in configtx.yaml or docer-compose-cli.yaml. Member IDs are case sensitive (Eg: m-K46ICRRXJRCGRNNS4ES4XUUS5A). Verify the msp folder values in the configuration files.

Q 5. I don't have necessary permissions to execute AWS CLI commands but wanted to get the network ID, Member ID information. All end points are available.

Endpoints are of the format identifier.<Member ID>.<Network ID>.managedblockchain.<Region>.amazonaws.com:<Port>. This can be used to get the IDs. Make sure that Member ID and Network IDs are in Capital case except for the prefixes. i.e., ‘m-’ for Member ID and ‘n-’ for Network ID.

Q 6. Enrolling the admin user in SDK application but facing an error “PKIX path build failed… SSLHandshakeException… unable to find valid certification path to requested target”

Make sure that the certificate managedblockchain-tls-chain.pem is accessible to SDK and refer it wherever required.

Q 7. While instantiating or upgrading the chaincode, facing container exited error.

Make sure that there are no compilation errors in the chaincode files.

Q 8. Unable to use discovery service in fabric SDK

Add anchor peers which are necessary for discovery service to work. Refer to https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/hyperledger-anchor-peers.html. Also, have peer configuration in connection-profile used by the SDK discover: true.

Q 9. When SDK is interacting with peer or orderer, facing some issues like java.io.IOException: Connection reset by peer, io.grpc.StatusRuntimeException: UNAVAILABLE: io Exception resulting in no response or timeout.

Add grpc client configurations in connection-profile used by the SDK to interact with the network. Refer https://hyperledger.github.io/fabric-sdk-node/release-1.4/tutorial-grpc-settings.html.

Also, add API retry logic for fabric submit transactions. Refer https://docs.aws.amazon.com/general/latest/gr/api-retries.html

Q 10. SDK submit transactions are not waiting for the fabric network response

Add peer configurations in connection-profile used by the SDK eventSource: true. Refer https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/connectionprofile.html

These are some of the issues which I have faced when setting up fabric network using Amazon Managed Blockchain. If you haven’t tried managed blockchain try it by referring to AWS documentation https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/what-is-managed-blockchain.html and feel free to connect with me if you face any issue.

--

--

Shivaganesh
Shivaganesh

Written by Shivaganesh

Blockchain Developer experienced in developing Supply chain, Pharma, Telecom domain solutions using Hyperledger Fabric, R3 Corda, Symbiont Assembly and DAML

No responses yet