near / near-indexer-for-explorer

Watch NEAR network and store all the data from NEAR blockchain to PostgreSQL database
https://near-indexers.io/docs/projects/near-indexer-for-explorer
GNU General Public License v3.0
123 stars 56 forks source link

"Could not open key file" error #215

Closed JesseChing closed 2 years ago

JesseChing commented 2 years ago

when I ran the below command in the Docker ./indexer-explorer --home-dir /root/.near/testnet run --store-genesis sync-from-latest

and returned the panic message:

Dec 18 20:50:54.391 INFO indexer_for_explorer: NEAR Indexer for Explorer v0.10.4 starting... Dec 18 20:50:54.391 INFO indexer_for_explorer: construct_near_indexer_config Dec 18 20:50:54.391 INFO indexer: Load config from /root/.near/testnet... thread 'main' panicked at 'Could not open key file.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /usr/local/cargo/git/checkouts/nearcore-5bf7818cf2261fd0/397a7a4/nearcore/src/config.rs:1171:41

How to fix the problem?

frol commented 2 years ago

@JesseChing Have you run init command before you do run?

https://github.com/near/near-indexer-for-explorer#configure-near-indexer-for-explorer

frol commented 2 years ago

This issue seems to stem from the misconfiguration (the nearcore home folder must contain genesis.json, node_key.json, and config.json files, which are produced by init command), so I am closing it.