hyperledger-archives / iroha

Iroha - A simple, decentralized ledger

Home Page:http://iroha.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple computer deploy - OrderingGate RPC failed: Connect Failed

truongnmt opened this issue Β· comments

I'm deploying multiple instance to Azure, I created 2 VMs and setup Iroha already:

sudo docker run -it --name iroha \
-p 50051:50051 \
-v $(pwd)/iroha-master/example:/opt/iroha_data \
-v blockstore:/tmp/block_store \
--network=iroha-network \
--entrypoint=/bin/bash \
hyperledger/iroha:latest

Genesis block is generated by peers.list, which include peers IP:

peers.list
65.52.174.111:10001
13.70.20.51:10001

When I'm using iroha-cli to create a tx, one peer trying to connect to another peer through port 10001 but it said that:

[2018-08-21 07:48:55.461452707][th:25][info] OrderingInit Ordering gate is at 65.52.164.195:10001
...
[2018-08-21 07:18:19.182168002][th:14][warning] OrderingGate RPC failed: Connect Failed

Do I have to run something to make another peer listen on that port? Notice that I opened port 50051 and 10001 already.

screen shot 2018-08-23 at 22 14 20

Also Iroha seems to listening on port 50051 and 10001:
screen shot 2018-08-23 at 23 16 18

But it can't call on each other:
screen shot 2018-08-23 at 23 17 41

Here is log on a VM with IP 13.78.38.212 let's call Peer A:
https://gist.github.com/truongnmt/b79a448a6e8e5e21ea6e1a19ff33a77f

Here is log on another VM with IP 65.52.164.195 let's call Peer B: https://gist.github.com/truongnmt/087be3008b406f52338a20f9cb520ddb

Here is log on Iroha CLI on Peer A:
https://gist.github.com/truongnmt/c9f9fbdf4d88eb51bfb674e89091cbb7

So Iroha-cli on Peer A was trying to create an asset and send to Peer A, the transaction was successfully created but Peer A can't connect with Peer B to "sync" (or vote ... that's what I think). That's why when I check transaction status request, Peer A said:

Congratulation, your transaction was accepted for processing.

Peer B said:

Transaction has successfully passed stateless validation.

CommandService Asked non-existing tx: f2bcad76f228114a96f2aa291b0e06ffe493423d390a51ee8574c922390bd17f

In the case of different hosts, I think you must expose 10001 port when running docker image.
Add -p 10001:10001 to docker command, and open 10001 on the host machine using Azure management windows, and try again.

Weeeeee, it worked! Thanks a lot πŸ™Œ

So I create a new docker image as @manhdaovan said:

sudo docker run -it --name iroha \
-p 50051:50051 \
-p 10001:10001 \
-v $(pwd)/iroha-master/example:/opt/iroha_data \
-v blockstore:/tmp/block_store \
--network=iroha-network \
--entrypoint=/bin/bash \
hyperledger/iroha:latest

Thanks a lot πŸ™Œ πŸ™Œ πŸ™Œ