synechron-finlabs / quorum-maker

Utility to create and monitor Quorum nodes
Apache License 2.0
196 stars 97 forks source link

Applied ./start.sh again accidentally, how to recover data? #84

Open naveen-appoets opened 5 years ago

naveen-appoets commented 5 years ago

So I wanted to restart the node and hence switched to the directory that was created for the node and gave start.sh and the data is now all gone. Anyway to recover it?

dhyansraj commented 5 years ago

./start.sh shouldnt delete the data. It is there to start/restart the node. Probably the node not connecting to other nodes. Can you check the other nodes and see if this is part of the network. Also see geth log possible errors.

naveen-appoets commented 5 years ago

Yes, the problem was that there was only two nodes in the network and one of them went down and I found that the remaining one was no longer creating blocks. Hence I wanted to restart the node and ran ./start.sh and probably as you noted since it wasn't connecting to any, it did not show any blocks. Now in this position how would I drop the other node and restart the node again with the data already in the node showing up?

dhyansraj commented 5 years ago

It should still show the old blocks even if there are no peers available currently. Let me try to reproduce and get back to you. I am assume you were able to see both nodes in sync when they were online.

naveen-appoets commented 5 years ago

Yes, I was able to see both nodes in sync when they were both online. Stopping one node unconventionally (let's say server got shutdown) made the other node not produce any more blocks. Restarting the node showed block count 0. But yes, I did not remove the lost peer before restarting.

dhyansraj commented 5 years ago

you invoked ./start.sh from inside the nodename directory, right ?

naveen-appoets commented 5 years ago

Yeah

melnikaite commented 5 years ago

I have the same issue with local installation I just generated network using ./setup.sh dev -p TestNetwork -n 3 -e Run docker-compose up -d inside TestNetwork Deployed some contracts Stopped containers docker-compose stop Then started again docker-compose up -d All nodes shows that chain has just 1 block in explorer and rpc with all previous transactions Also all ABIs disappeared Image syneblock/quorum-maker:2.2.0_2.6.1

dhyansraj commented 5 years ago

Can you try with docker-compose down instead of stop. ?

melnikaite commented 5 years ago

docker-compose down take the same effect

muhammetevirgen commented 5 years ago

So if we try to test some disaster issue and reboot the machine , how it will behave ?

it will behave like docker-compose down ? or docker-compose stop ? or none of them ?

Because when I run start.sh on distributed network after reboot ,my node is not syncing

dhyansraj commented 5 years ago

Is this problem happening consistently ? Which version of QM are you using? I tried in couple of different VMs including RehHat and Ubuntu. Not able to reproduce.

melnikaite commented 5 years ago

QM latest master 21c0d1a41af9d5bd686e460ceb1143f02858dca5 OS X 10.14.2 docker 18.09.1 docker-compose 1.23.2 docker image syneblock/quorum-maker:2.2.0_2.6.1

The issue is constantly reproducible

dhyansraj commented 5 years ago

I think your issue is similar to #87 and is fixed now. Can you try again?