coffee-tools / folgore

Universal Bitcoin backend for core lightning with BIP 157 support full based on the btcli4j Kotlin plugin! Ah, yes it is written in Rust
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

fallback do not work well #51

Closed vincenzopalazzo closed 5 months ago

vincenzopalazzo commented 8 months ago

I get the following crash on my node

2023-11-08T02:33:05.945Z INFO    plugin-folgore_plugin: running into retry logic due a request failing. Time `4` waiting `60` secs
2023-11-08T02:33:05.946Z INFO    plugin-folgore_plugin: we try 4 times the request but the error persist
2023-11-08T02:33:05.946Z DEBUG   plugin-folgore_plugin: Error during the recovery strategy: `Some(PluginError { code: -1, msg: \"Ureq(Transport(Transport { kind: Io, message: None, url: Some(Url { scheme: \\\"https\\\", cannot_be_a_base: false, username: \\\"\\\", password: None, host: Some(Domain(\\\"mempool.space\\\")), port: None, path: \\\"/api/v1/blocks/tip/height\\\", query: None, fragment: None }), source: Some(Custom { kind: TimedOut, error: \\\"timed out reading response\\\" }) }))\", data: None })`
2023-11-08T02:33:05.946Z UNUSUAL plugin-folgore_plugin: client `esplora` return an error: code: -1, msg: code: -1, msg: Recovery strategy (TimeoutRety) fails: `code: -1, msg: Ureq(Transport(Transport { kind: Io, message: None, url: Some(Url { scheme: \"https\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"mempool.space\")), port: None, path: \"/api/v1/blocks/tip/height\", query: None, fragment: None }), source: Some(Custom { kind: TimedOut, error: \"timed out reading response\" }) }))`
2023-11-08T02:33:05.951Z **BROKEN** lightningd: /home/vincent/.coffee/bitcoin/plugins/folgore/target/release/folgore_plugin error: bad response to getrawblockbyheight (bad 'result' field: Parsing '{result:': object does not have member result), response was {"error":{"code":-1,"data":null,"message":"code: -1, msg: Recovery strategy (TimeoutRety) fails: `code: -1, msg: Ureq(Transport(Transport { kind: Io, message: None, url: Some(Url { scheme: \"https\", cannot_be_a_base: false, username: \"\", password: None, host: Some(Domain(\"mempool.space\")), port: None, path: \"/api/v1/blocks/tip/height\", query: None, fragment: None }), source: Some(Custom { kind: TimedOut, error: \"timed out reading response\" }) }))`"},"id":"cln:getrawblockbyheight#278766","jsonrpc":"2.0"}
vincenzopalazzo commented 6 months ago

Another crash

2024-01-02T19:34:00.832Z DEBUG   plugin-funder: Cleaning up inflights for peer id 0288178f83cfd8d1b463423c7d22e7399c7d98a78da47a0b882bc1f6c71fe009c0
2024-01-02T19:34:01.588Z INFO    plugin-folgore_plugin: running into retry logic due a request failing. Time `4` waiting `60` secs
2024-01-02T19:34:01.589Z INFO    plugin-folgore_plugin: we try 4 times the request but the error persist
2024-01-02T19:34:01.589Z DEBUG   plugin-folgore_plugin: Error during the recovery strategy: `Some(PluginError { code: -1, msg: \"[35] SSL connect error (Recv failure: Connection reset by peer)\", data: None })`
2024-01-02T19:34:01.590Z UNUSUAL plugin-folgore_plugin: client `esplora` return an error: code: -1, msg: Recovery strategy (TimeoutRety) fails: `code: -1, msg: [35] SSL connect error (Recv failure: Connection reset by peer)`
2024-01-02T19:34:01.590Z DEBUG   plugin-folgore_plugin: Err(PluginError { code: -1, msg: \"Recovery strategy (TimeoutRety) fails: `code: -1, msg: [35] SSL connect error (Recv failure: Connection reset by peer)`\", data: None })
2024-01-02T19:34:01.591Z **BROKEN** lightningd: /home/vincent/github/folgore/target/release/folgore_plugin error: bad response to estimatefees (bad 'result' field), response was {"error":{"code":-1,"data":null,"message":"Recovery strategy (TimeoutRety) fails: `code: -1, msg: [35] SSL connect error (Recv failure: Connection reset by peer)`"},"id":"cln:estimatefees#54753","jsonrpc":"2.0"}
2024-01-02T19:34:02.168Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v23.11.2)
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: common/daemon.c:38 (send_backtrace) 0x55a76e9d775b
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: common/daemon.c:75 (crashdump) 0x55a76e9d78e1
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: ./signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 ((null)) 0x7f631b09ed5f
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: ../sysdeps/unix/sysv/linux/raise.c:51 (__GI_raise) 0x7f631b09ece1
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: ./stdlib/abort.c:79 (__GI_abort) 0x7f631b088536
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/log.c:1025 (fatal_vfmt) 0x55a76e963789
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/log.c:1035 (fatal) 0x55a76e96383a
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:118 (bitcoin_plugin_error) 0x55a76e928789
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:300 (estimatefees_callback) 0x55a76e928edc
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:660 (plugin_response_handle) 0x55a76e9934a9
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:772 (plugin_read_json_one) 0x55a76e993718
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:823 (plugin_read_json) 0x55a76e99394e
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x55a76eaae1c3
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x55a76eaaed6d
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x55a76eaaedab
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:453 (io_loop) 0x55a76eab0fc1
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:22 (io_loop_with_timers) 0x55a76e958846
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1334 (main) 0x55a76e95fcd9
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: ../csu/libc-start.c:308 (__libc_start_main) 0x7f631b089d09
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x55a76e926419
2024-01-02T19:34:02.168Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

we should look now into it