LedgerHQ / satstack

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

FATAL Failed to initialize Bus #46

Closed tooraj-enayati closed 2 years ago

tooraj-enayati commented 3 years ago

I'm trying to run satstack on myNode Raspberry Pi 4. I donwloaed go and compile it and manged to get it runing but now I get the following erro on start up. Something to do with wallet.dat already being loaded.

admin@myNode:/home/lss $ ./lss [2021/02/13 - 02:57:55] INFO Ledger SatStack (lss) v0.12.0 arch=linux arm build= commit= runtime=go1.15.8 [2021/02/13 - 02:57:55] INFO Config file detected path=lss.json [2021/02/13 - 02:57:55] INFO Warming up... [2021/02/13 - 02:57:55] FATAL Failed to initialize Bus error=failed to load wallet: -4: Wallet file verification failed. Refusing to load database. Data file '/home/bitcoin/.bitcoin/satstack/wallet.dat' is already loaded.

tooraj-enayati commented 3 years ago

No satstack folder!

admin@myNode:/home/bitcoin/.bitcoin $ ls -al total 187940 drwxr-xr-x 6 bitcoin bitcoin 4096 Feb 13 03:23 . drwxr-xr-x 21 bitcoin bitcoin 4096 Feb 5 19:22 .. -rw------- 1 bitcoin bitcoin 224355 Nov 28 08:02 banlist.dat -rw-r--r-- 1 bitcoin bitcoin 970 Feb 5 19:21 bitcoin.conf -rw------- 1 bitcoin bitcoin 5 Feb 5 19:21 bitcoind.pid drwxr-xr-x 3 bitcoin bitcoin 131072 Feb 12 21:30 blocks drwxr-xr-x 2 bitcoin bitcoin 114688 Feb 13 03:10 chainstate -rw------- 1 bitcoin bitcoin 75 Feb 5 19:21 .cookie -rw------- 1 bitcoin bitcoin 7792060 Feb 13 03:12 debug.log -rw-r--r-- 1 bitcoin bitcoin 9 Feb 5 19:21 env -rw------- 1 bitcoin bitcoin 247985 Feb 5 18:40 fee_estimates.dat drwxr-xr-x 3 bitcoin bitcoin 4096 Aug 20 14:52 indexes -rw------- 1 bitcoin bitcoin 0 Oct 20 23:00 .lock -rw------- 1 bitcoin bitcoin 183364248 Feb 5 18:40 mempool.dat -rw------- 1 bitcoin bitcoin 820 Feb 1 02:37 onion_private_key -rw------- 1 bitcoin bitcoin 99 Feb 5 19:22 onion_v3_private_key -rw------- 1 bitcoin bitcoin 513189 Feb 13 03:23 peers.dat -rw-r--r-- 1 bitcoin bitcoin 7 Feb 5 19:21 settings.json drwx------ 3 bitcoin bitcoin 4096 Feb 5 19:21 wallet.dat

tooraj-enayati commented 3 years ago

I have tried both ./lss and sudo ./lss

HamishMacEwan commented 3 years ago

Same issue here.

C:\Program Files\Ledger Live> .\lss.exe
[2021/03/08 - 18:43:28]  INFO Ledger SatStack (lss) v0.12.0                 arch=windows amd64 build= commit= runtime=go1.15.5
[2021/03/08 - 18:43:28]  INFO Config file detected                          path=C:\Users\User/AppData/Roaming/Ledger Live/lss.json
[2021/03/08 - 18:43:28]  INFO Warming up...
[2021/03/08 - 18:43:28] FATAL Failed to initialize Bus                      error=failed to load wallet: -4: Wallet file verification failed. Refusing to load database. Data file '/home/bitcoin/.bitcoin/satstack/wallet.dat' is already loaded.

Since ... recently bitcoind has automatically loaded used wallets... I believe.

Currently

listwallets
[
  "wallet.dat",
  "spectercc965c6d9e62fa00/simple_",
  "satstack"
]

