Setting up a multi node Hyperledger Fabric network with Docker Swarm | Skcript

Thank you very much for the tutorial, it is really helpful. I can’t manage to deploy kafka correctly and it fails, everything else is up and running, I get a shutdown state with “task: non-zero exit (1)”. Can you help me please? Thanks!

Hi all,
I have implemented multi node setup on two VMs. first VM is as a manager node and second one is as a worker node. and i have also created channel and join the channel to peers of Org1 (manager node VM1). And also able to invoke and query for ORG1 (VM1). but when i am going to join peers of ORG2 (worker node VM2) then not able to do that. and also not able to telnet ORG2 containers on manager node.

So please help me???

Check the logs with docker service ps <service_id>

Thanks for the response, I was able to solve it but I haven’t been able to use the SDK properly, I get the following error:

2019-02-04T12:34:45.710Z - error: [Network]: _initializeInternalChannel: Unable to initialize channel. Attempted to contact 6 Peers. Last error was Error: 2 UNKNOWN: Stream removed
Error processing transaction. Error: Unable to initialize channel. 
Attempted to contact 6 Peers. Last error was Error: 2 UNKNOWN: Stream removed
Error: Unable to initialize channel. Attempted to contact 6 Peers. Last error was Error: 2 UNKNOWN: Stream removed
at Network._initializeInternalChannel (/home/alberto/ibotics-network-1/application/node_modules/fabric-network/lib/network.js:127:12)
Disconnect from Fabric gateway.
Issue program complete.

Have you been able to run the SDK in your example?

If not, what’s the best approach to develop an application that interacts with the CLI?

Many thanks

1 Like

Nice tutorial, I have a question regards CLI. if I have CLI container in one physical machine, can other physical machines use it to execute transactions? or the other machines should also have CLI container?

thank you

I dont have this path working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
is this going to cause a problem ?

1 Like

Hi, thanks for the tutorial, it does help!
However, I have encountered an error while running on the last step. Regarding the “Invoking Initledger in chaincode” in the scripts/install_chaincode.sh (i.e. docker exec “$CLI_NAME” peer chaincode invoke -o “$ORDERER_NAME”:7050 --tls --cafile $ORDERER_CA -C $CHANNEL_NAME -n $CC_NAME -c ‘{“Args”:[“initLedger”]}’)
There is error as below:

================================

INVOKING INITLEDGER IN CHAINCODE

================================

docker exec “$CLI_NAME” peer chaincode invoke -o “$ORDERER_NAME”:7050 --tls --cafile $ORDERER_CA -C $CHANNEL_NAME -n $CC_NAME -c ‘{“Args”:[“initLedger”]}’

2019-03-27 02:12:23.364 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP

2019-03-27 02:12:23.364 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity

2019-03-27 02:12:23.369 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc

2019-03-27 02:12:23.369 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc

2019-03-27 02:12:23.369 UTC [chaincodeCmd] getChaincodeSpec -> DEBU 005 java chaincode disabled

2019-03-27 02:12:23.369 UTC [msp/identity] Sign -> DEBU 006 Sign: plaintext: 0AA9070A6908031A0C0887B8EBE40510…6C651A0C0A0A696E69744C6564676572

2019-03-27 02:12:23.369 UTC [msp/identity] Sign -> DEBU 007 Sign: digest: F4CFC4B7E557041AC78DF3ECF43994C28B7890FB78A249B7739DAFAAE325C791

Error: Error endorsing invoke: rpc error: code = Unknown desc = chaincode error (status: 500, message: {“code”:301, “reason”: “command format is wrong”}) - <=== THIS IS THE ERROR

Could you help? Thanks!

hi [Varun Raj],
I had issues when deployed ./scripts/create_channel.sh

“Error: Error getting endorser client channel: endorser client failed to connect to peer0.org2.example.com:7051: failed to create new connection: context deadline exceeded”
I don’t known why ?
Please help me !Tks !