Not able to connect to the node with the MultiChainCommand from Github for MultiChain

0 votes

First of all thanks for putting the multichain code on GitHub.

I am trying to execute a use  case for my company.

a) My Node details are as follows:-

My Node details are as follows:-

oot@4308f3e0bb34:/tmp/multichain-1.0-alpha-21# multichaind chain1 -daemon

 

MultiChain Core Daemon build 1.0 alpha 21 protocol 10005

 

MultiChain server starting
Looking for genesis block...
Genesis block found
New users can connect to this node using
multichaind chain1@172.17.0.2:2749

 

Node started
root@4308f3e0bb34:/tmp/multichain-1.0-alpha-21# cat ~/.multichain/chain1/multichain.conf
rpcuser=multichainrpc

 

rpcpassword=7CaUnmUEdwh3umvABeDLReKb57XkJByZvk1tDNeoYCG3
root@4308f3e0bb34:/tmp/multichain-1.0-alpha-21# grep rpc-port ~/.multichain/chain1/params.dat
default-rpc-port = 2748                 # Default TCP/IP port for incoming JSON-RPC API requests.
root@4308f3e0bb34:/tmp/multichain-1.0-alpha-21#

b) MultiChain Code Test Class

From the multichain code on GitHub, I tried to execute BlockCommandTest class:-

multiChainCommand = new MultiChainCommand("172.17.0.2", "2749", "multichainrpc",
    "7CaUnmUEdwh3umvABeDLReKb57XkJByZvk1tDNeoYCG3");

with the following details of the node.

I also tried localhost and 2748, but does not work. Kindly let me know.

c) Exception on running the class:-

However,  I am getting the following exception:-

 

Multichain Error / null {org.apache.http.conn.HttpHostConnectException: Connect to 172.17.0.2:2748 [/172.17.0.2] failed: Connection timed out: connect}
multichain.command.MultichainException
 at multichain.command.builders.QueryBuilderCommon.execute(QueryBuilderCommon.java:178)
 at multichain.command.builders.QueryBuilderBlock.executeGetBlock(QueryBuilderBlock.java:120)
 at multichain.command.BlockCommand.getBlock(BlockCommand.java:148)
 at multichain.command.BlockCommand.getBlock(BlockCommand.java:163)
 at multichain.command.BlockCommandTest.testgetBlock(BlockCommandTest.java:31)
 at multichain.command.BlockCommandTest.main(BlockCommandTest.java:106)
Result Block(1) (default verbose) :null

 

Can somebody please help me?

 

 

asked Oct 19, 2017 by Sankaran

1 Answer

0 votes
Please follow these steps to troubleshoot

Make sure that host 172.17.0.2 is up

port 2748 is listed in the security settings

netstat -anp| grep 2748 if host is running to check the port is up in the server
answered Oct 19, 2017 by Neeraj
...