Closed icy-ux closed 1 year ago
No error message of any sort?
You might have to use strace to see where it’s getting stuck on that file
I will look into the code after that last debug message to see if some additional info can be added to debug.
It looks to me like it is probably trying to sync the wallet after opening it.
If there were an earlier error it would have exited. I'd suggest making sure that your electrum_rpc_url
config is connectable and responding to queries, and then try start the asb and just give it a good amount of time to sync or see if some error occurs.
On Mon, Jun 27, 2022 at 10:33:37PM -0700, Byron Hambly wrote:
No error message of any sort?
None that I can see.
@icy-ux have you tried asb withdraw-btc
?
On Tue, Jun 28, 2022 at 02:37:42AM -0700, Byron Hambly wrote:
If there were an earlier error it would have exited. I'd suggest making sure that your
electrum_rpc_url
config is connectable and responding to queries, and then try start the asb and just give it a good amount of time to sync or see if some error occurs.
Turns out the electrum server had crashed.
Suggestion: the asb
instance shouldn't lock up if the electrum
server stops responding. The asb
binary should exit with an error
code, or keep retrying but log error messages.
Steps to troubleshoot:
It had been hanging at "Opening Bitcoin wallet" for almost 24 hours now,
with no change. There were also no new messages in the electrs
journalctl log.
Try checking the local electrum instance:
$ sudo cat config.toml | grep electrum_rpc_url
electrum_rpc_url = "localhost:50001"
$ sudo netstat -tulpn | grep 50001
tcp 0 0 127.0.0.1:50001 0.0.0.0:* LISTEN 34390/electrs
$ echo '{"id": 1, "method": "blockchain.address.get_balance", "params": ["1BWwXJH3q6PRsizBkSGm2Uw4Sz1urZ5sCj"]}' | nc -i 1 localhost 50001
[...and it hangs]
Okay, so the elctrum server has crashed. Restart electrs and it works:
$ echo '{"id": 1, "method": "blockchain.address.get_balance", "params": ["1BWwXJH3q6PRsizBkSGm2Uw4Sz1urZ5sCj"]}' | nc -i 1 localhost 50001
{"error":{"code":-32601,"message":"method not found"},"id":1,"jsonrpc":"2.0"}
Now after restarting asb
the electrs
server log is full of these
messages:
Jun 28 18:57:49 blu2128 electrs[2900780]: [2022-06-28T18:57:49.484Z INFO electrs::electrum] your wallet uses less efficient method of querying electrs, consider contacting the developer of your wallet. Reason: blockchain.scripthash.get_history called for unsubscribed scripthash: f00bar
And the asb
binary runs again!
Okay nice find! I’ll make a new issue about that message, glad you’ve got it sorted.
I see you actually mentioned this in #865 ! Thanks for reporting
Describe the bug My
asb
instance has been running for a while. Recently, without any apparent changes on my part, it has ceased being able to start. It simply hangs at "Opening Bitcoin wallet".This also happens when I try to run
asb
with commands that access the wallet, such as showing the wallet descriptor or current balances.The logs for
electrs
andbitcoind
don't show anything unusual. The wallet files appear to have correct permissions.Lost/trapped Funds Yes, it looks like the Bitcoin in my
asb
wallet are inaccessible.Debug logs
Platform (please complete the following information):
asb 0.10.2