Couldn't connect to server on voter node

+2 votes

I am attempting this tutorial https://samsclass.info/141/proj/pMult2.htm

I have two nodes set up (1) Polling server (on 10.10.10.10) (2) voting node (10.10.10.11). Both machines are on the same network. both machines are running fedora.

On the polling server I have multichaind running

$ ps aux | grep multi
Xxxx  17624  0.8  0.1 2118584 39236 ?       SLsl 13:26   0:19 multichaind survey -daemon

On the voting node I executed this command

$ multichaind -datadir=.multichain-voter1 -port=7777 -rpcport=7778 survey@10.10.10.10:6463 -daemon

This finished successfully. A simple ps aux gives the following output

xxxx  26354  1.4  0.1 1987664 38724 ?       SLsl 14:12   0:08 multichaind -datadir=.multichain-voter1 -port=7777 -rpcport=7778 survey@10.10.10.10:6463 -daemon

------------------------------------------------------------------------

Now on my voting node I typed this

$ multichain-cli survey getnewaddress

This returned an error:

error: couldn't connect to server

If the polling node was added to the voter node's peer list why am I getting this error? I have also added rpcallowip=10.10.10.10 to voter node's multichain.conf.

Thanks a lot for your time.

Cheers!

 

asked Apr 18, 2018 by sac
Awesome, I followed this tutorial a few months ago at a hackathon and built this --> http://vote.rockthepoll.com If you need any help, reach out.

1 Answer

+2 votes

The "couldn't connect to server" error is not due to a problem of the nodes talking to each other, but rather due to a problem of multichain-cli talking to the local node's JSON-RPC API endpoint.

The problem in your case is that you have specified when running multichaind that API connections should take place on port 7778, but multichain-cli does not know this and is reading the default value from the chain parameters. So either pass the same command line option to multichain-cli, or else set the rpcport in multichain.conf (which multichain-cli also reads).

answered Apr 19, 2018 by MultiChain
...