bisq-network / bisq2

GNU Affero General Public License v3.0
168 stars 62 forks source link

Bisq2 hangs during startup, then shuts down with error #2653

Open ChanoSan opened 1 month ago

ChanoSan commented 1 month ago

Bisq2 v2.1.0, running on Ubuntu 20.04.6 LTS (focal)

On startup, Bisq2 begins "Initialize P2P Network" / "Bootstrap to Tor network", but hangs at 24%. After a few minutes of inactivity, it displays the following error message:

Bisq version: Version: v2.1.0 / Commit hash: 47537ff8a
Operating system: linux / x86_64 / 64 v.5.15.0-117-generic
Error message:
An error occurred at initializing Bisq: java.util.concurrent.TimeoutException.

This has occurred multiple times, and as yet Bisq2 cannot successfully start, but always shuts down in error.

Log files provided are as follows:

bisq2_log.txt

HenrikJannsen commented 1 month ago

Can you try to delete the tor directory inside the data directory?

ChanoSan commented 1 month ago

Can you try to delete the tor directory inside the data directory?

This would be /home/.local/share/Bisq2/tor , is that right?

ChanoSan commented 1 month ago

Assuming that was the correct location, deleted it and restarted the application, but the same behaviour occurred.

HenrikJannsen commented 1 month ago

Yes, thats the location. Hm...weird. Can you try to backup your data directory and start with a completely fresh one? Have not heard of anyone else with that issue. Can you try also before if tor browser works or Bisq1 if you have that installed? Also try to restart the OS, sometimes processes hang or ports are blocked.

ChanoSan commented 1 month ago

Attempted the following:

In both cases, the same error persisted.

Trying out Tor Browser was one of the first things I checked, and that works fine. Bisq1 also starts and runs normally (Haveno also works, for that matter).

Basically, every other process that needs to run a Tor process works as expected. The error appears to be isolated to Bisq2, but I'm not sure how, where, or why.

Can provide more logs, or run more test cases on request.

HenrikJannsen commented 1 month ago

Can you provide the tor debug log file from inside the tor folder? Have you tried with a fresh data directory? @alvasw Do you have any idea?

ChanoSan commented 1 month ago

Can you provide the tor debug log file from inside the tor folder?

I'm looking in the tor folder, but currently no debug log file is visible. I'm not sure why. I'll try deleting the data directory after uninstall, then reinstall and try again. See if that shakes anything loose.

ChanoSan commented 1 month ago

I ran dpkg -P bisq2 to uninstall and purge all config files, then manually deleted the bisq2 directory in /.local/share/ before reinstalling Bisq2 and trying again.

There is no change, the same error occurs. In the interests of being thorough, this is the new bisq.log:

bisq.log

HenrikJannsen commented 1 month ago

@alvasw Could you have a look to the logs? Its very short. It does not get beyond:

TorTransportService: Initialize Tor 
TorInstaller: Tor files installed to <HOME_DIR>/.local/share/Bisq2/tor 
HenrikJannsen commented 1 month ago

@ChanoSan In case you are a dev and familiar with IntelliJ you could try to debug it to see where it hangs. A good etnry point would be TorInstaller where it logs "Tor files installed to...". If you set a breakpoint there and keep stepping through it might reveal where it fails. I have not heard from such an issue with 2.1.0 so far. So it seems it some local issue or some rare edge case.

Tobiasheitor commented 4 weeks ago

Bisq2 v2.1.0, running on Ubuntu 20.04.6 LTS (focal)

On startup, Bisq2 begins "Initialize P2P Network" / "Bootstrap to Tor network", but hangs at 24%. After a few minutes of inactivity, it displays the following error message:

Bisq version: Version: v2.1.0 / Commit hash: 47537ff8a
Operating system: linux / x86_64 / 64 v.5.15.0-117-generic
Error message:
An error occurred at initializing Bisq: java.util.concurrent.TimeoutException.

This has occurred multiple times, and as yet Bisq2 cannot successfully start, but always shuts down in error.

Log files provided are as follows:

bisq2_log.txt

I'm having the same issue. Here is my logs: bisq.log debug_for_zip.log

ChanoSan commented 4 weeks ago

@HenrikJannsen

