Node not getting connected

+1 vote
Hi,

 

Thanks for the quick reply,

Yes, i am getting the node ready for the first time and the execution is not moving further after this message, and gets time out after 1 or 2 hours.So i am unable to enter any command after this. I think once we are trying to connect we should get a node start message rather than node ready. And if i am trying to connect to the same chain after some time(ie, after force exit the terminal and then reconnecting) it gives me a db lock message.
asked Dec 19, 2018 by Soumya Rajesh
hi. First of all, I'd like to get more info about the situation.

Can you please provide your OS and hardware specifications and whether you are running the node locally or on a server.

Can you also tell me the commands you are running a step-by-step?
Both are aws servers with the below configuration

Server - SmartAMI Ubuntu 16.04.3 LTS Server 64-bit HVM v9
Instance type   t2.micro

Connected to the servers through SSH

installed the below tar file after unzipping on both servers
h​ttps://www.multichain.com/download/multichain-1.0.5.tar.gz​
 Node1 Activities(1st Server)

multichain-util create chain1

After that updated security group of the server with the port number given during the creation of the chain

multichaind chain1 -daemon

Node 2 Activities (2nd Server)

Connected to the node1 using the below command

multichaind chain1@172.31.50.255: 9743

Given response as "blockchain successfully initialised and suggested for the required permission on the node1 "

Executed the permission statement on Node1

Executed the below statement for node2.

multichaind chain1@172.31.50.255: 9743

gave the message as

"Retrieving blockchain parameters from the seed node 172.31.21.32:9743 ...

Other nodes can connect to this node using:

multichaind chain1@172.31.21.41:9743

Listening for API requests on port 9742 (local only - see rpcallowip setting)

Node ready."

After that its getting stuck, and give a timeout message after an hour or two.

When i try to execute the same command in another terminal it gave the dblock message.

Tried with data dir and rpcallow port parameters also.

* port numbers may vary, as i took it from the examples.

Please help
I got the answer, while using amazon EC2 we need to use the public IP,not the private one to connect with the blockchain.

Thankyou all for the help

2 Answers

+2 votes

You just need to open a new Terminal window to use the node's API (or if you're on Linux, you can run multichaind with the -daemon flag to have it run in the background). Your "db lock" message is occurring because you're trying to run two instances of multichaind for the same blockchain.

answered Dec 20, 2018 by MultiChain
same db error

stoped the chain1 execution and started again still it shows
+1 vote

it's like what is suggested in the answer by the developers then, try doing the following:

  1. On the second server, press ctrl+c to end the process
  2. Run this command instead: `multichaind chain1@172.31.50.255: 9743 -daemon`
  3. Then on the same terminal, trying running this command: `multichain-cli chain1 getblockchainparams`

If the last parameter returns any result, then you should be golden. Otherwise, comment the output.

Note: I wouldn't share my server's IP and port that freely if I were you cheeky

 

answered Dec 20, 2018 by SDVII
MultiChain 1.0.7 Daemon (latest protocol 10011)

Starting up node...

IO error: lock /home/ubuntu/.multichain/chain1/permissions.db/LOCK: Resource temporarily unavailable

ERROR: Couldn't initialize permission database for blockchain chain1. Probably multichaind for this blockchain is already running. Exiting...
Try stopping the node by running 'multichain-cli chain1 stop' and restart it with daemon. When running API commands make sure you are using mutlichain-cli and not multichaind
...