satstack icon indicating copy to clipboard operation
satstack copied to clipboard

Error while trying to launch satstack

Open Gambiman opened this issue 3 years ago • 12 comments

Hello, I am getting this error while launching satstack on Windows

Satstack error

Then when I launch again I am getting this: error satstack 2

The only way I can avoid the second error is going into the node and deleting the satstack folder. But then it loops back to the first problem...

Gambiman avatar Oct 21 '22 18:10 Gambiman

hi @Gambiman do you have a bitcoind UI opened at the same time? cf https://github.com/LedgerHQ/satstack/issues/80#issue-1391419107

adrienlacombe avatar Oct 21 '22 18:10 adrienlacombe

Hello, no I do not.

Gambiman avatar Oct 21 '22 18:10 Gambiman

ok, thank you, can you try the first step but without Ledger Live opened?

adrienlacombe avatar Oct 21 '22 18:10 adrienlacombe

I'm having the same error even with LL closed

error satstack 3

Gambiman avatar Oct 21 '22 18:10 Gambiman

Ok, I'll try to reproduce, which Windows OS are you on?

adrienlacombe avatar Oct 21 '22 18:10 adrienlacombe

Windows 11 build 22621.674

Gambiman avatar Oct 21 '22 18:10 Gambiman

@Gambiman The answer to your first problem I don't know (trying to find out myself).

The answer to your second problem is that your wallet is still loaded in the original process. That's why when you try to run it again, it doesn't get the exclusive lock. If you unload the wallet ( using command : ./lss --unload-wallet ), you should be able to reinitiate step one.

PannsBox avatar Nov 27 '22 13:11 PannsBox

Same issue. Initial setup goes all the way to creating lss config. Once satstack is launched it calculates supply fine. Then once Ledger Live is launched it tries to sync or whatnot which crashes SatStack.

Readable logs (satstack v0.17.0):

[2022/12/01 - 17:45:34]  INFO Ledger SatStack (lss) v0.16.1                 arch=windows amd64 build= commit= runtime=go1.17.13
[2022/12/01 - 17:45:34]  INFO Config file detected                          path=C:\Users\<>/AppData/Roaming/Ledger Live/lss.json
[2022/12/01 - 17:45:34]  INFO Warming up...
[2022/12/01 - 17:45:48]  INFO Loaded existing wallet                        wallet=satstack
[2022/12/01 - 17:45:48]  INFO RPC connection established                    blockFilter=false chain=main pruned=false txindex=true
 _______________________________________
/ For greater privacy, it's best to use \
| bitcoin addresses only once.          |
|                                       |
\         -- Satoshi Nakamoto, 2009     /
 ---------------------------------------
        \   ^__^
         \  (₿₿)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[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)
[2022/12/01 - 17:45:49]  INFO worker: Initial Block Download complete               blockHash=00000000000000000005fd749aa35e0450258168c7145fbc99a0ab4e81387d37 blockHeight=765428
[2022/12/01 - 17:45:49]  INFO worker: Computing circulating supply...
[2022/12/01 - 17:48:08]  INFO worker: #RunTheNumbers successful                     actualSupply=19221217.16614785 BTC expectedSupply=19221425 BTC height=765428
[GIN] 2022/12/01 - 17:49:09 | 200 |    1.2769245s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"    <=== Ledger Live started roughly 30 seconds before this log entry
[GIN] 2022/12/01 - 17:49:10 | 200 |    1.2506177s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:11 | 200 |    1.2381188s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:12 | 200 |    1.2503529s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:13 | 200 |    1.2394741s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:14 | 200 |    1.2622877s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:15 | 200 |    1.2596554s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:16 | 200 |    1.2408062s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:17 | 200 |    1.2462211s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:18 | 200 |     1.238174s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:19 | 200 |    1.2580755s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:20 | 200 |    1.2509434s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:21 | 200 |     1.239761s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:22 | 200 |    1.2580483s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:23 | 200 |    1.2419569s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:24 | 200 |    1.2497351s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:25 | 200 |    1.2499843s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:26 | 200 |    1.2434549s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:27 | 200 |    1.2429958s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:28 | 200 |    1.2469639s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:29 | 200 |    1.2489343s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:30 | 200 |    1.2547438s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[2022/12/01 - 17:49:30] ERROR err -4: importdescriptors is not available for non-descriptor wallets
[2022/12/01 - 17:49:30] ERROR worker: Failed while importing descriptors            error=-4: importdescriptors is not available for non-descriptor wallets
[2022/12/01 - 17:49:30] FATAL worker: Failed to send INTERRUPT signal               error=not supported by windows pid=17380

