-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bisq fails to start because of data directory issue #3998
Comments
Previously, Config#mkdir and #mkAppDir threw ConfigException if any underlying IOException was thrown from Files#createDirectory or Files#createDirectories respectively. This resulted in only a simple error message being reported at the command line and the details of the underlying exception's stack trace were lost. This change wraps and rethrows the underlying IOException as an UncheckedIOException such that it gets caught by the catch(Throwable) clause in BisqExecutable, which does print a stacktrace to stderr. This is the way it always should have worked; throwing ConfigException in these cases was an oversight in the original implementation. This change also removes the ConfigException constructor that allows for passing a nested exception to be wrapped as there is actually no use case for this now that these two anomalies have been corrected. This change was made in the process of attempting to reproduce bisq-network#3998.
The following comment is cross-posted from https://bisq.community/t/new-install-not-starting-up/8963/31: I have been unable to reproduce this error. Here are the steps I took:
Since I cannot reproduce this myself, what's needed now is to get more information about the reason for the failure to create the (already existing) First you will need to have JDK 10, 11 or 12 installed locally. Use JDK 10 if you don't have anything installed already. You can get it from https://jdk.java.net/. When complete, check your java version at the command line and you should see the following:
Next, you need to build and run Bisq with my patch applied. Here's how to do it if you have
If you do not have
Note that on Windows, you will need to run You should end up with an error that begins with the following lines:
Please copy and paste your entire error message here. |
Previously, Config#mkdir and #mkAppDir threw ConfigException if any underlying IOException was thrown from Files#createDirectory or Files#createDirectories respectively. This resulted in only a simple error message being reported at the command line and the details of the underlying exception's stack trace were lost. This change wraps and rethrows the underlying IOException as an UncheckedIOException such that it gets caught by the catch(Throwable) clause in BisqExecutable, which does print a stacktrace to stderr. This is the way it always should have worked; throwing ConfigException in these cases was an oversight in the original implementation. This change also removes the ConfigException constructor that allows for passing a nested exception to be wrapped as there is actually no use case for this now that these two anomalies have been corrected. This change was made in the process of attempting to reproduce bisq-network#3998.
Previously, Config#mkdir and #mkAppDir threw ConfigException if any underlying IOException was thrown from Files#createDirectory or Files#createDirectories respectively. This resulted in only a simple error message being reported at the command line and the details of the underlying exception's stack trace were lost. This change wraps and rethrows the underlying IOException as an UncheckedIOException such that it gets caught by the catch(Throwable) clause in BisqExecutable, which does print a stacktrace to stderr. This is the way it always should have worked; throwing ConfigException in these cases was an oversight in the original implementation. This change also removes the ConfigException constructor that allows for passing a nested exception to be wrapped as there is actually no use case for this now that these two anomalies have been corrected. This change was made in the process of attempting to reproduce bisq-network#3998.
|
This change fixes bisq-network#3998 by avoiding the attempt to create a user's appDataDir if it already exists. Normally this attempt is not a problem, as Files#createDirectories does nothing if the target is a directory that already exists, but in the case that the target is a symbolic link, Files#createDirectories throws a FileAlreadyExistsException. This change prevents the call to Files#createDirectories if the target already exists, and if in fact the target is a symbolic link pointing to an existing directory, this is not a problem and everything proceeds as per usual. This mimics the behavior in Bisq v1.2.5 and prior, where File#mkdirs was used instead of Files#createDirectories. File#mkdirs does not throw an exception when the target directory is a symlink, it just returns false.
Hello yes. I didn't build yet but I am using symbolic link in data path
…On Tue, 25 Feb 2020, 10:36 Chris Beams, ***@***.***> wrote:
@tieck wrote via
https://bisq.community/t/new-install-not-starting-up/8963/32:
It seems that the new version does not handle symbolic links in the path
of the Bisq application directory the same way anymore.
I could reproduce the behavior in first moving away the application
directory and then creating a symbolic link at its place:
$ mkdir ~/tmp
$ mv ~/.local/share/Bisq/ ~/tmp
$ ln -s ~/tmp/Bisq/ ~/.local/share/Bisq
$ ./gradlew :desktop:run
> Task :desktop:run FAILED
fault: An unexpected error occurred. Please file a report at https://bisq.network/issues
java.io.UncheckedIOException: Application data directory '/home/xxx/.local/share/Bisq' could not be created
at bisq.common.config.Config.mkAppDataDir(Config.java:805)
at bisq.common.config.Config.<init>(Config.java:644)
at bisq.core.app.BisqExecutable.execute(BisqExecutable.java:76)
at bisq.desktop.app.BisqAppMain.main(BisqAppMain.java:57)
Caused by: java.nio.file.FileAlreadyExistsException: /home/xxx/.local/share/Bisq
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:385)
at java.base/java.nio.file.Files.createDirectory(Files.java:689)
at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:796)
at java.base/java.nio.file.Files.createDirectories(Files.java:742)
at bisq.common.config.Config.mkAppDataDir(Config.java:803)
... 3 more
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3998?email_source=notifications&email_token=AFUENCR62ZKZU7UIUE3OGZDRETYELA5CNFSM4KZFRTEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM3ONLI#issuecomment-590800557>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUENCWLKXTDO2O3XRN7OELRETYELANCNFSM4KZFRTEA>
.
|
Perfect timing, @DrFredPhD. I've just submitted PR #4002, which fixes this problem. Thanks for getting back. |
Description
Based on https://bisq.community/t/new-install-not-starting-up/8963/25
Users cannot start version v1.2.7 because of following exception being thrown:
Version
Regression bug affecting version v1.2.7.
Does work in v1.2.5.
Steps to reproduce
Unfortunately not 100% clear why this is happening.
Every time this users start v1.2.7 with an existing data directory the app fails to start.
Reverting back to v1.2.5 solves the problem and app starts as expected.
Expected behaviour
App starts.
Actual behaviour
App fails to start.
Device or machine
We know about one affected user on Windows and one on Linux.
The text was updated successfully, but these errors were encountered: