Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config: electrs failed to connect #1157

Open
embetrix opened this issue Feb 15, 2025 · 3 comments
Open

Config: electrs failed to connect #1157

embetrix opened this issue Feb 15, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@embetrix
Copy link

Have you read the documentation?
Yes.

How did you configure electrs?

electrs.toml
electrs --log-filters TRACE --cookie-file /run/bitcoin/cookie --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001"

Environment variables: ELECTRS_X=Y;...
Arguments: --log-filters TRACE --cookie-file /run/bitcoin/cookie --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001"

Debug output of configuration

electrs --log-filters TRACE --cookie-file /run/bitcoin/cookie --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001"
Starting electrs 0.10.9 on aarch64 linux with Config { network: Bitcoin, db_path: "./db/bitcoin", db_log_dir: None, db_parallelism: 1, daemon_auth: CookieFile("/run/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.9 (Electrum Rust Server)!", signet_magic: f9beb4d9 }
[2025-02-15T09:18:51.678Z DEBUG tiny_http] Server listening on 127.0.0.1:4224
[2025-02-15T09:18:51.678Z INFO  electrs::metrics::metrics_impl] serving Prometheus metrics on 127.0.0.1:4224
[2025-02-15T09:18:51.678Z INFO  electrs::server] serving Electrum RPC on 127.0.0.1:50001
[2025-02-15T09:18:51.678Z DEBUG tiny_http] Running accept thread
[2025-02-15T09:18:51.705Z INFO  electrs::db] "./db/bitcoin": 19 SST files, 0.000019494 GB, 0.000000019 Grows
[2025-02-15T09:18:51.705Z DEBUG electrs::db] DB Some(Config { compacted: false, format: 0 })
[2025-02-15T09:18:51.707Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockchaininfo []
[2025-02-15T09:18:51.708Z TRACE bitcoincore_rpc] JSON-RPC response for getblockchaininfo: {"chain":"testnet4","blocks":70187,"headers":70187,"bestblockhash":"000000006a3b6d78b6124422a97f3b7747927798cde1ae20a9820527079121f5","bits":"1d00ffff","target":"00000000ffff0000000000000000000000000000000000000000000000000000","difficulty":1,"time":1739618100,"mediantime":1739614497,"verificationprogress":1,"initialblockdownload":false,"chainwork":"00000000000000000000000000000000000000000000019790126ae9d7d97ad2","size_on_disk":4534929376,"pruned":false,"warnings":"This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"}
[2025-02-15T09:18:51.708Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
[2025-02-15T09:18:51.708Z TRACE bitcoincore_rpc] JSON-RPC response for getnetworkinfo: {"version":289900,"subversion":"/Satoshi:28.99.0/","protocolversion":70016,"localservices":"0000000000000c09","localservicesnames":["NETWORK","WITNESS","NETWORK_LIMITED","P2P_V2"],"localrelay":true,"timeoffset":0,"networkactive":true,"connections":10,"connections_in":0,"connections_out":10,"networks":[{"name":"ipv4","limited":false,"reachable":true,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"ipv6","limited":false,"reachable":true,"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":[],"warnings":"This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"}
[2025-02-15T09:18:51.708Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
[2025-02-15T09:18:51.708Z TRACE bitcoincore_rpc] JSON-RPC response for getnetworkinfo: {"version":289900,"subversion":"/Satoshi:28.99.0/","protocolversion":70016,"localservices":"0000000000000c09","localservicesnames":["NETWORK","WITNESS","NETWORK_LIMITED","P2P_V2"],"localrelay":true,"timeoffset":0,"networkactive":true,"connections":10,"connections_in":0,"connections_out":10,"networks":[{"name":"ipv4","limited":false,"reachable":true,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"ipv6","limited":false,"reachable":true,"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":[],"warnings":"This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"}
[2025-02-15T09:18:51.708Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockchaininfo []
[2025-02-15T09:18:51.709Z TRACE bitcoincore_rpc] JSON-RPC response for getblockchaininfo: {"chain":"testnet4","blocks":70187,"headers":70187,"bestblockhash":"000000006a3b6d78b6124422a97f3b7747927798cde1ae20a9820527079121f5","bits":"1d00ffff","target":"00000000ffff0000000000000000000000000000000000000000000000000000","difficulty":1,"time":1739618100,"mediantime":1739614497,"verificationprogress":1,"initialblockdownload":false,"chainwork":"00000000000000000000000000000000000000000000019790126ae9d7d97ad2","size_on_disk":4534929376,"pruned":false,"warnings":"This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"}
[2025-02-15T09:18:51.709Z DEBUG bitcoincore_rpc] JSON-RPC request: getnetworkinfo []
[2025-02-15T09:18:51.709Z TRACE bitcoincore_rpc] JSON-RPC response for getnetworkinfo: {"version":289900,"subversion":"/Satoshi:28.99.0/","protocolversion":70016,"localservices":"0000000000000c09","localservicesnames":["NETWORK","WITNESS","NETWORK_LIMITED","P2P_V2"],"localrelay":true,"timeoffset":0,"networkactive":true,"connections":10,"connections_in":0,"connections_out":10,"networks":[{"name":"ipv4","limited":false,"reachable":true,"proxy":"127.0.0.1:9050","proxy_randomize_credentials":true},{"name":"ipv6","limited":false,"reachable":true,"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":[],"warnings":"This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"}
[2025-02-15T09:18:51.709Z INFO  electrs::db] closing DB at ./db/bitcoin
Error: electrs failed

Caused by:
    0: bitcoin p2p failed to connect: 127.0.0.1:8333
    1: Connection refused (os error 111)
s

Expected behavior
electrs should connect to bitcoind rpc

Actual behavior
electrs do not connect to bitcoind rpc

@embetrix embetrix added the bug Something isn't working label Feb 15, 2025
@embetrix
Copy link
Author

this is my bitcoin.conf

pid=/run/bitcoin/bitcoind.pid
nodebuglogfile=1
datadir=/var/bitcoin
loglevel=info
proxy=127.0.0.1:9050
signer=/usr/bin/hwi

# Settings for reduced RAM/CPU/Storage
#dbcache=250
#maxmempool=200
#maxconnections=25
#prune=750

testnet4=1

[testnet4]
walletdir=/var/wallet

# RPC Settings
server=1
rpcuser=satobox
rpcport=8332
rpcconnect=127.0.0.1
# generated using ./share/rpcauth/rpcauth.py satobox sat0b0x
rpcauth=satobox:c7eadc9121b2af62e92df69f1$3eecb49b2600f152f728a9f66ab38028e8c710a04ea06c69e4a2f291e7d6eee3
rpccookiefile=/run/bitcoin/cookie
deprecatedrpc=warnings

@embetrix
Copy link
Author

it looks like the issue is when onion proxy is enabled: proxy=127.0.0.1:9050 electrs cannot connect ! is there a way arround this ? I want to keep my bitcoind traffic onion routed.

@embetrix
Copy link
Author

#901

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant