Couldn't connect to server error

+2 votes
I created the multichain blockchain in my system and then when i initialized it in a virtual system by running the multichaind command using the ip address of the first system everything was fine.. But then when I ran the command "multichain-cli Chain_Name getaddresses" in the virtual system it showed that it couldn't connect to server. What should I do??
asked Jan 13, 2019 by HarshMultani

2 Answers

+1 vote
It seems that your node on the virtual system don't have the permissions to connect to the root node. First you give permissions to the node on the virtual system from the root node and then try to access the APIs through this node.
answered Jan 13, 2019 by gimmick
I gave the permission to the node on the virtual system from the root node by the command : multichain-cli Chain_name grant address connect,send,receive.
But still it didn't work. What to do??
0 votes

Assuming you're running multichaind and multichain-cli within the same virtual system, the most likely explanation is that multichaind is not actually still running. If you're on Windows you need to leave it open and running in a command window. If on Linux use the -daemon command-line parameter.

answered Jan 14, 2019 by MultiChain
From the root node, (I ran the command multichain-cli [Chain_Name] sendasset [address] [assetName] [amount]). I tried to send the asset into the virtual node. The amount got reduced in the root node but and in the virtual node ( I ran the command 1 - multichain-cli [Chain_name] listassets. 2 - multichain-cli [Chain_Name] gettotalbalances) but nothing displayed in the virtual node. It was displaying as [
                       ]. What to do???
I think that the asset in the second node is not being displayed. Nor, it's being added in the virtual node..
Do you know that the two nodes are connected to each other? You can use the getpeerinfo command on both nodes to find out.
I used the command on both nodes [multichain-cli [ChainName] getpeerinfo]. In the virtual node I am getting the root node's address. But in the root node I am not getting the virtual node's address. In the root node I am getting the json format which consists of  ip address of the root node only and not of the virtual node. What to do?
Can you please post the full output of these two getpeerinfo calls so we can take a look?
...