2

Setting up Substrate-Archive for the first time. Tutorial/Wiki is a bit outdated. Following this solution that I found in "issues". Compiled and ran; however, I got an issue that I believe is MAC related.

Solution:

1. Run docker-compose up -d to start postgres and pgadmin

2. Run DATABASE_URL=postgres://postgres:123@localhost:6432/local_chain_db sqlx database create in substrate-archive/src to create the database.

3. Run DATABASE_URL=postgres://postgres:123@localhost:6432/local_chain_db sqlx migrate run in substrate-archive/src` to create the tables.

4. Run cargo run --release -- -c archive.toml in bin/node-template-archive/ to start indexing. Keep in mind to modify the archive.toml configs.

Ran step 4 and received the following error:

Error:

Error: Failed to create RocksDB directory: `Os { code: 30, kind: ReadOnlyFilesystem, message: "Read-only file system" }`.

Is there a workaround? Thank you.

1
  • 1
    The a "Read-only file system" error when trying to run the code sounds to me like it does not have the ability to write to some directory it needs to; I'd check your filesystem permissions on any directories mentioned in the config file.
    – jsdw
    May 20, 2022 at 10:54

1 Answer 1

0

Resolved. Incorrectly modified the archive.toml file.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    May 25, 2022 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.