0

I have 2 ubuntu machines

  1. Ubuntu server
  2. Ubuntu server

The problem which i am facing is that i am unable to run 2nd Node as a peer of first Node.... I have tried with different type of genesis files like :

  1. Providing both Peers info in genesis
    {
       "addPeer":{
          "peer":{
             "address":"110.39.197.250:10001",
             "peerKey":"d04da271b57fe63426ae1dc97f6952104037411fcf4f3b739dc217f45e5fc99b"
          }
       }
    },
    {
       "addPeer":{
          "peer":{
             "address":"135.148.120.71:10001",
             "peerKey":"d64606f47120a1c62a7b7a8869acee11c50b287dbfe18de30556ce98cf478db9"
          }
       }
    },
**FYI**
**........  110.39.197.250  ==> local machine ip
  ........  135.148.120.71  ==> server ip
  ........  Running point 1 results in error with exiting of related Iroha Node**
  1. `Providing only current node info in genesis see genesis file here for both Nodes Also you can see config file for both Nodes
"addPeer": {
              "peer": {
                "address": "127.0.0.1:10001",
                "peerKey": "d04da271b57fe63426ae1dc97f6952104037411fcf4f3b739dc217f45e5fc99b"
              }
            }

FYI // like same way provide node info in 2nd running node genesis and then run Addpeer in cli then this error comes and both of the nodes stop working

see Error image on running point 2

I am not sure what is the correct way to run Iroha nodes on different servers and then add 2nd node as a peer of 1st one....Even i have not found any helping document ..The only help which i found was to deploy multiple nodes on single machine using docker but i want to deploy on different machines and use them as a peer. Please guide me

  • genesis.block is used only once. You'd better list all nodes in genesis.block and then use the same genesis to all nodes with options `--overwrite_ledger --drop_state` – kyb Jun 09 '21 at 08:09
  • If you want to add peer to iroha network after it was initialized you can do that using iroha-python or iroha-cli. Changing genesis.block has no reason for running network – kyb Jun 09 '21 at 08:10
  • Thanks for reply @kyb ...I have already tried by listing all nodes in genesis file as i mentioned in my post as a point 1. Here i have 3 scenarios .Let me describe here 1 by 1 – aqeel kazmi Jun 09 '21 at 08:30
  • 1. When i am starting 1st node, and inside its genesis i list only this server's IP along with port 10001 and pub key. It means i have only passed 1 ip in genesis AddPeer call.. when i docker file it states error: OnDemandOsClientGrpc RPC failed: Connect Failed AsyncGrpcClient Send votes bundle[size=1] to 51.222.155.34:10001 And, on calling from JS Iroha node states: AsyncGrpcClient RPC failed: Connect Failed TxProcessor handle batch TxProcessor propagating batch to PCS PCS propagate batch AsyncGrpcClient RPC failed: Connect Failed – aqeel kazmi Jun 09 '21 at 08:37
  • 2. On starting 1st node, i passed the 2nd server's IP along with this server IP in addPeer call. Like this: { "addPeer":{ "peer":{ "address":"110.39.197.250:10001", "peerKey":"d04da271b57fe63426ae1dc97f6952104037411fcf4f3b739dc217f45e5fc99b" } } }, { "addPeer":{ "peer":{ "address":"135.148.120.71:10001", "peerKey":"d64606f47120a1c62a7b7a8869acee11c50b287dbfe18de30556ce98cf478db9" } } }, But it also fails with same error – aqeel kazmi Jun 09 '21 at 08:41
  • 3. 3rd scenario is to pass only 1 peer as a localhost "addPeer": { "peer": { "address": "127.0.0.1:10001", "peerKey": "d04da271b57fe63426ae1dc97f6952104037411fcf4f3b739dc217f45e5fc99b" } } ....This configuration works but not allow me to add another node that was started with the same genesis file i.e (Addpeer portion also same with same 127.0.0.1 ip and pub key).. – aqeel kazmi Jun 09 '21 at 08:44
  • So i just need to know the correct way of writing down addPeer portion in 1st and 2nd node.. WHich peer/s should be in 1st node ? whether its local ip or serverIP? WHich peer/s should be in 2nd NOde?whether its local ip or serverIP? I have applied all hit & tries. but i am not successful...DO some help please – aqeel kazmi Jun 09 '21 at 08:47
  • Let me check. I never met such a hard problem in such a simple config... – kyb Jun 09 '21 at 16:22
  • And i propose you to help people read your messages: please `format code` as `code` even in one line. – kyb Jun 09 '21 at 16:24
  • Please show how you run iroha and full config file and full genesis file by editing the question. Screenshot with logs is not good idea, – kyb Jun 10 '21 at 00:06
  • ok i will tc of formatting – aqeel kazmi Jun 10 '21 at 04:59
  • I have added genesis & config SS. and i am running iroha using https://github.com/AqeelKazmi/IrohaDockerServices – aqeel kazmi Jun 10 '21 at 05:43
  • I think you misconfigured something. Try this configuration with docker-compose of 4 nodes https://dropmefiles.com/QVUL4 - start it with just one command `docker compose up` – kyb Jun 14 '21 at 21:32
  • bro thanks for the reply, but this config is just to run 4 nodes on single machine. What i need is to run run Iroha on 2 different servers.... – aqeel kazmi Jun 15 '21 at 07:41
  • Can U reproduce your problem locally on one machine? – kyb Jun 15 '21 at 08:57
  • U need to move from one working configuration step by step till the moment when it breaks. Sry, i have no time to deal with your setup. – kyb Jun 15 '21 at 08:59
  • ok bro sure ... – aqeel kazmi Jun 15 '21 at 09:25
  • @ aqeel kazmi, your overfamiliarity is odd – kyb Jun 15 '21 at 09:44
  • If you want to have multiple nodes you can't have `localhost` as one of nodes, because it would be problem with communication between peers – baziorek Dec 16 '22 at 08:44

0 Answers0