./bin/bitcoind -datadir=./datadir -rpcuser=user -rpcpassword=pass -rpcbind=0.0.0.0 -txindex --zmqpubrawblock=tcp://127.0.0.1:28332 --zmqpubrawtx=tcp://127.0.0.1:28333 -rpcallowip=0.0.0.0/0 -server=1
igor@carbon ~/Documents/electrs (master) $ RUST_BACKTRACE=1 cargo run --release -- -vvv --timestamp --db-dir ./db2 --cookie="user:pass"
Finished release [optimized] target(s) in 0.23s
Running `target/release/electrs -vvv --timestamp --db-dir ./db2 '--cookie=user:pass'`
Config { log: StdErrLog { verbosity: Debug, quiet: false, timestamp: Millisecond, modules: [], writer: "stderr", color_choice: Auto }, network_type: bitcoin, db_path: "./db2/mainnet"
, daemon_dir: "/home/igor/.bitcoin", daemon_rpc_addr: V4(127.0.0.1:8332), cookie: Some("user:pass"), electrum_rpc_addr: V4(127.0.0.1:50001), monitoring_addr: V4(127.0.0.1:4224), json
rpc_import: false, index_batch_size: 100, bulk_index_threads: 8, tx_cache_size: 10000 }
2018-11-11T22:11:53.406+00:00 - DEBUG - Server listening on 127.0.0.1:4224
2018-11-11T22:11:53.406+00:00 - DEBUG - Running accept thread
2018-11-11T22:11:53.406+00:00 - INFO - NetworkInfo { version: 170001, subversion: "/Satoshi:0.17.0.1/" }
2018-11-11T22:11:53.407+00:00 - INFO - BlockchainInfo { chain: "main", blocks: 549714, headers: 549714, bestblockhash: "00000000000000000017bf87a77361c891edb479b15e21962b7f0ee2074342
a9", pruned: false, initialblockdownload: false }
2018-11-11T22:11:53.408+00:00 - DEBUG - opening DB at "./db2/mainnet"
2018-11-11T22:11:53.433+00:00 - INFO - listing block files at "/home/igor/.bitcoin/blocks/blk*.dat"
2018-11-11T22:11:53.433+00:00 - INFO - indexing 0 blk*.dat files
2018-11-11T22:11:53.433+00:00 - DEBUG - found 0 indexed blocks
2018-11-11T22:12:15.082+00:00 - DEBUG - applying 549715 new headers from height 0
2018-11-11T22:12:15.342+00:00 - DEBUG - no more blocks to index
2018-11-11T22:12:15.342+00:00 - DEBUG - no more blocks to index
2018-11-11T22:12:15.342+00:00 - DEBUG - no more blocks to index
2018-11-11T22:12:15.342+00:00 - DEBUG - no more blocks to index
2018-11-11T22:12:15.342+00:00 - DEBUG - no more blocks to index
2018-11-11T22:12:15.342+00:00 - DEBUG - no more blocks to index
2018-11-11T22:12:15.342+00:00 - DEBUG - no more blocks to index
2018-11-11T22:12:15.343+00:00 - DEBUG - no more blocks to index
thread 'bulk_writer' panicked at 'no indexed header found', libcore/option.rs:960:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::continue_panic_fmt
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::option::expect_failed
thread 'main' panicked at 'writer panicked: Any', libcore/result.rs:945:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
1: std::sys_common::backtrace::print
2: std::panicking::default_hook::{{closure}}
3: std::panicking::default_hook
4: std::panicking::rust_panic_with_hook
5: std::panicking::continue_panic_fmt
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::result::unwrap_failed
9: electrs::bulk::index_blk_files
10: electrs::main
11: std::rt::lang_start::{{closure}}
12: std::panicking::try::do_call
13: __rust_maybe_catch_panic
14: std::rt::lang_start_internal
15: main
16: __libc_start_main
17: _start
oh, is it crashing because its trying to find blocks in "/home/igor/.bitcoin/blocks/blk*.dat" ?
thats not where they are
I believe your db-dir isn't written properly.
"--db-dir ./db2" should be "--db-dir=./db2"
You should use --daemon-dir for specifying your bitcoind data directory.
It's set to ~/.bitcoin/ by default, so it looks for blk*.dat files at ~/.bitcoin/blocks/blk*.dat.