synechron-finlabs / quorum-maker

Utility to create and monitor Quorum nodes
Apache License 2.0
195 stars 99 forks source link

Can not open nodeManager correctly. #24

Closed JerryZhao1988 closed 6 years ago

JerryZhao1988 commented 6 years ago

I try to build up a real network. I created a master node by using setup.sh and start.sh. Actually I got the dashboard and all services related to quorum working, but for process ./NodeManager, it is not working properly. I checked the port usage, port 22004 is not being used. Here is the setup.conf

CURRENT_IP=172.17.0.2
RPC_PORT=22000
WHISPER_PORT=22001
CONSTELLATION_PORT=22002
RAFT_PORT=22003
THIS_NODEMANAGER_PORT=22004
NETWORK_ID=62989
RAFT_ID=1
NODENAME=master-raft
ROLE=Unassigned
CONTRACT_ADD=
REGISTERED=
PUBKEY=f85mKvINrWdk7AgZjpvovSbvkAJ98y9SjBFmEHtj6lQ=
PUBKEY=f85mKvINrWdk7AgZjpvovSbvkAJ98y9SjBFmEHtj6lQ=
CONTRACT_ADD=0xe59490ae7de0dcc76efccadb02a65fd658c8d43c
REGISTERED=TRUE
PUBKEY=f85mKvINrWdk7AgZjpvovSbvkAJ98y9SjBFmEHtj6lQ=
PUBKEY=f85mKvINrWdk7AgZjpvovSbvkAJ98y9SjBFmEHtj6lQ=

I found CONTRACT_ADD and REGISTERED is missing, I guess it would be filled by node manager.

image image is there anything I didn't set up correctly? I also find in nodemanager.sh ./start_nodemanager.sh #rpcPort# #servicePort# do I need to put the port number here to make it working?

rjbanner commented 6 years ago

Hi Jerry. We really appreciate the fact that you looked under the hood and investigated the matter yourself before contacting us.

What we noticed was that the sed command which automatically replaces #rpcPort# and #servicePort# in ./start_nodemanager.sh should have resulted in the following:

./start_nodemanager.sh 22000 22004

Could you kindly list out the sequence of steps you followed after starting setup.sh and choosing the Create Network option.

Also did you build the docker image locally or was it pulled from Docker Hub?

JerryZhao1988 commented 6 years ago

Hi rjbanner, I am using the image from Docker hub. I did some test, and I think this function is not working properly

function copyGoService(){
    cd ..
    cat lib/master/nodemanager_template.sh > master-raft/node/nodemanager.sh
    PATTERN="s/#rpcPort#/${rPort}/g"
    sed -i $PATTERN master-raft/node/nodemanager.sh
    PATTERN="s/#servicePort#/${tgoPort}/g"
    sed -i $PATTERN master-raft/node/nodemanager.sh

    chmod +x master-raft/node/nodemanager.sh
    cd master-raft
}

Actually I fixed it by add -e option.

 sed -i -e $PATTERN master-raft/node/nodemanager.sh
sed -i -e $PATTERN master-raft/node/nodemanager.sh
rjbanner commented 6 years ago

Hi Jerry,

We really appreciate your contribution and the effort you've put in to investigate this issue.

Could you specify the OS you're using as currently we're trying to classify the issues accordingly and did not face this on our test environment.

Also we'll be very glad if you were to continue contributing to Quorum Maker as we continue to enhance and improve the features :)

JerryZhao1988 commented 6 years ago

Hi rjbanner, I am using mac OS, but after I may try to deploy it on kubernetes. I think I may meet more problems later.

rjbanner commented 6 years ago

Hi Jerry,

That would be great. We've tested on Ubuntu 16.04 so far. Your findings on kubernetes would be very helpful :)

dhyansraj commented 6 years ago

This was an issue due to some part of the scripts where running outside docker and some commands in Mac were failing. The fix is made to run whole parts of scripts to run inside Docker. Thanks @JerryZhao1988 for reporting the issue.