From 4c34a93ac7533c22071454ee684569278559a489 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Wed, 7 Nov 2018 17:42:27 -0800 Subject: [PATCH] Fix history sharding, update links --- ...get-started-with-rippleapi-for-javascript.md | 2 +- .../configuration/configure-history-sharding.md | 10 +++++++++- .../installation/build-run-rippled-macos.md | 2 +- .../install-rippled-on-centos-rhel-with-yum.md | 4 ++-- .../troubleshooting/server-wont-start.md | 17 ++++++++++++++++- .../understanding-log-messages.md | 2 +- 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/content/tutorials/get-started/get-started-with-rippleapi-for-javascript.md b/content/tutorials/get-started/get-started-with-rippleapi-for-javascript.md index 58a32fd4fe..ccdc7cd557 100644 --- a/content/tutorials/get-started/get-started-with-rippleapi-for-javascript.md +++ b/content/tutorials/get-started/get-started-with-rippleapi-for-javascript.md @@ -117,7 +117,7 @@ In addition to RippleAPI-specific code, this script uses syntax and conventions const RippleAPI = require('ripple-lib').RippleAPI; ``` -The opening line enables [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). This is purely optional, but it helps you avoid some common pitfalls of JavaScript. See also: [Restrictions on Code in Strict Mode](https://msdn.microsoft.com/library/br230269%28v=vs.94%29.aspx#Anchor_1). +The opening line enables [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). This is purely optional, but it helps you avoid some common pitfalls of JavaScript. The second line imports RippleAPI into the current scope using Node.js's require function. RippleAPI is one of [the modules `ripple-lib` exports](https://github.com/ripple/ripple-lib/blob/develop/src/index.ts). diff --git a/content/tutorials/manage-the-rippled-server/configuration/configure-history-sharding.md b/content/tutorials/manage-the-rippled-server/configuration/configure-history-sharding.md index af896d2425..78c2cf32ac 100644 --- a/content/tutorials/manage-the-rippled-server/configuration/configure-history-sharding.md +++ b/content/tutorials/manage-the-rippled-server/configuration/configure-history-sharding.md @@ -35,6 +35,8 @@ max_size_gb=50 **Tip:** Ripple recommends using NuDB for the shard store (`type=NuDB`). NuDB uses fewer file handles per shard than RocksDB. RocksDB uses memory that scales with the size of data it stores, which may require excessive memory overhead. However, NuDB is designed to be used with SSD drives and does not work with rotational disks. +**Caution:** If you enable history sharding, then later change the database type of your shard store, you must also change the path or delete the existing data from the configured path. If `rippled` detects the wrong type of data in the shard store path, it may fail to start. + For more information, reference the `[shard_db]` example in the [rippled.cfg configuration example](https://github.com/ripple/rippled/blob/master/cfg/rippled-example.cfg). ## 3. Restart the server @@ -43,4 +45,10 @@ For more information, reference the `[shard_db]` example in the [rippled.cfg con systemctl restart rippled ``` -***TODO: is there an API method you can use to check that the server started and sharding was successfully enabled?*** +## 4. Wait for shards to download + +After your server syncs to the network, it automatically starts downloading history shards to fill the available space in the shard store. You can see which shards are being downloaded by looking at which folders are created in the folder where you configured your shard store. (This is defined by the `path` field of the `[shard_db]` stanza in the `rippled.cfg` file.) + +This folder should contain a numbered folder for each shard your server has. At any given time, up to one folder may contain a `control.txt` file, indicating it is incomplete. + + diff --git a/content/tutorials/manage-the-rippled-server/installation/build-run-rippled-macos.md b/content/tutorials/manage-the-rippled-server/installation/build-run-rippled-macos.md index d280288d22..85fd4aa8d3 100644 --- a/content/tutorials/manage-the-rippled-server/installation/build-run-rippled-macos.md +++ b/content/tutorials/manage-the-rippled-server/installation/build-run-rippled-macos.md @@ -157,6 +157,6 @@ For information about `rippled` log messages, see [Understanding Log Messages](u ## See Also -- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu.html) (Pre-built binary on Ubuntu for production use) +- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu-with-alien.html) (Pre-built binary on Ubuntu for production use) - [Build and Run `rippled` on Ubuntu](build-run-rippled-ubuntu.html) (Compile `rippled` yourself on Ubuntu) - [Compilation instructions for other platforms](https://github.com/ripple/rippled/tree/develop/Builds) diff --git a/content/tutorials/manage-the-rippled-server/installation/install-rippled-on-centos-rhel-with-yum.md b/content/tutorials/manage-the-rippled-server/installation/install-rippled-on-centos-rhel-with-yum.md index cbbf8af5ec..94d349157e 100644 --- a/content/tutorials/manage-the-rippled-server/installation/install-rippled-on-centos-rhel-with-yum.md +++ b/content/tutorials/manage-the-rippled-server/installation/install-rippled-on-centos-rhel-with-yum.md @@ -35,7 +35,7 @@ Before you install `rippled`, you must meet the [System Requirements](system-req ## See Also -- [Automatically Update rippled on Ubuntu Linux]() -- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu.html) (Pre-built binary on Ubuntu) +- [Update Automatically on CentOS/Red Hat](update-rippled-automatically-on-centos-rhel.html) +- [Install rippled on Ubuntu Linux](install-rippled-on-ubuntu-with-alien.html) (Pre-built binary on Ubuntu) - [Build and Run `rippled` on Ubuntu](build-run-rippled-ubuntu.html) (Compile `rippled` yourself on Ubuntu) - [Compilation instructions for other platforms](https://github.com/ripple/rippled/tree/develop/Builds) diff --git a/content/tutorials/manage-the-rippled-server/troubleshooting/server-wont-start.md b/content/tutorials/manage-the-rippled-server/troubleshooting/server-wont-start.md index 34e57dde9a..32f669e0d6 100644 --- a/content/tutorials/manage-the-rippled-server/troubleshooting/server-wont-start.md +++ b/content/tutorials/manage-the-rippled-server/troubleshooting/server-wont-start.md @@ -166,4 +166,19 @@ An error such as the following indicates that the `rippled.cfg` has an incomplet Terminating thread rippled: main: unhandled St13runtime_error 'shard path missing' ``` -If your config includes a `[shard_db]` stanza, it must contain a `path` field, which points to a directory where `rippled` can write the data for the shard store. This error means the `path` field is missing or located in the wrong place. Check for extra whitespace or typos in your config file, and compare against the [Shard Configuration Example](history-sharding.html#shard-configuration-example). +If your config includes a `[shard_db]` stanza, it must contain a `path` field, which points to a directory where `rippled` can write the data for the shard store. This error means the `path` field is missing or located in the wrong place. Check for extra whitespace or typos in your config file, and compare against the [Shard Configuration Example](configure-history-sharding.html#2-edit-rippledcfg). + + +## ShardStore unable to open/create RocksDB + +If you enable [history sharding](history-sharding.html), then later change the configuration to use RocksDB instead of NuDB, the server may try to read the existing NuDB data as RocksDB data and fail to start. In this case, the server writes an error such as the following: + +```text +ShardStore:ERR shard 504 error: Unable to open/create RocksDB: Invalid argument: /var/lib/rippled/db/shards/504: does not exist (create_if_missing is false) +``` + +To fix this problem, do one of the following: + +- Move or delete the existing shard data from the configured folder +- Change where the shard store is located on disk by changing the `path` of the `[shard_db]` stanza in the `rippled.cfg` file. +- Change the shard store back to using NuDB. diff --git a/content/tutorials/manage-the-rippled-server/troubleshooting/understanding-log-messages.md b/content/tutorials/manage-the-rippled-server/troubleshooting/understanding-log-messages.md index e6cdd5a04a..9e79c7218f 100644 --- a/content/tutorials/manage-the-rippled-server/troubleshooting/understanding-log-messages.md +++ b/content/tutorials/manage-the-rippled-server/troubleshooting/understanding-log-messages.md @@ -22,7 +22,7 @@ If your server crashes randomly during operation or as a result of particular co - Is your server running out of memory? On some systems, `rippled` may be terminated by the Out Of Memory (OOM) Killer or another monitor process. - If your server is running in a shared environment, are other users or administrators causing the machine or service to be restarted? For example, some hosted providers automatically kill any service that uses a large amount of a shared machine's resources for an extended period of time. -- Does your server meet the [minimum requirements](install-rippled.html#minimum-system-requirements) to run `rippled`? What about the [recommendations for production servers](capacity-planning.html#recommendation-1)? +- Does your server meet the [minimum requirements](system-requirements.html) to run `rippled`? What about the [recommendations for production servers](system-requirements.html#recommended-specifications)? If none of the above apply, please report the issue to Ripple as a security-sensitive bug. If Ripple can reproduce the crash, you may be eligible for a bounty. See for details.