bisq-network / bisq

A decentralized bitcoin exchange network
https://bisq.network
GNU Affero General Public License v3.0
4.67k stars 1.26k forks source link

GUI does not start #4741

Open pmartincalvo opened 3 years ago

pmartincalvo commented 3 years ago

Description

Bisq process starts, but GUI does not appear.

Version

64bit - 1.4.2 - Ubuntu

Steps to reproduce

On a clean Ubuntu 20.04.1:

  1. Install bisq 1.4.2 with .deb
  2. Open client
  3. Shutdown client
  4. Replace data folders to restore backup
  5. Open client again

Expected behaviour

Client starting up normally.

Actual behaviour

Process runs, but no GUI appears. CPU consumption stuck at 0.

Device or machine

Medion Erazer p6705, Ubuntu 20.04.1

Additional info

Nov-02 18:29:19.252 [main] INFO  b.c.u.Utilities: System info: os.name=Linux; os.version=5.4.0-42-generic; os.arch=amd64; sun.arch.data.model=64; JRE=10.0.2+13 (Oracle Corporation); JVM=10.0.2+13 (Java HotSpot(TM) 64-Bit Server VM) 
Nov-02 18:29:19.258 [main] INFO  b.c.app.Version: Version{VERSION=1.4.2, P2P_NETWORK_VERSION=1, LOCAL_DB_VERSION=1, TRADE_PROTOCOL_VERSION=2, BASE_CURRENCY_NETWORK=0, getP2PNetworkId()=10} 
Nov-02 18:29:19.258 [main] INFO  b.c.s.CommonSetup: Path to Bisq jar file: /opt/Bisq/app/desktop-1.4.2-all.jar 
Nov-02 18:29:19.259 [main] INFO  b.c.u.Profiler: System report: Used memory: 20 MB; Free memory: 44 MB; Total memory: 64 MB; No. of threads: 1 
Nov-02 18:29:19.261 [main] INFO  b.c.s.CoreNetworkCapabilities: Set Capability.RECEIVE_BSQ_BLOCK 
Nov-02 18:29:19.972 [JavaFX Application Thread] INFO  b.c.a.AvoidStandbyModeService: Started -- disabled power management via /usr/bin/gnome-session-inhibit --app-id Bisq --inhibit suspend --reason Avoid Standby --inhibit-only 
Nov-02 18:29:20.061 [JavaFX Application Thread] ERROR b.c.c.KeyStorage: Could not load key Key{fileName='enc', algorithm='RSA'} 
Nov-02 18:29:20.216 [Thread-3] ERROR b.c.s.CommonSetup: Uncaught Exception from thread Thread-3 
Nov-02 18:29:20.216 [Thread-3] ERROR b.c.s.CommonSetup: throwableMessage= null 
Nov-02 18:29:20.217 [Thread-3] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.NullPointerException 
Nov-02 18:29:20.218 [Thread-3] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.NullPointerException
    at bisq.desktop.app.BisqApp.lambda$stop$1(BisqApp.java:148)
    at java.base/java.lang.Thread.run(Thread.java:844)

Nov-02 18:29:20.218 [main] ERROR b.c.s.CommonSetup: Uncaught Exception from thread main 
Nov-02 18:29:20.218 [main] ERROR b.c.s.CommonSetup: throwableMessage= Exception in Application start method 
Nov-02 18:29:20.218 [main] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.RuntimeException 
Nov-02 18:29:20.224 [main] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.RuntimeException: Exception in Application start method
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:973)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:198)
    at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.RuntimeException: Could not load key Key{fileName='enc', algorithm='RSA'}
  at bisq.common.crypto.KeyRing.<init>(KeyRing.java:39)
  at bisq.common.crypto.KeyRing.class(KeyRing.java:30)
  while locating bisq.common.crypto.KeyRing
    for the 2nd parameter of bisq.core.user.User.<init>(User.java:80)
  at bisq.core.user.User.class(User.java:66)
  while locating bisq.core.user.User

1 error
    at com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:226)
    at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1053)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1086)
    at bisq.core.setup.CorePersistedDataHost.getPersistedDataHosts(CorePersistedDataHost.java:57)
    at bisq.core.app.BisqExecutable.readAllPersisted(BisqExecutable.java:165)
    at bisq.desktop.app.BisqAppMain.readAllPersisted(BisqAppMain.java:118)
    at bisq.core.app.BisqExecutable.onApplicationLaunched(BisqExecutable.java:136)
    at bisq.desktop.app.BisqAppMain.onApplicationLaunched(BisqAppMain.java:89)
    at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
    at bisq.common.UserThread.execute(UserThread.java:62)
    at bisq.desktop.app.BisqAppMain.lambda$launchApplication$0(BisqAppMain.java:77)
    at bisq.desktop.app.BisqApp.start(BisqApp.java:124)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:919)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(PlatformImpl.java:449)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
    ... 1 more