This isn't even an error, just confirmation that the desired state exists. Any chance this could be addressed please.

crackozark commented 3 years ago

A couple of questions after failed connetivities to local network's running full node ( from iMac running old 10.11 attempting to connect to another mac mini running OSX10.13 with broadband connectivity. similar error msg, wallet.dat already loaded... etc.. )

1. Ledger's satstack only bridge/scan for bitcoin wallets. One can't expect any operation for the litecoin network... is that correct?

2. After a failed attempt, need to 'add ccounts'from Manager to re-sync to show any ballance on the account... which leads me to assert that one advantage of a successful syncing of full node is óff-line ( or one's own network ) transactions? Can someone re-interate what are pros and cons for those experimental features there? thanks...

timdodge commented 3 years ago

I'm having the same issue - I need to run bitcoin-cli unloadwallet "satstack" before starting lss

samsong commented 3 years ago

Same issue.

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

jvandenbroek commented 3 years ago

I'm having the same issue - I need to run bitcoin-cli unloadwallet "satstack" before starting lss

Thanks, putting this RPC command as ExecStartPre in my lss systemd service file actually works around this issue. Of course this should not be necessary to do.

samsong commented 3 years ago

I'm having the same issue - I need to run bitcoin-cli unloadwallet "satstack" before starting lss

Thanks, putting this RPC command as ExecStartPre in my lss systemd service file actually works around this issue. Of course this should not be necessary to do.

agree this could be run inside lss if necessary to automate for users.

timdodge commented 3 years ago

I've just created a merge request to get satstack to ignore this kind of error and continue starting normally. I'm using this locally.

There's no need to manually unload the satstack wallet with this change.

autumnwakefield commented 3 years ago

How do we run bitcoin-cli unloadwallet "satstack"? I run a rode with a raspberry pi and don't have access to run the script on the node.

BushMasterSix-LA commented 2 years ago

Dear all,

I think I have the same issue:

Although, if I close "lss.exe" on Windows and let's say I want to restart it after 10 min it says the following:

 ←[90m[2021/08/26 - 19:17:49]←[0m ←[32m INFO←[0m Warming up…
←[90m[2021/08/26 - 19:17:49]←[0m ←[31mFATAL←[0m Failed to initialize Bus ←[31merror←[0m=failed to load wallet: -4: Wallet file verification failed. Refusing to load database. Data file ‚/mnt/hdd/bitcoin/satstack/wallet.dat‘ is already loaded.

If I use the shell command: bitcoin-cli unloadwallet „satstack“

It says:

admin@raspberrypi:~ $
admin@raspberrypi:~ $ bitcoin-cli unloadwallet „satstack“
error code: -18
error message:
Requested wallet does not exist or is not loaded

The only thing where I am absolutely sure, that it's working again is a Full Node reboot. I am not really a SSH expert.. therefore I can't why I am running into "wallet file verification failed" only if I have a 2nd time the "Lss.exe" running. I am still happy to get closer to the "bug" while knowing a reboot is a temporary fix altough it's not really the happy thing to do reboot my node because it should run and support the Lightning network and my cluster guys expect a trustful 24/4 node.

Thanks to everybody who wants to help me, please.

Thanks

IAMAngryDuck commented 2 years ago

This error occurs when SLL.exe was not terminated properly. To fix the problem it is best to restart the node.

The next time you want to close the sll.exe you should click on the terminal (black window) and press CTRL+C to end the process correctly. If you simply close the window with the windows "X", the problem will occur again the next time.

yasuoiwakura commented 10 months ago

Same issue. reproduce:

run bitcoind until current blockheight is reached connect using ./lss at 3% of indexing, run out of disk space, resize partition reboot, restart bitcoind ./lss will pretend "wallet satstack is already loaded"

current workaround: setup bitcoin-cli for rpc/local use and run bitcoin-cli unloadwallet „satstack“ restart ./lss