Electrs: Error: An unknown argument '--jsonrpc-import' was specified.

Created on 10 Sep 2019  路  10Comments  路  Source: romanz/electrs

A new issue has occured when running on the RaspiBlitz, confirmed by multiple other users too: https://github.com/openoms/bitcoin-tutorials/issues/11
HW: RPi4 4GB
OS: Raspbian Buster, RaspiBlitz 1.3, bitcoind 0.18.1.

After a succesful build with https://github.com/openoms/bitcoin-tutorials/blob/master/electrs/1_electrs_on_RaspiBlitz.sh
Using the command:
./home/admin/electrs/target/release/electrs --index-batch-size=10 --jsonrpc-import --db-dir /mnt/hdd/electrs/db --electrum-rpc-addr="0.0.0.0:50001" --cookie="raspibolt:PASSWORD_B" -vvvv

Results to an error:

Error: An unknown argument '--jsonrpc-import' was specified.

Is there any known way to solve this?

bug

All 10 comments

Taking a look now, thanks for reporting!

First of all, sorry for the breakage!
This is probably a side effect from https://github.com/romanz/electrs/issues/151#issuecomment-528757361 - we meant to fix a security issue but didn't communicate well the reason behind it in the latest (unofficially) released version.

  1. Using --jsonrpc_import instead of --jsonrpc-import seems to work.
  2. --cookie is now not supported via command-line, to prevent potential security issues (see https://github.com/romanz/electrs/issues/151) - but can be specified via a config file.

CC @Kixunil could you please take a look on the 1st issue (--jsonrpc_import-related)?

You should be able to use the following electrs.toml config file for setting the flags (including cookie):

verbose = 4
timestamp = true
jsonrpc_import = true
db_dir = "/home/user/.electrs/"
cookie = "username:password"

Make sure that the config file is in the current working directory of electrs.

In order to prevent such issues in the future, would you like for me to open a GitHub issue for announcing backward incompatible issue?
We can also use https://gitter.im/romanz/electrs for coordination, if you prefer.
@openoms @victorscones @Kixunil WDYT?
(please CC other users of electrs who may be interested...)

ok, thanks. Will try to apply the fix shortly and will update my guide.

Trying to find out where to put this electrs.toml
what would be the working direcory in our case when running: /home/admin/electrs/target/release/electrs ?
tried /home/admin/electrs/target/release/, /home/admin/electrs/, /home/admin/electrs/src so far to no avail

IIUC, you can put it also under /etc/electrs/config.toml or ~/.electrs/config.toml.
If it doesn't work, please let me know and I'll update the docs.

Thank you, my server is up again. The ~/.electrs/config.toml worked. The RaspiBlitz guide is updated too.

Sorry, I was pretty busy and didn't notice this. Glad it's resolved! Will release new version of configure_me ASAP to fix hypen issue. (But config files are better for this stuff anyway. :P)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

duckartes picture duckartes  路  3Comments

darklow picture darklow  路  8Comments

tiero picture tiero  路  4Comments

kenshin-samourai picture kenshin-samourai  路  4Comments

romanz picture romanz  路  3Comments