[process exited with code 1 (0x00000001)]

As already mentioned the crash causes the wallet to get stuck in loaded state and requires a manual unload, but satstack always crashes here and I can't properly import accounts in Live.

d-rez avatar Dec 01 '22 06:12 d-rez

Same issue. Initial setup goes all the way to creating lss config. Once satstack is launched it calculates supply fine. Then once Ledger Live is launched it tries to sync or whatnot which crashes SatStack.

Readable logs (satstack v0.17.0):

[2022/12/01 - 17:45:34]  INFO Ledger SatStack (lss) v0.16.1                 arch=windows amd64 build= commit= runtime=go1.17.13
[2022/12/01 - 17:45:34]  INFO Config file detected                          path=C:\Users\<>/AppData/Roaming/Ledger Live/lss.json
[2022/12/01 - 17:45:34]  INFO Warming up...
[2022/12/01 - 17:45:48]  INFO Loaded existing wallet                        wallet=satstack
[2022/12/01 - 17:45:48]  INFO RPC connection established                    blockFilter=false chain=main pruned=false txindex=true
 _______________________________________
/ For greater privacy, it's best to use \
| bitcoin addresses only once.          |
|                                       |
\         -- Satoshi Nakamoto, 2009     /
 ---------------------------------------
        \   ^__^
         \  (₿₿)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[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)
[2022/12/01 - 17:45:49]  INFO worker: Initial Block Download complete               blockHash=00000000000000000005fd749aa35e0450258168c7145fbc99a0ab4e81387d37 blockHeight=765428
[2022/12/01 - 17:45:49]  INFO worker: Computing circulating supply...
[2022/12/01 - 17:48:08]  INFO worker: #RunTheNumbers successful                     actualSupply=19221217.16614785 BTC expectedSupply=19221425 BTC height=765428
[GIN] 2022/12/01 - 17:49:09 | 200 |    1.2769245s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"    <=== Ledger Live started roughly 30 seconds before this log entry
[GIN] 2022/12/01 - 17:49:10 | 200 |    1.2506177s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:11 | 200 |    1.2381188s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:12 | 200 |    1.2503529s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:13 | 200 |    1.2394741s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:14 | 200 |    1.2622877s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:15 | 200 |    1.2596554s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:16 | 200 |    1.2408062s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:17 | 200 |    1.2462211s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:18 | 200 |     1.238174s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:19 | 200 |    1.2580755s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:20 | 200 |    1.2509434s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:21 | 200 |     1.239761s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:22 | 200 |    1.2580483s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:23 | 200 |    1.2419569s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:24 | 200 |    1.2497351s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:25 | 200 |    1.2499843s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:26 | 200 |    1.2434549s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:27 | 200 |    1.2429958s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:28 | 200 |    1.2469639s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:29 | 200 |    1.2489343s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 17:49:30 | 200 |    1.2547438s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[2022/12/01 - 17:49:30] ERROR err -4: importdescriptors is not available for non-descriptor wallets
[2022/12/01 - 17:49:30] ERROR worker: Failed while importing descriptors            error=-4: importdescriptors is not available for non-descriptor wallets
[2022/12/01 - 17:49:30] FATAL worker: Failed to send INTERRUPT signal               error=not supported by windows pid=17380

[process exited with code 1 (0x00000001)]

As already mentioned the crash causes the wallet to get stuck in loaded state and requires a manual unload, but satstack always crashes here and I can't properly import accounts in Live.

can you try deleting the satstack wallet and retry? thanks

adrienlacombe avatar Dec 01 '22 06:12 adrienlacombe

can you try deleting the satstack wallet and retry? thanks

