Post
Topic
Board Electrum
Topic OP
A popular unresolved issue with electrs (bitcoin p2p failed to connect)
by
btc-freedom-money
on 13/05/2025, 19:12:50 UTC
I don't want to use the word error because it's not really an error, it's a configuration issue many people seem to be having.

Here are two examples of 2 open issues:
https://github.com/romanz/electrs/issues/1157
https://github.com/romanz/electrs/issues/901

I think the problem many are having with this is that networking alongside using VMs is very hard to learn.

In my case I use Whonix because it makes it simpler to use tor with my own node and also more secure. I can't remember the source I read this from but the reason the whonix docs (https://whonix.org/wiki/ElectrumX) has in the bitcoin.conf "proxy=10.152.152.10:9111" is because that is the IP used for the whonix gateway VM which is the VM which runs the tor service. So if you had 127.0.0.1 as proxy then there would be no connection.

I don't think the solution is as simple as changing the electrs configuration to use 10.152.152.10:9111 instead of 127.0.0.1:8333 because electrs isn't supposed to connect to the internet. It's supposed to work in the connection chain as electrum > electrs > bitcoin-qt > tor. So maybe it would work by that config change but it doesn't seem like the best solution. electrs and bitcoin-qt are running on the same machine (VM) which is the whonix workstation so I think some kind of local connection like 127.0.0.1 should be the way to do this but it doesn't work.

So my problem and probably most people with this problem, is that we don't understand enough about how networking with VMs work. The whole combination of networking, VMs, electrs, bitcoin-qt is advanced to understand.

Please help me and others with the same problem to understand this configuration issue better so we know what we are doing and what the best solution is.