Skip to content

Config: the default configuration file is ignored, and so is --conf #1065

Description

@ildella

Have you read the documentation?
Yes.

How did you configure electrs?

Is running on a raspberrypi with latest Raspian OS. I built it from scratch.

$ cat ~/.electrs/config.toml
[server]
electrum_rpc_addr = "127.0.0.1:50001"

[bitcoin]
network = "bitcoin"
daemon_dir = "/home/pi/zio/bitcoin"
cookie_file = "/home/pi/zio/bitcoin/.cookie"
db_dir = "/home/pi/zio/electrs/db"
log_filters = "TRACE"

Environment variables: none set
Arguments: none set

Debug output of configuration

$ ./target/release/electrs
Starting electrs 0.10.5 on aarch64 linux with Config { network: Bitcoin, db_path: "./db/bitcoin", db_log_dir: None, daemon_dir: "/home/pi/.bitcoin", daemon_auth: CookieFile("/home/pi/.bitcoin/.cookie"), daemon_rpc_addr: 127.0.0.1:8332, daemon_p2p_addr: 127.0.0.1:8333, electrum_rpc_addr: 127.0.0.1:50001, monitoring_addr: 127.0.0.1:4224, wait_duration: 10s, jsonrpc_timeout: 15s, index_batch_size: 10, index_lookup_limit: None, reindex_last_blocks: 0, auto_reindex: true, ignore_mempool: false, sync_once: false, skip_block_download_wait: false, disable_electrum_rpc: false, server_banner: "Welcome to electrs 0.10.5 (Electrum Rust Server)!", signet_magic: f9beb4d9, args: [] }
Error: electrs failed

Caused by:
    0: failed to open bitcoind cookie file: /home/pi/.bitcoin/.cookie
    1: No such file or directory (os error 2)

Expected behavior
I would expect the configuration to be loaded, as expected from the docs: https://github.com/romanz/electrs/blob/master/doc/config.md#configuration-files-and-priorities

Actual behavior
It is clear that electrs is starting using default configuration, looking for files in /home/pi/.bitcoin/ while my config states otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions