I’m using the --torcontrol feature to automatically create a tor hidden service. From the logs, the control connection is established and authenticated, and the hidden service added, and correct onionv3 address assigned. However:
- There are no incoming P2P connections via Tor (they fail to connect, see below).
- If I try to connect manually, it fails (General SOCKS server failure)
Here is an excerpt of the failure on the tor side:
 0tor_1               | May 09 14:44:44.000 [debug] connection_exit_begin_conn(): Creating new exit connection.
 1tor_1               | May 09 14:44:44.000 [debug] circuit_get_by_circid_channel_impl(): circuit_get_by_circid_channel_impl() returning circuit 0x7f5274f0c200 for circ_id 3666618028, channel ID 5 (0x7f527505dda0)
 2tor_1               | May 09 14:44:44.000 [debug] handle_hs_exit_conn(): Connecting the hidden service rendezvous circuit to the service destination.
 3tor_1               | May 09 14:44:44.000 [debug] circuit_get_by_circid_channel_impl(): circuit_get_by_circid_channel_impl() returning circuit 0x7f5274f0c200 for circ_id 3666618028, channel ID 5 (0x7f527505dda0)
 4tor_1               | May 09 14:44:44.000 [debug] connection_exit_connect(): about to try connecting
 5tor_1               | May 09 14:44:44.000 [debug] connection_connect(): Connecting to "(rendezvous)":38334.
 6tor_1               | May 09 14:44:44.000 [debug] connection_connect_sockaddr(): Connection to socket in progress (sock 12).
 7tor_1               | May 09 14:44:44.000 [debug] connection_add_impl(): new conn type Exit, socket 12, address (rendezvous), n_conns 14.
 8tor_1               | May 09 14:44:44.000 [debug] connection_or_process_cells_from_inbuf(): 15: starting, inbuf_datalen 0 (0 pending in tls object).
 9tor_1               | May 09 14:44:44.000 [debug] conn_write_callback(): socket 12 wants to write.
10tor_1               | May 09 14:44:44.000 [info] connection_handle_write_impl(): in-progress connect failed. Removing. (Connection refused)
11tor_1               | May 09 14:44:44.000 [debug] connection_edge_end(): Sending end on conn (fd 12).
I specifically wonder why address “(rendezvous)”, and why address 38334? Both are wrong.
I used nc -v -x 127.0.0.1:9050 sxvxellncmexkds7h3kjy62vl67xwvrccqiigrdybbc4jutjf6amtuad.onion 38333 to connect to the hidden service, which yields nc: connection failed, SOCKSv5 error: General SOCKS server failure.
@jonatack used bitcoin-cli addnode sxvxellncmexkds7h3kjy62vl67xwvrccqiigrdybbc4jutjf6amtuad.onion onetry on his bitcoin node to the same error message.
My bitcoind options are (env vars are resolved by docker-compose):
 0      -signet=1
 1      -disablewallet=1
 2      -txindex=1
 3      -blockfilterindex=basic
 4      -peerbloomfilters=1
 5      -peerblockfilters=1
 6      -logtimestamps=0
 7      -maxconnections=32
 8      -listen=1
 9      -discover=1
10      -dnsseed=0
11      -onlynet=i2p
12      -i2psam=i2pd:${I2PD_PORT}
13      -i2pacceptincoming=1
14      -onlynet=onion
15      -listenonion=1
16      -onion=tor:${TOR_SOCKS_PORT}
17      -torcontrol=tor:${TOR_CONTROL_PORT}
18      -torpassword=xxx
19      -rpcbind=0.0.0.0:${BITCOIND_RPC_PORT}
20      -rpcallowip=0.0.0.0/0
21      -rpcauth=xxx
22      -rpcthreads=2
23      -par=2
24      -debug=tor
My torrc is pretty default, but I’m using these command line options on top:
0ControlPort 0.0.0.0:9051 HashedControlPassword xxx Log "debug stdout" SafeLogging 0
I’m attaching full logs of bitcoind and tor. log-bitcoind.txt log-tor.txt.gz
I would expect bitcoind to automatically configure the hidden service for me (as documented in tor.md) and listen for incoming tor connections. As a side note, I’ve migrated from the configuration variant that manages the hidden service within tor.
System information
- Bitcoin Core 23.0 within Docker version 20.10.12 under Ubuntu 22.04 LTS
- Tor 0.4.7.7 within Docker version 20.10.12 under Ubuntu 22.04 LTS
- All on an Intel Celeron home server.