joinmarket-clientserver icon indicating copy to clipboard operation
joinmarket-clientserver copied to clipboard

Can't use sendpayment.py We failed to connect and handshake with ANY directories; onion messaging is not functioning.

Open johnblanc opened this issue 1 year ago • 15 comments

I get this error when trying to use sendpayment.py

We failed to connect and handshake with ANY directories; onion messaging is not functioning.

im behind tor, and using the default connection settings from version 0.9.8 config file

johnblanc avatar Jan 23 '23 17:01 johnblanc

First, remove the [MESSAGING:onion] section from your config and leave only the IRC sections. (actually it should work anyway without this, but only after a delay, so you may as well do it now).

There is work ongoing right now to fix this (we are probably going to merge #1436 re: #1435 today), but better not get into the details here.

AdamISZ avatar Jan 23 '23 17:01 AdamISZ

OK i did this and it starts now but hangs on `2023-01-24 08:09:26,688 [INFO] Using bitcoin network feerate for 3 block confirmation target (randomized for privacy): 8773 sat/vkB (8.7 sat/vB) 2023-01-24 08:09:26,688 [INFO] Estimated miner/tx fees for this coinjoin amount: 0.0% 2023-01-24 08:09:26,688 [INFO] Joinmarket daemon listening on port 27183 2023-01-24 08:09:26,689 [INFO] Starting transaction monitor in walletservice

`

johnblanc avatar Jan 24 '23 06:01 johnblanc

its been like that for days now, can't send any payment, bitcoin is stuck in this wallet

johnblanc avatar Jan 26 '23 16:01 johnblanc

So what exact command are you running?

(Side note: be aware you can always send money out of the wallet without any Tor, IRC or other communication; you just need to have a connection to your bitcoin node, which I can see you do, from the above logs. The correct syntax for that is: python sendpayment.py -N 0 -m 1 walletname.jmdat 0 <destinationaddress> for sending funds out of mixdepth 1. See extension explanation in docs/USAGE.md about how to use sendpayment).

AdamISZ avatar Jan 26 '23 17:01 AdamISZ

I'm using this command python sendpayment.py -N 4 -m 4 wallet.jmdat 0 <destinationaddress and it has been stuck on the above lines for 2 weeks now without sending it

p.s. does that method sacrifice privacy? (i just need to clean out a mixing depth because of too many inputs and no point of doing it one by one)

johnblanc avatar Feb 06 '23 17:02 johnblanc

Why didn't you do -N 0 as I mentioned above, if you just want to empty the mixdepth/wallet? Of course no reason to wait even hours, let alone weeks.

AdamISZ avatar Feb 06 '23 17:02 AdamISZ

I want to clean a mixdepth but still want some privacy with the output when doing so.

johnblanc avatar Feb 13 '23 15:02 johnblanc

Yes, good reason. As per other thread, it seems that Joinmarket is not able to make connections over Tor?

AdamISZ avatar Feb 13 '23 15:02 AdamISZ

yes indeed. I remember with previous versions I had to make some change in the config file to make it work in Qubes, but since the newer versions have different config I started with an install from scratch (because older version stopped working anyway) and can't remember for the life of me what change was needed :(

johnblanc avatar Feb 13 '23 16:02 johnblanc

I can confirm that I also have this same issue.

Flimsy-Fox avatar Apr 25 '23 22:04 Flimsy-Fox

@Flimsy-Fox

I can confirm that I also have this same issue.

Can you add more info? Are you also using Qubes? Which OS?

I remember with previous versions I had to make some change in the config file to make it work in Qubes,

The most likely thing to change is the socks5 configuration, in both IRC and onion if you wanna use it. I think it should work with default but maybe not. Also, when you say Qubes, you mean which VM? A Whonix VM? A debian VM? A Fedora VM?

Also, make sure you have at least a [MESSAGING:] section configured, either IRC or onion.

PulpCattel avatar Apr 27 '23 08:04 PulpCattel

@Flimsy-Fox

I can confirm that I also have this same issue.

Can you add more info? Are you also using Qubes? Which OS?

I remember with previous versions I had to make some change in the config file to make it work in Qubes,

The most likely thing to change is the socks5 configuration, in both IRC and onion if you wanna use it. I think it should work with default but maybe not. Also, when you say Qubes, you mean which VM? A Whonix VM? A debian VM? A Fedora VM?

Also, make sure you have at least a [MESSAGING:] section configured, either IRC or onion.

Complete console output of sendpayment.py
$ python sendpayment.py -N 9 wallet.jmdat 0 [REDACTED]
User data location: /home/gabriel/.joinmarket/
2023-05-22 13:56:09,676 [INFO]  Nobody listens on 127.0.0.1:9050, trying to start Tor.
2023-05-22 13:56:09,676 [INFO]  Can't find our custom tor.
2023-05-22 13:56:09,677 [INFO]  Using maximum coinjoin fee limits per maker of 0.5000%, 0.00060000 BTC (60000 sat) 
2023-05-22 13:56:09,677 [INFO]  starting sendpayment
Enter passphrase to decrypt wallet: 
2023-05-22 13:56:20,140 [INFO]  Using bitcoin network feerate for 6 block confirmation target (randomized for privacy): 44729 sat/vkB (44.7 sat/vB)
2023-05-22 13:56:20,140 [INFO]  Estimated miner/tx fees for this coinjoin amount: 1.7%
2023-05-22 13:56:20,141 [INFO]  Joinmarket daemon listening on port 27183
2023-05-22 13:56:20,141 [INFO]  Starting transaction monitor in walletservice
2023-05-22 13:56:20,153 [INFO]  Trying to connect to node: g3hv4uynnmynqqq2mchf3fcm3yd46kfzmcdogejuckgwknwyq5ya6iad.onion:5222
2023-05-22 13:56:20,154 [INFO]  Trying to connect to node: 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222
2023-05-22 13:56:20,155 [INFO]  Trying to connect to node: bqlpq6ak24mwvuixixitift4yu42nxchlilrcqwk2ugn45tdclg42qid.onion:5222
Unhandled error in Deferred:

Traceback (most recent call last):
--- <exception caught here> ---
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/internet/defer.py", line 857, in _runCallbacks
    current.result = callback(  # type: ignore[misc]
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmdaemon/jmdaemon/onionmc.py", line 613, in respond_to_connection_failure
    super().respond_to_connection_failure(failure)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmdaemon/jmdaemon/onionmc.py", line 531, in respond_to_connection_failure
    failure.trap(HostUnreachableError, SocksError, GeneralServerFailureError)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/python/failure.py", line 476, in trap
    self.raiseException()
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/python/failure.py", line 500, in raiseException
    raise self.value.with_traceback(self.tb)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/txtorcon/socks.py", line 751, in connect
    proto = yield proxy_ep.connect(socks_factory)
twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.

Unhandled error in Deferred:

Traceback (most recent call last):
--- <exception caught here> ---
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/internet/defer.py", line 857, in _runCallbacks
    current.result = callback(  # type: ignore[misc]
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmdaemon/jmdaemon/onionmc.py", line 613, in respond_to_connection_failure
    super().respond_to_connection_failure(failure)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmdaemon/jmdaemon/onionmc.py", line 531, in respond_to_connection_failure
    failure.trap(HostUnreachableError, SocksError, GeneralServerFailureError)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/python/failure.py", line 476, in trap
    self.raiseException()
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/python/failure.py", line 500, in raiseException
    raise self.value.with_traceback(self.tb)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/txtorcon/socks.py", line 751, in connect
    proto = yield proxy_ep.connect(socks_factory)
twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.

Unhandled error in Deferred:

Traceback (most recent call last):
--- <exception caught here> ---
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/internet/defer.py", line 857, in _runCallbacks
    current.result = callback(  # type: ignore[misc]
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmdaemon/jmdaemon/onionmc.py", line 613, in respond_to_connection_failure
    super().respond_to_connection_failure(failure)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmdaemon/jmdaemon/onionmc.py", line 531, in respond_to_connection_failure
    failure.trap(HostUnreachableError, SocksError, GeneralServerFailureError)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/python/failure.py", line 476, in trap
    self.raiseException()
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/twisted/python/failure.py", line 500, in raiseException
    raise self.value.with_traceback(self.tb)
  File "/home/gabriel/joinmarket-clientserver-0.9.9/jmvenv/lib/python3.9/site-packages/txtorcon/socks.py", line 751, in connect
    proto = yield proxy_ep.connect(socks_factory)
twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.

2023-05-22 13:57:20,155 [ERROR]  We failed to connect and handshake with ANY directories; onion messaging is not functioning.

I'm running on Manjaro Linux with kernel version 6.1.29-1.

Flimsy-Fox avatar May 22 '23 20:05 Flimsy-Fox

I notice these two messages:

2023-05-22 13:56:09,676 [INFO]  Nobody listens on 127.0.0.1:9050, trying to start Tor.
2023-05-22 13:56:09,676 [INFO]  Can't find our custom tor.

The two messages seem to indicate that JoinMarket cannot connect to the Tor daemon (which is installed on my system, but is not running given the output of systemctl status tor), then tries unsuccessfully to find a local installation of Tor within JoinMarket's root directory (which was not selected when ./install.sh was ran).

Flimsy-Fox avatar May 22 '23 20:05 Flimsy-Fox

I was able to not only connect to peers, but also sign a Tumbler schedule after running ./install.sh -p python3.9 --with-local-tor in JoinMarket's root.

Flimsy-Fox avatar May 22 '23 20:05 Flimsy-Fox

I notice these two messages:

2023-05-22 13:56:09,676 [INFO]  Nobody listens on 127.0.0.1:9050, trying to start Tor.
2023-05-22 13:56:09,676 [INFO]  Can't find our custom tor.

The two messages seem to indicate that JoinMarket cannot connect to the Tor daemon (which is installed on my system, but is not running given the output of systemctl status tor), then tries unsuccessfully to find a local installation of Tor within JoinMarket's root directory (which was not selected when ./install.sh was ran).

Yes, you need to have either system wide Tor running (systemctl enable tor and systemctl start tor should do the trick) or manually make JM to build Tor from source code and auto-start it.

kristapsk avatar May 22 '23 22:05 kristapsk