About Hyperledger fabric - Node.js connection

0

Hi, I'm trying to connect hyperledger in my node.js application. I worked locally on test-network and it worked properly for me. Then I created the network via Aws and deployed the chaincodes. I then try to connect to this network via nodejs ( https://docs.aws.amazon.com/ja_jp/managed-blockchain/latest/hyperledger-fabric-dev/managed-blockchain-get-started-tutorial.html ) follow this document I have successfully established the network, but on the nodejs side, I got an invalid ca end point error at the first stage. Is there any document or help for aws hyperledger fabric and nodejs connection?

here is my connection.json file

{
    "name": "${NETWORKNAME}-${MEMBERNAME}",
    "version": "1.0.0",
    "client": {
        "organization": "${MEMBERNAME}",
        "connection": {
            "timeout": {
                "peer": {
                    "endorser": "300"
                }
            }
        }
    },
    "organizations": {
        "${MEMBERNAME}": {
            "mspid": "${MEMBERID}",
            "peers": ["peer0.org.${MEMBERNAME}.aws.com"],
            "certificateAuthorities": ["ca.org.${MEMBERNAME}.aws.com"]
        }
    },
    "peers": {
        "peer0.org.${MEMBERNAME}.aws.com": {
            "url": "grpcs://${PEERSERVICEENDPOINT}",
            "tlsCACerts": {
                "pem": "${PEERPEM}"
            },
            "grpcOptions": {
                "ssl-target-name-override": "peer0.org.${MEMBERNAME}.aws.com",
                "hostnameOverride": "peer0.org.${MEMBERNAME}.aws.com"
            }
        }
    },
    "certificateAuthorities": {
        "ca.org.${MEMBERNAME}.aws.com": {
            "url": "https://${CASERVICEENDPOINT}",
            "caName": "${MEMBERID}",
            "tlsCACerts": {
                "pem": ["${CAPEM}"]
            },
            "httpOptions": {
                "verify": false
            }
        }
    }
}
  • Did you download the certificate file?

  • where can i download?

  • See step 5.1 in the documentation

Ersin
asked 10 months ago988 views
1 Answer
0

What error are you getting exactly? To start of with, I would suggest you to take a look at the 2.2 HLF workshop - specifically run these commands:

cd $HOME/environment/amb-hf-workshop-supplychain-app
./scripts/setupConnectionProfile.sh

For more information I would also encourage you to check out this example of a common connection profile in JSON.

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions