LedgerHQ / satstack

Bitcoin full node with Ledger Live
BSD 2-Clause "Simplified" License
158 stars 32 forks source link

FAILED to initialize Bus #54

Closed samsong closed 2 years ago

samsong commented 3 years ago

Same as issue #46

Launching LSS for 2nd time. INFO config file detected path=/home/user/.config/Ledger Live/lss.json FATAL Failed to initialize bus error=failed to load wallet: -4: wallet file verification failed. Refusing to load database. Data file '/bitcoin/.bitcoin/satstack/wallet.dat' is already loaded

onthebay commented 3 years ago

I have a similar issue on a new install.

lss.exe
←[90m[2021/04/22 - 19:39:56]←[0m ←[32m INFO←[0m Ledger SatStack (lss) v0.12.0                 ←[32march←[0m=windows amd64 ←[32mbuild←[0m= ←[32mcommit←[0m= ←[32mruntime←[0m=go1.15.5
←[90m[2021/04/22 - 19:39:56]←[0m ←[32m INFO←[0m Config file detected                          ←[32mpath←[0m=C:\Users\user/AppData/Roaming/Ledger Live/lss.json
←[90m[2021/04/22 - 19:39:56]←[0m ←[32m INFO←[0m Warming up...
←[90m[2021/04/22 - 19:39:56]←[0m ←[31mFATAL←[0m Failed to initialize Bus                      ←[31merror←[0m=failed to detect txindex: failed to get block
m-schmoock commented 3 years ago

This can be 'fixed' by running bitcoin-cli unloadwallet satstack on the node running bitcoind. Note: When bitcoind is still syncing / rescanning addresses for this wallet this may take a while to complete (and unload).

m-schmoock commented 3 years ago

Hm, still needed to restart bitcoind to get it 'fixed' -.-

stanislavkozlovski commented 3 years ago

The unloadwallet command does not seem to work for me:

./bitcoin-cli unloadwallet "satstack"
error code: -18
error message:
Requested wallet does not exist or is not loaded
./bitcoin-cli unloadwallet satstack
error code: -18
error message:
Requested wallet does not exist or is not loaded
jwander14 commented 3 years ago

The unloadwallet command does not seem to work for me:

./bitcoin-cli unloadwallet "satstack"
error code: -18
error message:
Requested wallet does not exist or is not loaded
./bitcoin-cli unloadwallet satstack
error code: -18
error message:
Requested wallet does not exist or is not loaded

Same issue for me: Requested wallet does not exist or is not loaded.

BushMasterSix-LA commented 3 years ago

For sure there is no such a wallet, therefore nothing is to unload Ledger should take this out of the SatStack code.

d-rez commented 1 year ago

Seems that this issue is not fixed as of 0.17.0

Instantly crashes on startup.

[2022/12/01 - 17:35:33]  INFO Ledger SatStack (lss) v0.16.1                 arch=windows amd64 build= commit= runtime=go1.17.13
[2022/12/01 - 17:35:33]  INFO Config file detected                          path=C:\Users/<>/Ledger Live/lss.json
[2022/12/01 - 17:35:33]  INFO Warming up...
[2022/12/01 - 17:35:36] FATAL Failed to initialize Bus                      error=failed to load wallet: -35: Wallet file verification failed. Refusing to load database. Data file '/bitcoin/.bitcoin/satstack/wallet.dat' is already loaded.

[process exited with code 1 (0x00000001)]

Manually unloading the wallet worked for me, but is cumbersome since it requires opening a docker shell etc in my scenario

bitcoin-cli unloadwallet satstack
adrienlacombe commented 1 year ago

Seems that this issue is not fixed as of 0.17.0

Instantly crashes on startup.

[2022/12/01 - 17:35:33]  INFO Ledger SatStack (lss) v0.16.1                 arch=windows amd64 build= commit= runtime=go1.17.13
[2022/12/01 - 17:35:33]  INFO Config file detected                          path=C:\Users/<>/Ledger Live/lss.json
[2022/12/01 - 17:35:33]  INFO Warming up...
[2022/12/01 - 17:35:36] FATAL Failed to initialize Bus                      error=failed to load wallet: -35: Wallet file verification failed. Refusing to load database. Data file '/bitcoin/.bitcoin/satstack/wallet.dat' is already loaded.

[process exited with code 1 (0x00000001)]

Manually unloading the wallet worked for me, but is cumbersome since it requires opening a docker shell etc in my scenario

bitcoin-cli unloadwallet satstack

a node restart would also solve this usually

d-rez commented 1 year ago

Sub-optimal to have to use CLI to restart the node if it's i.e. running on another host under docker. Couldn't we ask the user if they want to try unloading the wallet when this error appears?

I also discovered lss --unload-wallet works so that functionality is already there, it seems

adrienlacombe commented 1 year ago

Sub-optimal to have to use CLI to restart the node if it's i.e. running on another host under docker. Couldn't we ask the user if they want to try unloading the wallet when this error appears?

I also discovered lss --unload-wallet works so that functionality is already there, it seems

yes this is why we added the unload wallet

JohnnyTrapps commented 1 year ago

hello, this is my 2nd time reaching about 60% progress and me getting this error. any update on how to resolve? i just created an account here, i am not technical at all so simple steps to resolve would be greatly appreciated.

[GIN-debug] GET /timestamp --> github.com/ledgerhq/satstack/httpd/handlers.GetTimestamp.func1 (3 handlers) [GIN-debug] GET /control/descriptors/import --> github.com/ledgerhq/satstack/httpd/handlers.ImportAccounts.func1 (3 handlers) [GIN-debug] POST /control/descriptors/has --> github.com/ledgerhq/satstack/httpd/handlers.HasDescriptor.func1 (3 handlers) [GIN-debug] GET /blockchain/:version/explorer/_health --> github.com/ledgerhq/satstack/httpd/handlers.GetHealth.func1 (3 handlers) [GIN-debug] GET /blockchain/:version/explorer/status --> github.com/ledgerhq/satstack/httpd/handlers.GetStatus.func1 (3 handlers) [GIN-debug] GET /blockchain/:version/btc/network --> github.com/ledgerhq/satstack/httpd/handlers.GetNetwork.func1 (3 handlers) [GIN-debug] GET /blockchain/:version/btc/fees --> github.com/ledgerhq/satstack/httpd/handlers.GetFees.func1 (3 handlers) [GIN-debug] GET /blockchain/:version/btc/blocks/:block --> github.com/ledgerhq/satstack/httpd/handlers.GetBlock.func1 (3 handlers) [GIN-debug] GET /blockchain/:version/btc/transactions/:hash/hex --> github.com/ledgerhq/satstack/httpd/handlers.GetTransactionHex.func1 (3 handlers) [GIN-debug] POST /blockchain/:version/btc/transactions/send --> github.com/ledgerhq/satstack/httpd/handlers.SendTransaction.func1 (3 handlers) [GIN-debug] GET /blockchain/:version/btc/addresses/:addresses/transactions --> github.com/ledgerhq/satstack/httpd/handlers.GetAddresses.func1 (3 handlers) [2023/03/26 - 08:39:21] INFO worker: Initial Block Download complete blockHash=0000000000000000000275786e24537c98d15fff3b317baa00f8ae62c8b68066 blockHeight=782599 [2023/03/26 - 08:39:28] INFO worker: Importing descriptors duration=1d11h9m14s progress=67.09% [2023/03/26 - 08:39:36] INFO worker: Importing descriptors duration=1d11h9m21s progress=67.10% [2023/03/26 - 08:39:43] INFO worker: Importing descriptors duration=1d11h9m28s progress=67.10%

[process exited with code 1 (0x00000001)]