Jump to content
marouane

Restart Ripple private Network

Recommended Posts

Hello,

I'm running a private ripple network of 5 validators, and 2 stock servers ( full ledger ).

Can I recover the network if all validators die, but the stock servers are operating?

Can I recover the network if all my servers die, but I still have the full ledger data on disk?

Thanks,

Share this post


Link to post
Share on other sites
10 minutes ago, marouane said:

Can I recover the network if all validators die, but the stock servers are operating?

Yes.

10 minutes ago, marouane said:

Can I recover the network if all my servers die, but I still have the full ledger data on disk?

Yes.

Share this post


Link to post
Share on other sites

Thanks for your answer, 

In case the stock servers keep operating, i managed to get the network back by restarting the validators with the command ./rippled. This way i had the ledger synced again and i had a gap in the full ledger.

But when all nodes die, i couldn't get the ledger back with the same start command, what command should i use ?

Share this post


Link to post
Share on other sites
1 minute ago, Sukrim said:

You'd need to load the same ledger on all validators. Check the documentation for the necessary commands.

The --load option does not work, could you please give me more details? should i start servers one by one, or start them all together ?

Share this post


Link to post
Share on other sites
2 hours ago, marouane said:

The --load option does not work

What makes you so sure about this?

Anyways:

I've not tried this, but my approach would be:

* Start all 5 validators in standalone mode and use the "--ledger [LEDGER]" switch to ensure they are able to load the same state (https://xrpl.org/commandline-usage.html#stand-alone-mode-options), if something's messed up, export the full ledger you want to load and use the --ledgerfile switch instead on affected nodes

* Now that you've confirmed they can start at a certain point, stop all of them again, start a single one with --quorum 1 and --ledger [LEDGER]. It should start producing empty ledgers.

* Next tell all other validators only to trust the running validator and start them with --ledger [LEDGER]. They should load the ledger and then quickly sync the few empty ledgers.

* Now, one by one, (starting with the other validators, not the single trusted one) stop a validator, reconfigure it to trust all others and restart it (with no special flags). Once it is synced, move on to the next one, with the single trusted one last.

 

By the way: In my opinion validators shouldn't have a node store attached anyways, so you'd always sync state from a --ledgerfile instead of relying on local state.

I'm also not sure if exactly 5 validators are enough, it might be necessary to run 6 or 7 to make sure that a single one being available doesn't stop forward progress (depends on the current implementation in rippled if > 80% or >= 80% agreement is necessary).

Share this post


Link to post
Share on other sites

Thanks very much for your answer,

Finally i'm able to get it back, the problem is the --ledger {seq} doesn't work, it only works if you use the ledger hash.

The ledger hash could be recovered from the sqlite database, then starting one node with --ledger {hash of latest ledger} --quorum 1 and finally start other servers and connect them to the first server. 

Share this post


Link to post
Share on other sites
On 6/18/2019 at 1:40 AM, marouane said:

Thanks very much for your answer,

Finally i'm able to get it back, the problem is the --ledger {seq} doesn't work, it only works if you use the ledger hash.

The ledger hash could be recovered from the sqlite database, then starting one node with --ledger {hash of latest ledger} --quorum 1 and finally start other servers and connect them to the first server. 

which file it is? I tried following command, but the tables is empty. The ledger file is 5.0 G, it shouldn't be empty. I don't know why

kh@kh-008 rippled]$ cd /var/lib/rippled/db
[kh@kh-008 db]$ sqlite3 ledger.db
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
sqlite> .quit
[kh@kh-008 db]$ ls -alh
total 5.6G
drwxr-xr-x. 4 root    root     224 Aug 31 04:38 .
drwxr-xr-x. 4 rippled rippled   29 Aug 31 12:32 ..
-rw-r--r--. 1 root    root    5.0G Aug 31 04:37 ledger.db
-rw-r--r--. 1 root    root     32K Aug 31 04:38 ledger.db-shm
-rw-r--r--. 1 root    root    2.9M Aug 31 04:38 ledger.db-wal
drwxr-xr-x. 2 root    root      54 Aug  8 11:58 nudb
-rw-r--r--. 1 root    root     40K Aug 31 04:38 peerfinder.sqlite
drwxr-xr-x. 4 root    root      48 Jul  5 07:33 rocksdb
-rw-r--r--. 1 root    root     12K Jul  5 07:33 state.db
-rw-r--r--. 1 root    root    618M Aug 30 23:29 transaction.db
-rw-r--r--. 1 root    root     32K Aug 31 04:38 transaction.db-shm
-rw-r--r--. 1 root    root    2.5M Aug 31 04:38 transaction.db-wal
-rw-r--r--. 1 root    root     16K Aug  8 11:58 wallet.db

 

 

Share this post


Link to post
Share on other sites
On 8/31/2019 at 5:46 PM, yuyue007 said:

which file it is? I tried following command, but the tables is empty. The ledger file is 5.0 G, it shouldn't be empty. I don't know why


kh@kh-008 rippled]$ cd /var/lib/rippled/db
[kh@kh-008 db]$ sqlite3 ledger.db
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .tables
sqlite> .quit
[kh@kh-008 db]$ ls -alh
total 5.6G
drwxr-xr-x. 4 root    root     224 Aug 31 04:38 .
drwxr-xr-x. 4 rippled rippled   29 Aug 31 12:32 ..
-rw-r--r--. 1 root    root    5.0G Aug 31 04:37 ledger.db
-rw-r--r--. 1 root    root     32K Aug 31 04:38 ledger.db-shm
-rw-r--r--. 1 root    root    2.9M Aug 31 04:38 ledger.db-wal
drwxr-xr-x. 2 root    root      54 Aug  8 11:58 nudb
-rw-r--r--. 1 root    root     40K Aug 31 04:38 peerfinder.sqlite
drwxr-xr-x. 4 root    root      48 Jul  5 07:33 rocksdb
-rw-r--r--. 1 root    root     12K Jul  5 07:33 state.db
-rw-r--r--. 1 root    root    618M Aug 30 23:29 transaction.db
-rw-r--r--. 1 root    root     32K Aug 31 04:38 transaction.db-shm
-rw-r--r--. 1 root    root    2.5M Aug 31 04:38 transaction.db-wal
-rw-r--r--. 1 root    root     16K Aug  8 11:58 wallet.db

 

 

The ledger ledger.db, open with sqlite3.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...