Yep! Done. (renamed satstack wallet directory to something else to have a backup just in case)

Seems it allowed it to progress and is now importing those descriptors. The satstack wallet has been created with an older version so hopefully that was it!

Thanks. I'll update if/when it finishes, looks like it might take a while.

[2022/12/01 - 18:10:42]  INFO worker: Importing descriptors                         duration=6s progress=0.09%
[GIN] 2022/12/01 - 18:10:42 | 200 |    1.2436982s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:46 | 200 |     4.277449s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:46 | 200 |    1.9042119s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:46 | 200 |    2.9039493s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:46 | 200 |    3.9067899s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:47 | 200 |    1.2477649s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:48 | 200 |    1.2419472s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:49 | 200 |    1.2528862s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[2022/12/01 - 18:10:49]  INFO worker: Importing descriptors                         duration=14s progress=0.15%

d-rez avatar Dec 01 '22 07:12 d-rez

can you try deleting the satstack wallet and retry? thanks

Yep! Done. (renamed satstack wallet directory to something else to have a backup just in case)

Seems it allowed it to progress and is now importing those descriptors. The satstack wallet has been created with an older version so hopefully that was it!

Thanks. I'll update if/when it finishes, looks like it might take a while.

[2022/12/01 - 18:10:42]  INFO worker: Importing descriptors                         duration=6s progress=0.09%
[GIN] 2022/12/01 - 18:10:42 | 200 |    1.2436982s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:46 | 200 |     4.277449s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:46 | 200 |    1.9042119s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:46 | 200 |    2.9039493s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:46 | 200 |    3.9067899s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:47 | 200 |    1.2477649s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:48 | 200 |    1.2419472s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[GIN] 2022/12/01 - 18:10:49 | 200 |    1.2528862s |       127.0.0.1 | GET      "/blockchain/v3/explorer/status"
[2022/12/01 - 18:10:49]  INFO worker: Importing descriptors                         duration=14s progress=0.15%

yes, this is due to core Bitcoin upgrade

adrienlacombe avatar Dec 01 '22 07:12 adrienlacombe

Update: After running for almost 3h, it crashed with the following:

[2022/12/01 - 20:58:16]  INFO worker: Importing descriptors                         duration=2h47m41s progress=42.74%
[2022/12/01 - 20:58:23] ERROR err -4: Wallet is currently rescanning. Abort existing rescan or wait.
[2022/12/01 - 20:58:23] ERROR worker: Failed while importing descriptors            error=-4: Wallet is currently rescanning. Abort existing rescan or wait.
[2022/12/01 - 20:58:23] FATAL worker: Failed to send INTERRUPT signal               error=not supported by windows pid=21496
[process exited with code 1 (0x00000001)]

Now restarting satstack just makes it crash almost immediately with no error message:

[2022/12/01 - 21:35:39]  INFO Ledger SatStack (lss) v0.16.1                 arch=windows amd64 build= commit= runtime=go1.17.13
[2022/12/01 - 21:35:39]  INFO Config file detected                          path=C:\Users\<>/AppData/Roaming/Ledger Live/lss.json
[2022/12/01 - 21:35:39]  INFO Warming up...

[process exited with code 1 (0x00000001)]

Trying to unload the wallet using lss either also crashes or gets stuck on "Warming up" forever :(

EDIT: checked bitcoind logs, once it finally finished rescanning a few hours later I unloaded wallet and restarted satstack a few times (because it would keep crashing on start without error). Then once it finally started, this:

[2022/12/02 - 00:57:12] ERROR ImportDescriptors - Failed to import descriptor || new range must include current range = [0,1013]-8: new range must include current range = [0,1013] descriptor=<redacted>
[2022/12/02 - 00:57:12] ERROR worker: Failed while importing descriptors            error=ImportDescriptors - importdescriptor RPC failed
[2022/12/02 - 00:57:12] FATAL worker: Failed to send INTERRUPT signal               error=not supported by windows pid=8404
[process exited with code 1 (0x00000001)]

I'm getting tired of this.

d-rez avatar Dec 01 '22 10:12 d-rez