In case you are a dev and familiar with IntelliJ you could try to debug it to see where it hangs

Unfortunately I'm not, so I'll just have to hope it can be figured out eventually

rodvar commented 3 weeks ago

From the logs above is timeouting connecting to a tor relay, hangs at 14%

25 21:40:30.776 [Thread-43] INFO  b.t.c.BootstrapService: Tor bootstrap event: BootstrapEvent(progress=14, tag=handshake, summary=Handshaking with a relay" WARNING="DONE" REASON=DONE COUNT=74 RECOMMENDATION=warn HOSTID="EE2A621042994B29452C12FF3B6F62D9E957758C" HOSTADDR="145.239.41.102:9001,

bisq.tor.controller.exceptions.TorBootstrapFailedException: Could not bootstrap Tor in 240 seconds

I'm unsure is this is the same reason for the original discussed issue.

But generally speaking: Do you have control on the network you are running Bisq2? I wonder if you are getting any direct Tor connection ports or address blocked in your network?

Testing tor on a browser might not be enough to guarantee Bisq is gonna work I think, a better test would be running Bisq1 to see if you get the same problem / get more log data to try to find what's going on.

Would you mind trying downloading the source code and running from there? It would be something like the following on a Linux Terminal:

 $ git clone https://github.com/bisq-network/bisq2.git  // optionally [download a zip](https://github.com/bisq-network/bisq2) and unzip in your preferred folder and go to that folder in the terminal
 $ cd bisq2
 $ ./gradlew buildAll
 $ ./apps/desktop/desktop-app-launcher/build/install/desktop-app-launcher/bin/desktop-app-launcher

you will see logs in the terminal whilst the app launches and tries to connect to Tor.

qv4 commented 3 weeks ago

Bisq2 v2.1.0, running on Ubuntu 20.04.6 LTS (focal) On startup, Bisq2 begins "Initialize P2P Network" / "Bootstrap to Tor network", but hangs at 24%. After a few minutes of inactivity, it displays the following error message:

Bisq version: Version: v2.1.0 / Commit hash: 47537ff8a
Operating system: linux / x86_64 / 64 v.5.15.0-117-generic
Error message:
An error occurred at initializing Bisq: java.util.concurrent.TimeoutException.

This has occurred multiple times, and as yet Bisq2 cannot successfully start, but always shuts down in error. Log files provided are as follows: bisq2_log.txt

I'm having the same issue. Here is my logs: bisq.log debug_for_zip.log

Same issue here as well.

qv4 commented 3 weeks ago

Sorry for the lack of detail. Pretty much tried the same steps: purging, reinstalling, making sure Java SDK 22 is installed, etc. Application times out at 24% every time, with the above error. Ubuntu 20.04

ChanoSan commented 2 weeks ago

Just as a side note, I tried a fresh install on Ubuntu Jammy (22.04) and it ran as expected.

Based on @qv4 's input, I feel like Ubuntu Focal (20.04) is the common factor.

rodvar commented 2 weeks ago

Thanks for that insight, that narrows down the issue.

I have a PC with Ubuntu 24.04.1 LTS and it runs great.

Quick search on tor related issues for that specific Ubuntu version brought me to this:

I guess asking anyone to upgrade to a newer LTS version to use Bisq is too much to ask :) , but also as Henrik said we are way too busy and low on resources to focus on an issue on a very specific Ubuntu version.

If I get some spare time this month I'll get a virtual machine with Ubuntu 20.04 and try to repro this locally

ChanoSan commented 2 weeks ago

I've been using Tor-based processes in Focal for some time, with no issue, but on reflection I've never used it from package manager. My Tor Browser is a standalone program downloaded from TorProject, I use an OnionShare Snap package with embedded Tor, etc.

I have been able to run bisq1 on Focal with zero problems, but I don't know if that uses an embedded tor process or relies on system tor... I'm wagering a guess bisq1 & bisq2 are handling tor connections differently, but I can only speculate.

For now I guess I'll stick to using bisq2 on Jammy.

rodvar commented 2 weeks ago

Bisq do package the Java Tor library.

Thank you @ChanoSan , Bisq2 is the way to go as all our efforts are mostly there at the moment and once we get multisig trading working on Bisq2 (which is on the way), Bisq1 trading will most likely be discontinued.