Caused by: java.lang.RuntimeException: Could not load key Key{fileName='enc', algorithm='RSA'}
    at bisq.common.crypto.KeyStorage.loadKeyPair(KeyStorage.java:125)
    at bisq.common.crypto.KeyRing.<init>(KeyRing.java:42)
    at bisq.common.crypto.KeyRing$$FastClassByGuice$$d987bafc.newInstance(<generated>)
    at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
    at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
    at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
    at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
    at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
    at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
    at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
    at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
    at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:168)
    at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
    at com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1050)
    ... 19 more
Caused by: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: invalid key format
    at java.base/sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:216)
    at java.base/java.security.KeyFactory.generatePrivate(KeyFactory.java:390)
    at bisq.common.crypto.KeyStorage.loadKeyPair(KeyStorage.java:122)
    ... 37 more
Caused by: java.security.InvalidKeyException: invalid key format
    at java.base/sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:330)
    at java.base/sun.security.pkcs.PKCS8Key.decode(PKCS8Key.java:355)
    at java.base/sun.security.rsa.RSAPrivateCrtKeyImpl.<init>(RSAPrivateCrtKeyImpl.java:91)
    at java.base/sun.security.rsa.RSAPrivateCrtKeyImpl.newKey(RSAPrivateCrtKeyImpl.java:75)
    at java.base/sun.security.rsa.RSAKeyFactory.generatePrivate(RSAKeyFactory.java:315)
    at java.base/sun.security.rsa.RSAKeyFactory.engineGeneratePrivate(RSAKeyFactory.java:212)
    ... 39 more
boring-cyborg[bot] commented 3 years ago

Thanks for opening your first issue here!

Be sure to follow the issue template. Your issue will be reviewed by a maintainer and labeled for further action.

cd2357 commented 3 years ago

Did the restored data folder preserve permissions?

cd2357 commented 3 years ago

Or in other words: what was the process by which you did the backup / restore? Was it simply copying the data folder somewhere else, then copying it back? Or did you use any special flags or tools to do that?

For example, depending if the backup was done with cp or rsync, there are different flags which can preserve permissions, see https://askubuntu.com/questions/165998/how-do-i-copy-a-folder-keeping-owners-and-permissions-intact#166001

pmartincalvo commented 3 years ago

The backup was generated with the backup option in the client.

Then it was restored by manually copying (and overwriting previous data) with Nautilus. The user was root.

I would like to add I've executed this procedure successfully in the past. I use bisq in a live ubuntu environment with no persistence, so every time I boot I install bisq from scratch and restore the last backup this way. It's the first time I've had any trouble.

Thanks for your time

pmartincalvo commented 3 years ago

Some extra details:

Sent an END signal to the bisq process.

A few more lines appeared in the log, posting them below. They appear right after the lines I posted originally, nothing in between.

Nov-05 11:28:42.679 [SIGTERM handler] INFO  b.c.a.BisqExecutable: Start graceful shutDown 
Nov-05 11:28:42.694 [SIGTERM handler] ERROR b.c.c.KeyStorage: Could not load key Key{fileName='enc', algorithm='RSA'} 
Nov-05 11:28:42.697 [SIGTERM handler] ERROR b.c.a.BisqExecutable: App shutdown failed with exception com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error injecting constructor, java.lang.RuntimeException: Could not load key Key{fileName='enc', algorithm='RSA'}
  at bisq.common.crypto.KeyRing.<init>(KeyRing.java:39)
  at bisq.common.crypto.KeyRing.class(KeyRing.java:30)
  while locating bisq.common.crypto.KeyRing
    for the 1st parameter of bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager.<init>(ArbitratorManager.java:47)
  at bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager.class(ArbitratorManager.java:37)
  while locating bisq.core.support.dispute.arbitration.arbitrator.ArbitratorManager

1 error 
Nov-05 11:28:42.700 [SIGTERM handler] INFO  b.c.p.PersistenceManager: Start flushAllDataToDisk at shutdown 
Nov-05 11:28:42.701 [SIGTERM handler] INFO  b.c.p.PersistenceManager: flushAllDataToDisk completed