From 27355a893adb4318c6c9608ea5ca42ca60d1e901 Mon Sep 17 00:00:00 2001 From: joshieDo <93316087+joshieDo@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:48:09 +0000 Subject: [PATCH 1/5] add docker and error code 13 to troubleshooting --- book/run/troubleshooting.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/book/run/troubleshooting.md b/book/run/troubleshooting.md index cab39cb1165c..04f7b990030e 100644 --- a/book/run/troubleshooting.md +++ b/book/run/troubleshooting.md @@ -2,8 +2,42 @@ This page tries to answer how to deal with the most popular issues. +- [Troubleshooting](#troubleshooting) + - [Database](#database) + - [Docker](#docker) + - [Error code 13](#error-code-13) + - [Slow database inserts and updates](#slow-database-inserts-and-updates) + - [Compact the database](#compact-the-database) + - [Re-sync from scratch](#re-sync-from-scratch) + - [Database write error](#database-write-error) + - [Concurrent database access error (using containers/Docker)](#concurrent-database-access-error-using-containersdocker) + - [Hardware Performance Testing](#hardware-performance-testing) + - [Disk Speed Testing with IOzone](#disk-speed-testing-with-iozone) + + ## Database +### Docker + +Externally accessing a `datadir` inside a named docker volume will usually come with folder/file ownership/permissions issues. + +**It is not recommended** to use the path to the named volume as it will trigger an error code 13. + +Example: `db-access --path /var/lib/docker/volumes/named_volume/_data/eth/db` + +### Error code 13 + +`the environment opened in read-only code: 13` + +Externally acessing a database in a read-only folder is not supported, **UNLESS** there's no `mdbx.lck` present, and it's called with `exclusive` on calling `open_db_read_only`. Meaning that there's no node syncing concurrently. + +If the error persists, ensure that you have the right `xo` permissions on the `datadir` **and its parent** folders. Eg. the following command should succeed: + +``` +stat /full/path/$DATADIR +``` + + ### Slow database inserts and updates If you're: From 804860fc8f6445e5f11e8b227f8f1391f37d403c Mon Sep 17 00:00:00 2001 From: joshieDo <93316087+joshieDo@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:52:50 +0000 Subject: [PATCH 2/5] xr --- book/run/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/run/troubleshooting.md b/book/run/troubleshooting.md index 04f7b990030e..4a8e43a7f722 100644 --- a/book/run/troubleshooting.md +++ b/book/run/troubleshooting.md @@ -31,7 +31,7 @@ Example: `db-access --path /var/lib/docker/volumes/named_volume/_data/eth/db` Externally acessing a database in a read-only folder is not supported, **UNLESS** there's no `mdbx.lck` present, and it's called with `exclusive` on calling `open_db_read_only`. Meaning that there's no node syncing concurrently. -If the error persists, ensure that you have the right `xo` permissions on the `datadir` **and its parent** folders. Eg. the following command should succeed: +If the error persists, ensure that you have the right `rx` permissions on the `datadir` **and its parent** folders. Eg. the following command should succeed: ``` stat /full/path/$DATADIR From 87c9f43753a00cb7e38561a2c4b141186956564c Mon Sep 17 00:00:00 2001 From: joshieDo <93316087+joshieDo@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:03:34 +0000 Subject: [PATCH 3/5] ci --- book/run/troubleshooting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/run/troubleshooting.md b/book/run/troubleshooting.md index 4a8e43a7f722..ce5809c21736 100644 --- a/book/run/troubleshooting.md +++ b/book/run/troubleshooting.md @@ -29,12 +29,12 @@ Example: `db-access --path /var/lib/docker/volumes/named_volume/_data/eth/db` `the environment opened in read-only code: 13` -Externally acessing a database in a read-only folder is not supported, **UNLESS** there's no `mdbx.lck` present, and it's called with `exclusive` on calling `open_db_read_only`. Meaning that there's no node syncing concurrently. +Externally accessing a database in a read-only folder is not supported, **UNLESS** there's no `mdbx.lck` present, and it's called with `exclusive` on calling `open_db_read_only`. Meaning that there's no node syncing concurrently. If the error persists, ensure that you have the right `rx` permissions on the `datadir` **and its parent** folders. Eg. the following command should succeed: ``` -stat /full/path/$DATADIR +stat /full/path/datadir ``` From b868a10d6805f3319a14933944fc831f81971978 Mon Sep 17 00:00:00 2001 From: joshieDo <93316087+joshieDo@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:05:30 +0000 Subject: [PATCH 4/5] mdbook --- book/run/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/run/troubleshooting.md b/book/run/troubleshooting.md index ce5809c21736..5678d03ee731 100644 --- a/book/run/troubleshooting.md +++ b/book/run/troubleshooting.md @@ -33,7 +33,7 @@ Externally accessing a database in a read-only folder is not supported, **UNLESS If the error persists, ensure that you have the right `rx` permissions on the `datadir` **and its parent** folders. Eg. the following command should succeed: -``` +```bash,ignore stat /full/path/datadir ``` From 22c2fdabd02e34b714b73afb300bd36c93d9d5ce Mon Sep 17 00:00:00 2001 From: joshieDo <93316087+joshieDo@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:28:10 +0000 Subject: [PATCH 5/5] docs --- book/run/troubleshooting.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/book/run/troubleshooting.md b/book/run/troubleshooting.md index 5678d03ee731..7b8ec6ba19c3 100644 --- a/book/run/troubleshooting.md +++ b/book/run/troubleshooting.md @@ -21,9 +21,7 @@ This page tries to answer how to deal with the most popular issues. Externally accessing a `datadir` inside a named docker volume will usually come with folder/file ownership/permissions issues. -**It is not recommended** to use the path to the named volume as it will trigger an error code 13. - -Example: `db-access --path /var/lib/docker/volumes/named_volume/_data/eth/db` +**It is not recommended** to use the path to the named volume as it will trigger an error code 13. `RETH_DB_PATH: /var/lib/docker/volumes/named_volume/_data/eth/db cargo r --examples db-access --path ` is **DISCOURAGED** and a mounted volume with the right permissions should be used instead. ### Error code 13