Closed HamishMacEwan closed 1 year ago
Thanks for reporting the issue!
Could you please reproduce it with log_filters = "INFO"
for more verbose logs?
The log above is the result of INFO as set in the Configuration above:
Here is the log with log_filters = "DEBUG"
from https://github.com/romanz/electrs/blob/master/doc/upgrading.md#important-changes-from-versions-older-than-093:
Nov 17 17:53:54 myNode electrs[28682]: Starting electrs 0.9.9 on aarch64 linux with Config { network: Bitcoin, db_path: "/mnt/hdd/mynode/electrs/bitcoin", daemon_dir: "/home/bitcoin/.bitcoin", daemon_auth: CookieFile("/home/bitcoin/.bitcoin/.cookie"), daemon_rpc_addr: 127.0.0.1:8332, daemon_p2p_addr: 127.0.0.1:8333, electrum_rpc_addr: 0.0.0.0:50001, monitoring_addr: 127.0.0.1:4224, wait_duration: 15s, jsonrpc_timeout: 30s, index_batch_size: 10, index_lookup_limit: None, reindex_last_blocks: 0, auto_reindex: true, ignore_mempool: false, sync_once: false, disable_electrum_rpc: false, server_banner: "Welcome to electrs 0.9.9 (Electrum Rust Server)!", args: [] }
Nov 17 17:53:54 myNode electrs[28682]: [2022-11-17T04:53:54.563Z INFO electrs::metrics::metrics_impl] serving Prometheus metrics on 127.0.0.1:4224
Nov 17 17:53:54 myNode electrs[28682]: [2022-11-17T04:53:54.564Z INFO electrs::server] serving Electrum RPC on 0.0.0.0:50001
Nov 17 17:53:54 myNode electrs[28682]: [2022-11-17T04:53:54.570Z DEBUG tiny_http] Server listening on 127.0.0.1:4224
Nov 17 17:53:54 myNode electrs[28682]: [2022-11-17T04:53:54.583Z DEBUG tiny_http] Running accept thread
Nov 17 17:53:54 myNode electrs[28682]: [2022-11-17T04:53:54.829Z INFO electrs::db] "/mnt/hdd/mynode/electrs/bitcoin": 153 SST files, 37.866398737 GB, 4.722656256 Grows
Nov 17 17:53:54 myNode electrs[28682]: [2022-11-17T04:53:54.832Z DEBUG electrs::db] DB Some(Config { compacted: true, format: 0 })
Nov 17 17:53:54 myNode electrs[28682]: [2022-11-17T04:53:54.889Z DEBUG electrs::db] auto-compactions enabled
Nov 17 17:53:54 myNode systemd[1]: Started myNode Electrum Server.
Nov 17 17:53:59 myNode electrs[28682]: [2022-11-17T04:53:59.444Z INFO electrs::chain] loading 763196 headers, tip=00000000000000000000758c9dc8a0e18c260d25b75ecc93035afaafa6bfdbb1
Nov 17 17:54:04 myNode electrs[28682]: receiving on an empty and disconnected channel
Nov 17 17:54:04 myNode electrs[28682]: Caused by:
Nov 17 17:54:04 myNode electrs[28682]: Error: electrs failed
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.280Z INFO electrs::chain] chain updated: tip=00000000000000000000758c9dc8a0e18c260d25b75ecc93035afaafa6bfdbb1, height=763196
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.312Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockchaininfo []
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.315Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.317Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.332Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockchaininfo []
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.334Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.336Z DEBUG electrs::p2p] closing p2p_loop thread: peer has disconnected
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.336Z DEBUG electrs::p2p] closing p2p_recv thread: connection closed
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.336Z DEBUG electrs::p2p] closing p2p_send thread: no more messages to send
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.336Z WARN electrs::p2p] failed to shutdown p2p connection: Transport endpoint is not connected (os error 107)
Nov 17 17:54:04 myNode electrs[28682]: [2022-11-17T04:54:04.337Z INFO electrs::db] closing DB at /mnt/hdd/mynode/electrs/bitcoin
Nov 17 17:54:04 myNode systemd[1]: electrs.service: Failed with result 'exit-code'.
Nov 17 17:54:04 myNode systemd[1]: electrs.service: Main process exited, code=exited, status=1/FAILURE
And with log_filters = "TRACE"
Nov 17 19:49:47 myNode systemd[1]: Started myNode Electrum Server.
Nov 17 19:49:47 myNode electrs[1129]: Starting electrs 0.9.9 on aarch64 linux with Config { network: Bitcoin, db_path: "/mnt/hdd/mynode/electrs/bitcoin", daemon_dir: "/home/bitcoin/.bitcoin", daemon_auth: CookieFile("/home/bitcoin/.bitcoin/.cookie"), daemon_rpc_addr: 127.0.0.1:8332, daemon_p2p_addr: 127.0.0.1:8333, electrum_rpc_addr: 0.0.0.0:50001, monitoring_addr: 127.0.0.1:4224, wait_duration: 15s, jsonrpc_timeout: 30s, index_batch_size: 10, index_lookup_limit: None, reindex_last_blocks: 0, auto_reindex: true, ignore_mempool: false, sync_once: false, disable_electrum_rpc: false, server_banner: "Welcome to electrs 0.9.9 (Electrum Rust Server)!", args: [] }
Nov 17 19:49:47 myNode electrs[1129]: [2022-11-17T06:49:47.317Z INFO electrs::metrics::metrics_impl] serving Prometheus metrics on 127.0.0.1:4224
Nov 17 19:49:47 myNode electrs[1129]: [2022-11-17T06:49:47.318Z INFO electrs::server] serving Electrum RPC on 0.0.0.0:50001
Nov 17 19:49:47 myNode electrs[1129]: [2022-11-17T06:49:47.318Z DEBUG tiny_http] Server listening on 127.0.0.1:4224
Nov 17 19:49:47 myNode electrs[1129]: [2022-11-17T06:49:47.319Z DEBUG tiny_http] Running accept thread
Nov 17 19:49:47 myNode electrs[1129]: [2022-11-17T06:49:47.371Z INFO electrs::db] "/mnt/hdd/mynode/electrs/bitcoin": 155 SST files, 37.866400345 GB, 4.722656258 Grows
Nov 17 19:49:47 myNode electrs[1129]: [2022-11-17T06:49:47.371Z DEBUG electrs::db] DB Some(Config { compacted: true, format: 0 })
Nov 17 19:49:47 myNode electrs[1129]: [2022-11-17T06:49:47.424Z DEBUG electrs::db] auto-compactions enabled
Nov 17 19:49:51 myNode electrs[1129]: [2022-11-17T06:49:51.997Z INFO electrs::chain] loading 763196 headers, tip=00000000000000000000758c9dc8a0e18c260d25b75ecc93035afaafa6bfdbb1
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.707Z INFO electrs::chain] chain updated: tip=00000000000000000000758c9dc8a0e18c260d25b75ecc93035afaafa6bfdbb1, height=763196
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.742Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockchaininfo []
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.745Z TRACE bitcoincore_rpc] JSON-RPC response for getblockchaininfo: {"chain":"main","blocks":763535,"headers":763535,"bestblockhash":"000000000000000000070598fd1033b3eabb9ec54394ace93ee93b9bbd60881a","difficulty":36762198818467.21,"time":1668667142,"mediantime":1668666395,"verificationprogress":0.9999975790329814,"initialblockdownload":false,"chainwork":"0000000000000000000000000000000000000000399a756c73a44b5dc36a73c0","size_on_disk":498085289644,"pruned":false,"warnings":""}
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.745Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.749Z TRACE bitcoincore_rpc] JSON-RPC response for getnetworkinfo: {"version":230000,"subversion":"/Satoshi:23.0.0/","protocolversion":70016,"localservices":"0000000000000409","localservicesnames":["NETWORK","WITNESS","NETWORK_LIMITED"],"localrelay":true,"timeoffset":-2,"networkactive":true,"connections":10,"connections_in":0,"connections_out":10,"networks":[{"name":"ipv4","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"ipv6","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"onion","limited":false,"reachable":true,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"i2p","limited":true,"reachable":false,"proxy":"","proxy_randomize_credentials":false},{"name":"cjdns","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true}],"relayfee":0.00001000,"incrementalfee":0.00001000,"localaddresses":[{"address":"uzeujq67d44tse7nrl27ujg25bnlyyc3dclvg7y7acilfhnf7y25pcad.onion","port":8333,"score":4}],"warnings":""}
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.750Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.764Z TRACE bitcoincore_rpc] JSON-RPC response for getnetworkinfo: {"version":230000,"subversion":"/Satoshi:23.0.0/","protocolversion":70016,"localservices":"0000000000000409","localservicesnames":["NETWORK","WITNESS","NETWORK_LIMITED"],"localrelay":true,"timeoffset":-2,"networkactive":true,"connections":10,"connections_in":0,"connections_out":10,"networks":[{"name":"ipv4","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"ipv6","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"onion","limited":false,"reachable":true,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"i2p","limited":true,"reachable":false,"proxy":"","proxy_randomize_credentials":false},{"name":"cjdns","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true}],"relayfee":0.00001000,"incrementalfee":0.00001000,"localaddresses":[{"address":"uzeujq67d44tse7nrl27ujg25bnlyyc3dclvg7y7acilfhnf7y25pcad.onion","port":8333,"score":4}],"warnings":""}
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.765Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockchaininfo []
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.768Z TRACE bitcoincore_rpc] JSON-RPC response for getblockchaininfo: {"chain":"main","blocks":763535,"headers":763535,"bestblockhash":"000000000000000000070598fd1033b3eabb9ec54394ace93ee93b9bbd60881a","difficulty":36762198818467.21,"time":1668667142,"mediantime":1668666395,"verificationprogress":0.9999975790329814,"initialblockdownload":false,"chainwork":"0000000000000000000000000000000000000000399a756c73a44b5dc36a73c0","size_on_disk":498085289644,"pruned":false,"warnings":""}
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.768Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.772Z TRACE bitcoincore_rpc] JSON-RPC response for getnetworkinfo: {"version":230000,"subversion":"/Satoshi:23.0.0/","protocolversion":70016,"localservices":"0000000000000409","localservicesnames":["NETWORK","WITNESS","NETWORK_LIMITED"],"localrelay":true,"timeoffset":-2,"networkactive":true,"connections":10,"connections_in":0,"connections_out":10,"networks":[{"name":"ipv4","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"ipv6","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"onion","limited":false,"reachable":true,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"i2p","limited":true,"reachable":false,"proxy":"","proxy_randomize_credentials":false},{"name":"cjdns","limited":true,"reachable":false,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true}],"relayfee":0.00001000,"incrementalfee":0.00001000,"localaddresses":[{"address":"uzeujq67d44tse7nrl27ujg25bnlyyc3dclvg7y7acilfhnf7y25pcad.onion","port":8333,"score":4}],"warnings":""}
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.774Z DEBUG electrs::p2p] closing p2p_recv thread: connection closed
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.775Z DEBUG electrs::p2p] closing p2p_loop thread: peer has disconnected
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.777Z INFO electrs::db] closing DB at /mnt/hdd/mynode/electrs/bitcoin
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.774Z TRACE electrs::p2p] send: Version(VersionMessage { version: 70001, services: ServiceFlags(0), timestamp: 1668667796, receiver: Address {services: ServiceFlags(NONE), address: 0.0.0.0, port: 0}, sender: Address {services: ServiceFlags(NONE), address: 0.0.0.0, port: 0}, nonce: 10253528855294442965, user_agent: "/electrs:0.9.9/", start_height: 0, relay: false })
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.778Z DEBUG electrs::p2p] closing p2p_send thread: no more messages to send
Nov 17 19:49:56 myNode electrs[1129]: [2022-11-17T06:49:56.778Z WARN electrs::p2p] failed to shutdown p2p connection: Transport endpoint is not connected (os error 107)
Nov 17 19:49:56 myNode electrs[1129]: Error: electrs failed
Nov 17 19:49:56 myNode electrs[1129]: Caused by:
Nov 17 19:49:56 myNode electrs[1129]: receiving on an empty and disconnected channel
Nov 17 19:49:56 myNode systemd[1]: electrs.service: Main process exited, code=exited, status=1/FAILURE
Nov 17 19:49:56 myNode systemd[1]: electrs.service: Failed with result 'exit-code'.
Could you please attach your bitcoin.conf
file?
I suggest using https://github.com/romanz/electrs/blob/master/doc/config.md#bitcoind-configuration for configuring your Bitcoin node.
Could you please attach your
bitcoin.conf
file?
# bitcoin configuration
# /home/bitcoin/.bitcoin/bitcoin.conf
# Bitcoin options
server=1
daemon=1
# Needed for BTC-RPC-Explorer
txindex=1
# Add blockfilter index for faster rescans (Adds 6+ GB)
#blockfilterindex=1
# Connection settings
rpcauth=mynode:e7cb8aca8fe4f7d5125962271c7aa78a$750044b84bdbf20785c0b62cece73cf2f84ad9af71c203e358a4293e50eab225
rpcport=8332
rpcbind=0.0.0.0
rpcallowip=127.0.0.1
rpcallowip=10.0.0.0/8
rpcallowip=172.16.0.0/12
rpcallowip=192.168.0.0/16
# Set default wallet so some wallet APIs work
main.wallet=wallet.dat
main.wallet=joinmarket_wallet.dat
test.wallet=wallet.dat
test.wallet=joinmarket_wallet.dat
# Enable Deprecated RPCs
deprecatedrpc=addresses
# Dont limit data to electrum server or local network
whitelist=download@127.0.0.1
whitelist=download@10.0.0.0/8
whitelist=download@172.16.0.0/12
whitelist=download@192.168.0.0/16
# Enable Bloom filters
whitelist=bloomfilter@127.0.0.1
whitelist=bloomfilter@10.0.0.0/8
whitelist=bloomfilter@172.16.0.0/12
whitelist=bloomfilter@192.168.0.0/16
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333
zmqpubhashblock=tcp://0.0.0.0:28334
# myNode Optimizations
dbcache=1000
maxorphantx=10
maxmempool=250
maxconnections=10
maxuploadtarget=1000
rpcworkqueue=64
minRelayTxFee=0
# Tor config
proxy=127.0.0.1:9050
listen=1
#bind=127.0.0.1
# Tor only (default)
#onlynet=i2p
onlynet=onion
dnsseed=0
dns=0
I suggest using https://github.com/romanz/electrs/blob/master/doc/config.md#bitcoind-configuration for configuring your Bitcoin node.
Mine is a customised version of bitcoin.conf
that comes with the myNodeBTC.com distribution, and has been tweaked over a period of years as different needs have arisen and declined.
It may be time to revert to the standard configuration.
Making the maxconnections
12 (up from 10, and still down from 40, as recommended) has resulted in:
Nov 18 07:26:35 myNode electrs[6786]: [2022-11-17T18:26:35.973Z INFO electrs::chain] loading 763196 headers, tip=00000000000000000000758c9dc8a0e18c260d25b75ecc93035afaafa6bfdbb1
Nov 18 07:26:49 myNode electrs[6786]: [2022-11-17T18:26:49.183Z INFO electrs::chain] chain updated: tip=00000000000000000000758c9dc8a0e18c260d25b75ecc93035afaafa6bfdbb1, height=763196
Nov 18 07:27:00 myNode electrs[6786]: [2022-11-17T18:27:00.402Z INFO electrs::index] indexing 417 blocks: [763197..763613]
All good. Thank you for the assistanceš
Describe the bug
Electrs version
electrs 0.9.9 (Electrum Rust Server)
To Reproduce
This is the situation after a recent upgrade to myNode version 3.05
Expected behavior
That electrs would not crash.
Configuration
System running electrs
Electrum client upstream desktop Electrum, but with the server failing, it seems less relevant.
Additional context
Happy to provide any further information required.