Giter VIP home page Giter VIP logo

clightning4j / btcli4j Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 8.0 3.47 MB

It is a core lightning plugin to override Bitcoin backend plugin with esplora by Blockstream and give the possibility to make the running process with bitcoind in pruning mode more solid.

License: GNU General Public License v2.0

Kotlin 98.71% Shell 1.29%
clightning plugin bitcoind backend esplora bitcoin lightning lightning-network hacktoberfest

btcli4j's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

btcli4j's Issues

Configure the command line options

In the command line, I would like to have some command to set the following proprieties:

  • retry time
  • how many times I need to retry the connection is it fails skipped
  • custom URL #14

Crashing in pruned mode when rpc configured

When I'm setting up the parameters bitcoin-rpcuser, bitcoin-rpcpassword & bitcoin-rpcurl in .lightning/config file, lightningd is crashing with this error:

2021-07-26T11:20:47.456Z DEBUG plugin-btcli4j-gen.sh: GetChainInfoCommand: GetChainInfoCommand: Block count = 692740
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:36)
at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:290)
at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:128)
at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)
Caused by: java.lang.IllegalArgumentException: Arguments are/is null
at io.github.clightning4j.litebtc.utils.gson.JsonConverter.deserialization(JsonConverter.java:74)
at io.github.clightning4j.litebtc.utils.okhttp.HttpFactory.makeRequest(HttpFactory.java:79)
at io.github.clightning4j.litebtc.LiteBitcoinRPC.makeBitcoinRequest(LiteBitcoinRPC.java:63)
at io.vincenzopalazzo.btcli4j.control.commands.btcprune.EstimateFeeBtc.run(EstimateFeeBtc.kt:53)
at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:77)
at io.vincenzopalazzo.btcli4j.Plugin.estimateFees(Plugin.kt:101)
... 9 more
2021-07-26T11:21:14.969Z BROKEN plugin-btcli4j-gen.sh: Message empty

Without setting this parameters, it's working fine.

Thanks.

Estimate Fee errror

2020-09-04T22:23:08.271Z DEBUG plugin-btcli4j.sh: Estimate fee {\"25\":122.009,\"144\":2.457,\"504\":1.078,\"1008\":1.078,\"5\":128.923,\"4\":128.923,\"7\":128.923,\"13\":122.21199999999999,\"19\":122.009,\"24\":122.009,\"15\":122.009,\"10\":128.923,\"1\":134.757,\"12\":122.21199999999999,\"14\":122.21199999999999,\"3\":134.757,\"8\":128.923,\"16\":122.009,\"6\":128.923,\"9\":128.923,\"18\":122.009,\"11\":122.21199999999999,\"2\":134.757,\"17\":122.009,\"20\":122.009,\"21\":122.009,\"22\":122.009,\"23\":122.009}
2020-09-04T22:23:08.271Z UNUSUAL plugin-btcli4j.sh: ESTIMATION FEE 2: 0.0134757
2020-09-04T22:23:08.272Z UNUSUAL plugin-btcli4j.sh: ESTIMATION FEE 2: 2.457E-4
2020-09-04T22:23:08.273Z UNUSUAL plugin-btcli4j.sh: {
2020-09-04T22:23:08.274Z UNUSUAL plugin-btcli4j.sh:   \"opening\": 2.457E-4,
2020-09-04T22:23:08.275Z UNUSUAL plugin-btcli4j.sh:   \"mutual_close\": 2.457E-4,
2020-09-04T22:23:08.276Z UNUSUAL plugin-btcli4j.sh:   \"unilateral_close\": 2.457E-4,
2020-09-04T22:23:08.276Z UNUSUAL plugin-btcli4j.sh:   \"delayed_to_us\": 2.457E-4,
2020-09-04T22:23:08.277Z UNUSUAL plugin-btcli4j.sh:   \"htlc_resolution\": 2.457E-4,
2020-09-04T22:23:08.278Z UNUSUAL plugin-btcli4j.sh:   \"penalty\": 2.457E-4,
2020-09-04T22:23:08.279Z UNUSUAL plugin-btcli4j.sh:   \"min_acceptable\": 1.2285E-4,
2020-09-04T22:23:08.279Z UNUSUAL plugin-btcli4j.sh:   \"max_acceptable\": 0.002457
2020-09-04T22:23:08.280Z UNUSUAL plugin-btcli4j.sh: }
2020-09-04T22:23:08.281Z UNUSUAL lightningd: Unable to estimate opening fees
2020-09-04T22:23:08.281Z UNUSUAL lightningd: Unable to estimate mutual_close fees
2020-09-04T22:23:08.281Z UNUSUAL lightningd: Unable to estimate unilateral_close fees
2020-09-04T22:23:08.281Z UNUSUAL lightningd: Unable to estimate delayed_to_us fees
2020-09-04T22:23:08.281Z UNUSUAL lightningd: Unable to estimate htlc_resolution fees
2020-09-04T22:23:08.281Z UNUSUAL lightningd: Unable to estimate penalty fees
2020-09-04T22:23:08.281Z UNUSUAL lightningd: Unable to estimate min_acceptable fees
2020-09-04T22:23:08.281Z UNUSUAL lightningd: Unable to estimate max_acceptable fees

Exception during estimation fee

This is the stack trace

2020-09-04T22:23:08.602Z **BROKEN** plugin-btcli4j.sh: Message empty
/home/vincent/Github/btcli4j/btcli4j.sh error: bad response to getrawblockbyheight (bad 'blockhash' field), response was {"id":40,"jsonrpc":"2.0","result":{}}
2020-09-04T22:23:08.605Z **BROKEN** lightningd: /home/vincent/Github/btcli4j/btcli4j.sh error: bad response to getrawblockbyheight (bad 'blockhash' field), response was {"id":40,"jsonrpc":"2.0","result":{}}
lightningd: FATAL SIGNAL 6 (version v0.9.0-224-g74e960c-modded)
0x5583fb2b5989 send_backtrace
	common/daemon.c:38
0x5583fb2b5a2f crashdump
	common/daemon.c:51
0x7f3630bbefcf ???
	???:0
0x7f3630bbef47 ???
	???:0
0x7f3630bc08b0 ???
	???:0
0x5583fb26c244 fatal
	lightningd/log.c:820
0x5583fb24eea6 bitcoin_plugin_error
	lightningd/bitcoind.c:119
0x5583fb24f561 getrawblockbyheight_callback
	lightningd/bitcoind.c:355
0x5583fb28be4c plugin_response_handle
	lightningd/plugin.c:366
0x5583fb28c033 plugin_read_json_one
	lightningd/plugin.c:472
0x5583fb28c1b2 plugin_read_json
	lightningd/plugin.c:506
0x5583fb2ff096 next_plan
	ccan/ccan/io/io.c:59
0x5583fb2ffc13 do_plan
	ccan/ccan/io/io.c:407
0x5583fb2ffc51 io_ready
	ccan/ccan/io/io.c:417
0x5583fb301e17 io_loop
	ccan/ccan/io/poll.c:445
0x5583fb2640f6 io_loop_with_timers
	lightningd/io_loop_with_timers.c:24
0x5583fb2697b1 main
	lightningd/lightningd.c:1018
0x7f3630ba1b96 ???
	???:0
0x5583fb24e8d9 ???
	???:0
0xffffffffffffffff ???
	???:0
2020-09-04T22:23:08.928Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v0.9.0-224-g74e960c-modded)
2020-09-04T22:23:08.928Z **BROKEN** lightningd: backtrace: common/daemon.c:43 (send_backtrace) 0x5583fb2b59df
2020-09-04T22:23:08.928Z **BROKEN** lightningd: backtrace: common/daemon.c:51 (crashdump) 0x5583fb2b5a2f
2020-09-04T22:23:08.928Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f3630bbefcf

With java exception

java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:31)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:284)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:127)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
Caused by: jrpc.clightning.plugins.exceptions.CLightningPluginException: Request error: Not Found
	at io.vincenzopalazzo.btcli4j.util.HttpRequestFactory.execRequest(HttpRequestFactory.kt:114)
	at io.vincenzopalazzo.btcli4j.control.commands.GetRawBlockByHeightCommand.run(GetRawBlockByHeightCommand.kt:45)
	at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:44)
	at io.vincenzopalazzo.btcli4j.Plugin.getRawBlockByHeight(Plugin.kt:73)
	... 7 more
2020-09-04T22:23:08.602Z **BROKEN** plugin-btcli4j.sh: Message empty
/home/vincent/Github/btcli4j/btcli4j.sh error: bad response to getrawblockbyheight (bad 'blockhash' field), response was {"id":40,"jsonrpc":"2.0","result":{}}
2020-09-04T22:23:08.605Z **BROKEN** lightningd: /home/vincent/Github/btcli4j/btcli4j.sh error: bad response to getrawblockbyheight (bad 'blockhash' field), response was {"id":40,"jsonrpc":"2.0","result":{}}

`estimatefees` has changed in CLN version v23.05.

estimatefees has changed in CLN version v23.05.

See deprecated section in https://github.com/ElementsProject/lightning/blob/master/CHANGELOG.md#23051---2023-06-05-austin-texas-agreementatxa-ii.

The new spec is (https://github.com/ElementsProject/lightning/blob/master/doc/PLUGINS.md#estimatefees):

estimatefees

Polled by lightningd to get the current feerate, all values must be passed in sat/kVB.

The plugin must return feerate_floor (e.g. 1000 if mempool is
empty), and an array of 0 or more feerates. Each element of
feerates is an object with blocks and feerate, in
ascending-blocks order, for example:

{
	"feerate_floor": <sat per kVB>,
	"feerates": {
		{ "blocks": 2, "feerate": <sat per kVB> },
		{ "blocks": 6, "feerate": <sat per kVB> },
		{ "blocks": 12, "feerate": <sat per kVB> }
		{ "blocks": 100, "feerate": <sat per kVB> }
	}
}

lightningd will currently linearly interpolate to estimate between given blocks (it will not extrapolate, but use the min/max blocks values).

unexpected end of stream

2020-09-09T16:39:27.451Z UNUSUAL plugin-btcli4j-gen.sh: unexpected end of stream
java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:31)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:284)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:129)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
Caused by: jrpc.clightning.plugins.exceptions.CLightningPluginException: unexpected end of stream
	at io.vincenzopalazzo.btcli4j.control.commands.GetRawBlockByHeightCommand.run(GetRawBlockByHeightCommand.kt:64)
	at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:44)
	at io.vincenzopalazzo.btcli4j.Plugin.getRawBlockByHeight(Plugin.kt:65)

mempool min fee not met, 363 < 2557

This is a very obscure error that I never noted with the bitcoin backend but I am getting this error on my routing node with the pruning mode enabled,

This is the stack trace

2022-11-15T18:12:32.914Z **BROKEN** plugin-btcli4j-gen.sh: GetChainInfoBtc: terminate bitcoin core with error: mempool min fee not met, 363 < 2557

Pruning mode crash during block indexing

During the block indexing, the plugin will crash because it shares the info with esplora in get info chain, but in the next command that the plugin receives it will crash because we have no method to check that the bitcoin core is not ready.

So a possible solution is to check the type of exception and if the exception is like fo following one, check the bitcoin status in downloading mode or adding a new proprieties in the plugin manager.

Return command example

error code: -28
error message:
Loading block index...

Simple install only leads to errors

Hello,

I followed these steps to install the plugin:

  • sudo apt install default-jdk
  • javac --version
  • install this to whatever directory I like…. git clone https://github.com/clightning4j/btcli4j.git
  • cd btcli4j
  • ./gradlew createRunnableScript
  • now in this directory you have a file called btcli4j-gen.sh
  • Put the absolute path in the lightning config file (plugin=/home/nextlayer/btcli4j/btcli4j-gen.sh
  • Now you can run lightning with the new cmd: lightningd --disable-plugin bcli

But when I do I get this.....................

lightningd --disable-plugin bcli
Exception in thread "main" java.lang.IllegalArgumentException: Can not set int field io.vincenzopalazzo.btcli4j.Plugin.waitingTime to java.lang.String
        at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
        at java.base/jdk.internal.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
        at java.base/jdk.internal.reflect.UnsafeIntegerFieldAccessorImpl.set(UnsafeIntegerFieldAccessorImpl.java:98)
        at java.base/java.lang.reflect.Field.set(Field.java:780)
        at jrpc.clightning.plugins.interceptor.MappingCmdOptions.doAction(MappingCmdOptions.java:35)
        at jrpc.clightning.plugins.CLightningPlugin.lambda$doMethods$1(CLightningPlugin.java:383)
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
        at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:381)
        at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:168)
        at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
        at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)
The Bitcoin backend died.

bad response to getutxout

In pruning mode on mainet I receive the following crash

2021-05-03T10:47:21.859Z DEBUG   plugin-btcli4j-gen.sh: Request to http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api/tx/75367e3df94d2a55b731e4f8f548952105254964a0f047803dc6e57e9aec5318 with the following result [size=8737 text={\"txid\":\"75367e3df94d2a55b731e4f8f548952105254964a0f047803dc6e57?]
2021-05-03T10:47:21.860Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcurl=http://127.0.0.1:8332
2021-05-03T10:47:21.861Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-proxy=127.0.0.1:9050
2021-05-03T10:47:21.862Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-pruned=true
2021-05-03T10:47:21.863Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcpassword=vincent
2021-05-03T10:47:21.864Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcuser=vincent
2021-05-03T10:47:21.865Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-endpoint=
2021-05-03T10:47:21.867Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutBtc: Share message to esplora
2021-05-03T10:47:21.867Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutCommand: TxId: b1bcb902ad843583273814bc016bdd38a420141dbaf83bb0d1311ac36f8c99ff
2021-05-03T10:47:21.868Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutCommand: Vout: 1
2021-05-03T10:47:22.062Z DEBUG   plugin-btcli4j-gen.sh: GetChainInfoBtc: Status bitcoin core in the check thread: false
2021-05-03T10:47:22.254Z DEBUG   plugin-btcli4j-gen.sh: Request to http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api/tx/b1bcb902ad843583273814bc016bdd38a420141dbaf83bb0d1311ac36f8c99ff/outspend/1 with the following result [text={\"spent\":false}]
2021-05-03T10:47:22.255Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutCommand: UTXO Status: {
2021-05-03T10:47:22.256Z DEBUG   plugin-btcli4j-gen.sh:   \"spend\": false
2021-05-03T10:47:22.257Z DEBUG   plugin-btcli4j-gen.sh: }
2021-05-03T10:47:22.588Z DEBUG   plugin-btcli4j-gen.sh: Request to http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api/tx/b1bcb902ad843583273814bc016bdd38a420141dbaf83bb0d1311ac36f8c99ff with the following result [size=1546 text={\"txid\":\"b1bcb902ad843583273814bc016bdd38a420141dbaf83bb0d1311ac?]
2021-05-03T10:47:22.589Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcurl=http://127.0.0.1:8332
2021-05-03T10:47:22.590Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-proxy=127.0.0.1:9050
2021-05-03T10:47:22.590Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-pruned=true
2021-05-03T10:47:22.591Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcpassword=vincent
2021-05-03T10:47:22.592Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcuser=vincent
2021-05-03T10:47:22.593Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-endpoint=
2021-05-03T10:47:22.764Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutBtc: TxId -> 34014441c3fc230657b7d5c5fbd2df4568a1207ee254e40e88f31ae0a686cdf3
2021-05-03T10:47:22.772Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutBtc: Vout -> 2
2021-05-03T10:47:38.217Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
2021-05-03T10:47:38.429Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcurl=http://127.0.0.1:8332
2021-05-03T10:47:38.431Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-proxy=127.0.0.1:9050
2021-05-03T10:47:38.432Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-pruned=true
2021-05-03T10:47:38.433Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcpassword=vincent
2021-05-03T10:47:38.434Z DEBUG   plugin-btcli4j-gen.sh: Option bitcoin-rpcuser=vincent
2021-05-03T10:47:38.434Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-endpoint=
2021-05-03T10:47:38.561Z **BROKEN** lightningd: /home/vincent/github/btcli4j/btcli4j-gen.sh error: bad response to getutxout (bad 'result' field: Parsing '{result:{script:': object does not have member script), response was {"id":64965,"jsonrpc":"2.0","result":{}}
2021-05-03T10:47:39.246Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v0.10.0-52-g9470ea3)
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: common/daemon.c:44 (send_backtrace) 0x5561782b626b
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: common/daemon.c:52 (crashdump) 0x5561782b62ad
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f0c0b2b983f
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f0c0b2b97bb
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f0c0b2a4534
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: lightningd/log.c:803 (fatal) 0x556178280246
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:120 (bitcoin_plugin_error) 0x55617826553f
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:534 (getutxout_callback) 0x556178265a78
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:460 (plugin_response_handle) 0x556178298307
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:566 (plugin_read_json_one) 0x556178298429
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:611 (plugin_read_json) 0x5561782985a9
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x5561782f61d6
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x5561782f66a9
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x5561782f66db
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:445 (io_loop) 0x5561782f7f93
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:24 (io_loop_with_timers) 0x55617827a748
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1111 (main) 0x55617827e2a1
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f0c0b2a609a
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x556178265299
2021-05-03T10:47:39.246Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

Exception during running

The exception looks like the following

2020-09-28T23:09:04.195Z DEBUG   plugin-btcli4j-gen.sh: Estimate fee {\"6\":56.03300000000001,\"3\":58.794000000000004,\"24\":53.720000000000006,\"20\":53.720000000000006,\"25\":53.720000000000006,\"4\":56.131,\"14\":53.720000000000006,\"1\":58.843999999999994,\"7\":56.03300000000001,\"8\":56.03300000000001,\"9\":53.720000000000006,\"21\":53.720000000000006,\"144\":2.434,\"1008\":1.0,\"22\":53.720000000000006,\"12\":53.720000000000006,\"17\":53.720000000000006,\"11\":53.720000000000006,\"2\":58.843999999999994,\"13\":53.720000000000006,\"16\":53.720000000000006,\"15\":53.720000000000006,\"5\":56.03300000000001,\"18\":53.720000000000006,\"23\":53.720000000000006,\"504\":1.0,\"19\":53.720000000000006,\"10\":53.720000000000006}
2020-09-28T23:09:04.196Z DEBUG   lightningd: ... polled feerate estimate for mutual_close (61) smoothed to 653 (alpha=0.44)
2020-09-28T23:09:04.196Z DEBUG   lightningd: Feerate estimate for mutual_close set to 653 (was 1114)
2020-09-28T23:09:04.196Z DEBUG   lightningd: Feerate estimate for unilateral_close set to 1470 (was 1547)
2020-09-28T23:09:04.196Z DEBUG   lightningd: ... polled feerate estimate for delayed_to_us (61) smoothed to 653 (alpha=0.44)
2020-09-28T23:09:04.196Z DEBUG   lightningd: Feerate estimate for delayed_to_us set to 653 (was 1114)
2020-09-28T23:09:04.196Z DEBUG   lightningd: Feerate estimate for penalty set to 1227 (was 1376)
2020-09-28T23:09:04.196Z DEBUG   lightningd: ... polled feerate estimate for min_acceptable (31) smoothed to 327 (alpha=0.44)
2020-09-28T23:09:04.196Z DEBUG   lightningd: Feerate estimate for min_acceptable set to 327 (was 558)
2020-09-28T23:09:04.196Z DEBUG   lightningd: Feerate estimate for max_acceptable set to 14710 (was 15470)
2020-09-28T23:09:30.062Z DEBUG   plugin-btcli4j-gen.sh: Request{method=GET, url=http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api/block-height/650432} Hash 0000000000000000000688f6a769fc8c39624d8771e5c0ee8e81ce8c14776f0a
2020-09-28T23:09:30.376Z DEBUG   plugin-btcli4j-gen.sh: During http request to URL http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api/block/0000000000000000000688f6a769fc8c39624d8771e5c0ee8e81ce8c14776f0a/raw
2020-09-28T23:09:30.377Z DEBUG   plugin-btcli4j-gen.sh: With error message: Block not found
2020-09-28T23:09:30.378Z DEBUG   plugin-btcli4j-gen.sh: retry time 0
2020-09-28T23:09:30.379Z **BROKEN** lightningd: /root/github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad block), response was {"id":3734,"jsonrpc":"2.0","result":{"blockhash":"0000000000000000000688f6a769fc8c39624d8771e5c0ee8e81ce8c14776f0a","block":"426c6f636b206e6f7420666f756e64"}}
2020-09-28T23:09:30.449Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v0.9.1-86-gcafaad7)
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: common/daemon.c:43 (send_backtrace) 0x55bb2f31b1c7
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: common/daemon.c:51 (crashdump) 0x55bb2f31b219
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f0568e5720f
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f0568e5718b
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f0568e36858
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: lightningd/log.c:820 (fatal) 0x55bb2f2eb5b8
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:120 (bitcoin_plugin_error) 0x55bb2f2d815c
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:468 (getrawblockbyheight_callback) 0x55bb2f2d87d3
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:367 (plugin_response_handle) 0x55bb2f301a5d
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:473 (plugin_read_json_one) 0x55bb2f301b70
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:518 (plugin_read_json) 0x55bb2f301ce5
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x55bb2f351408
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x55bb2f3518b3
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x55bb2f351950
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:445 (io_loop) 0x55bb2f353294
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:24 (io_loop_with_timers) 0x55bb2f2e5df0
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1015 (main) 0x55bb2f2e94f1
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f0568e380b2
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x55bb2f2d7ead
2020-09-28T23:09:30.449Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

Exception Pruning mode cause rpc error

The method estimate fee cause the following exception

2021-04-21T23:16:35.054Z **BROKEN** lightningd: /home/vincent/Github/btcli4j/btcli4j-gen.sh error: bad response to estimatefees (missing 'opening' field), response was {"id":209,"jsonrpc":"2.0","result":{}}
2021-04-21T23:16:35.071Z **BROKEN** lightningd: FATAL SIGNAL 6 (version 0.10.0)
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: common/daemon.c:44 (send_backtrace) 0x5644ab5c6ea1
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: common/daemon.c:52 (crashdump) 0x5644ab5c6ef3
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f268acd720f
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f268acd718b
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f268acb6858
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: lightningd/log.c:803 (fatal) 0x5644ab590362
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:120 (bitcoin_plugin_error) 0x5644ab575221
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:187 (estimatefees_callback) 0x5644ab5752d7
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:460 (plugin_response_handle) 0x5644ab5a87e1
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:566 (plugin_read_json_one) 0x5644ab5a8903
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:611 (plugin_read_json) 0x5644ab5a8a87
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x5644ab602785
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x5644ab602c30
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x5644ab602ccd
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:445 (io_loop) 0x5644ab604611
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:24 (io_loop_with_timers) 0x5644ab58a7aa
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1102 (main) 0x5644ab58e398
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f268acb80b2
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x5644ab574f6d
2021-04-21T23:16:35.072Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

And the Java exception is **BROKEN** plugin-btcli4j-gen.sh: java.io.EOFException: \\n not found: limit=0 content=? usually this is caused by bitcoin backend.

b2ae80b762 confirmed, but peer disconnected
2021-04-21T23:16:35.044Z DEBUG   plugin-btcli4j-gen.sh: {\"jsonrpc\":\"2.0\",\"id\":209,\"method\":\"estimatefees\",\"params\":{}}
2021-04-21T23:16:35.045Z DEBUG   plugin-btcli4j-gen.sh: {
2021-04-21T23:16:35.046Z DEBUG   plugin-btcli4j-gen.sh:   \"jsonrpc\": \"2.0\",
2021-04-21T23:16:35.047Z DEBUG   plugin-btcli4j-gen.sh:   \"id\": 209,
2021-04-21T23:16:35.047Z DEBUG   plugin-btcli4j-gen.sh:   \"method\": \"estimatefees\",
2021-04-21T23:16:35.048Z DEBUG   plugin-btcli4j-gen.sh:   \"params\": {}
2021-04-21T23:16:35.048Z DEBUG   plugin-btcli4j-gen.sh: }
2021-04-21T23:16:35.051Z **BROKEN** plugin-btcli4j-gen.sh: java.io.EOFException: \\n not found: limit=0 content=?
2021-04-21T23:16:35.052Z **BROKEN** plugin-btcli4j-gen.sh: Message empty

Crash with stream was reset: INTERNAL_ERROR

2020-09-06T23:46:27.704Z UNUSUAL plugin-btcli4j-gen.sh: stream was reset: INTERNAL_ERROR
2020-09-06T23:46:27.708Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
2020-09-06T23:46:27.709Z **BROKEN** lightningd: /root/github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad 'blockhash' field), response was {"id":2409,"jsonrpc":"2.0","result":{}}
2020-09-06T23:46:27.754Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v0.9.0-240-gd7ff74e)
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: common/daemon.c:43 (send_backtrace) 0x55dd6fa4147d
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: common/daemon.c:51 (crashdump) 0x55dd6fa414cf
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fb7415d020f
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fb7415d018b
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fb7415af858
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: lightningd/log.c:820 (fatal) 0x55dd6fa10a9f
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:119 (bitcoin_plugin_error) 0x55dd6f9fd11c
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:355 (getrawblockbyheight_callback) 0x55dd6f9fd5d2
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:366 (plugin_response_handle) 0x55dd6fa26a46
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:472 (plugin_read_json_one) 0x55dd6fa26b59
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:517 (plugin_read_json) 0x55dd6fa26cce
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x55dd6fa769d2
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x55dd6fa76e7d
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x55dd6fa76f1a
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:445 (io_loop) 0x55dd6fa7885e
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:24 (io_loop_with_timers) 0x55dd6fa0b1d1
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1018 (main) 0x55dd6fa0e9cc
2020-09-06T23:46:27.754Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fb7415b10b2
2020-09-06T23:46:27.755Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x55dd6f9fce6d
2020-09-06T23:46:27.755Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

Error Server 502 return a html page!

2021-03-18T22:39:10.911Z DEBUG   plugin-btcli4j-gen.sh: During http request to URL http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/testnet/api/block-height/1940144
2021-03-18T22:39:10.912Z DEBUG   plugin-btcli4j-gen.sh: With error message: 
2021-03-18T22:39:10.913Z DEBUG   plugin-btcli4j-gen.sh: <html><head>
2021-03-18T22:39:10.913Z DEBUG   plugin-btcli4j-gen.sh: <meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">
2021-03-18T22:39:10.915Z DEBUG   plugin-btcli4j-gen.sh: <title>502 Server Error</title>
2021-03-18T22:39:10.916Z DEBUG   plugin-btcli4j-gen.sh: </head>
2021-03-18T22:39:10.917Z DEBUG   plugin-btcli4j-gen.sh: <body text=#000000 bgcolor=#ffffff>
2021-03-18T22:39:10.918Z DEBUG   plugin-btcli4j-gen.sh: <h1>Error: Server Error</h1>
2021-03-18T22:39:10.919Z DEBUG   plugin-btcli4j-gen.sh: <h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
2021-03-18T22:39:10.919Z DEBUG   plugin-btcli4j-gen.sh: <h2></h2>
2021-03-18T22:39:10.920Z DEBUG   plugin-btcli4j-gen.sh: </body></html>
2021-03-18T22:39:10.921Z DEBUG   plugin-btcli4j-gen.sh: retry time 0
2021-03-18T22:39:10.921Z UNUSUAL plugin-btcli4j-gen.sh: Response from server: 
2021-03-18T22:39:10.922Z UNUSUAL plugin-btcli4j-gen.sh: <html><head>
2021-03-18T22:39:10.923Z UNUSUAL plugin-btcli4j-gen.sh: <meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">
2021-03-18T22:39:10.924Z UNUSUAL plugin-btcli4j-gen.sh: <title>502 Server Error</title>
2021-03-18T22:39:10.925Z UNUSUAL plugin-btcli4j-gen.sh: </head>
2021-03-18T22:39:10.926Z UNUSUAL plugin-btcli4j-gen.sh: <body text=#000000 bgcolor=#ffffff>
2021-03-18T22:39:10.926Z UNUSUAL plugin-btcli4j-gen.sh: <h1>Error: Server Error</h1>
2021-03-18T22:39:10.927Z UNUSUAL plugin-btcli4j-gen.sh: <h2>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.</h2>
2021-03-18T22:39:10.928Z UNUSUAL plugin-btcli4j-gen.sh: <h2></h2>
2021-03-18T22:39:10.928Z UNUSUAL plugin-btcli4j-gen.sh: </body></html>
2021-03-18T22:39:10.929Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method For input string: \"Check fails\"
2021-03-18T22:39:10.929Z DEBUG   plugin-btcli4j-gen.sh: Error occurs 0 time: and the waiting time is set to 0
2021-03-18T22:39:11.200Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:31)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:283)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:128)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)
Caused by: java.lang.IllegalStateException: closed
	at okio.RealBufferedSource.request(RealBufferedSource.kt:203)
	at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
	at okio.GzipSource.consumeHeader(GzipSource.kt:104)
	at okio.GzipSource.read(GzipSource.kt:62)
	at okio.Buffer.writeAll(Buffer.kt:1642)
	at okio.RealBufferedSource.readByteString(RealBufferedSource.kt:212)
	at okhttp3.ResponseBody.byteString(ResponseBody.kt:134)
	at io.vincenzopalazzo.btcli4j.util.HttpRequestFactory.execRequest(HttpRequestFactory.kt:138)
	at io.vincenzopalazzo.btcli4j.control.commands.GetRawBlockByHeightCommand.run(GetRawBlockByHeightCommand.kt:42)
	at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:49)
	at io.vincenzopalazzo.btcli4j.Plugin.getRawBlockByHeight(Plugin.kt:73)
	... 8 more
/home/vincent/Github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad 'result' field: Parsing '{result:{blockhash:': object does not have member blockhash), response was {"id":933,"jsonrpc":"2.0","result":{}}
2021-03-18T22:39:11.202Z **BROKEN** lightningd: /home/vincent/Github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad 'result' field: Parsing '{result:{blockhash:': object does not have member blockhash), response was {"id":933,"jsonrpc":"2.0","result":{}}
lightningd: FATAL SIGNAL 6 (version 0.9.3)

pruning mode get raw block

With the actual implementation on PR #33 there is a good method to stop and return a null response to c-lightning.

We need to improve the error handling at list for this command.


2021-04-22T12:22:26.084Z DEBUG   plugin-btcli4j-gen.sh: {\"jsonrpc\":\"2.0\",\"id\":211,\"method\":\"getrawblockbyheight\",\"params\":{\"height\":1972336}}
2021-04-22T12:22:26.084Z DEBUG   plugin-btcli4j-gen.sh: {
2021-04-22T12:22:26.085Z DEBUG   plugin-btcli4j-gen.sh:   \"jsonrpc\": \"2.0\",
2021-04-22T12:22:26.085Z DEBUG   plugin-btcli4j-gen.sh:   \"id\": 211,
2021-04-22T12:22:26.086Z DEBUG   plugin-btcli4j-gen.sh:   \"method\": \"getrawblockbyheight\",
2021-04-22T12:22:26.087Z DEBUG   plugin-btcli4j-gen.sh:   \"params\": {
2021-04-22T12:22:26.087Z DEBUG   plugin-btcli4j-gen.sh:     \"height\": 1972336
2021-04-22T12:22:26.088Z DEBUG   plugin-btcli4j-gen.sh:   }
2021-04-22T12:22:26.088Z DEBUG   plugin-btcli4j-gen.sh: }
2021-04-22T12:22:26.092Z **BROKEN** plugin-btcli4j-gen.sh: io.github.clightning4j.litebtc.exceptions.LiteBitcoinRPCException
2021-04-22T12:22:26.093Z **BROKEN** plugin-btcli4j-gen.sh: \tat io.github.clightning4j.litebtc.LiteBitcoinRPC.makeBitcoinRequest(LiteBitcoinRPC.java:66)
2021-04-22T12:22:26.094Z **BROKEN** plugin-btcli4j-gen.sh: \tat io.github.clightning4j.litebtc.LiteBitcoinRPC.makeBitcoinRequest(LiteBitcoinRPC.java:72)
2021-04-22T12:22:26.095Z **BROKEN** plugin-btcli4j-gen.sh: \tat io.vincenzopalazzo.btcli4j.control.commands.btcprune.GetRawBlockByHeightBtc.run(GetRawBlockByHeightBtc.kt:39)
2021-04-22T12:22:26.095Z **BROKEN** plugin-btcli4j-gen.sh: \tat io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:77)
2021-04-22T12:22:26.096Z **BROKEN** plugin-btcli4j-gen.sh: \tat io.vincenzopalazzo.btcli4j.Plugin.getRawBlockByHeight(Plugin.kt:106)
2021-04-22T12:22:26.096Z **BROKEN** plugin-btcli4j-gen.sh: \tat jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
2021-04-22T12:22:26.097Z **BROKEN** plugin-btcli4j-gen.sh: \tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2021-04-22T12:22:26.097Z **BROKEN** plugin-btcli4j-gen.sh: \tat java.base/java.lang.reflect.Method.invoke(Method.java:564)
2021-04-22T12:22:26.098Z **BROKEN** plugin-btcli4j-gen.sh: \tat jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:36)
2021-04-22T12:22:26.098Z **BROKEN** plugin-btcli4j-gen.sh: \tat jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:289)
2021-04-22T12:22:26.099Z **BROKEN** plugin-btcli4j-gen.sh: \tat jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:130)
2021-04-22T12:22:26.099Z **BROKEN** plugin-btcli4j-gen.sh: \tat io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
2021-04-22T12:22:26.100Z **BROKEN** plugin-btcli4j-gen.sh: \tat io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)

Bad raw block

During a retry call, the block receives the following error to c-lightning and it is a good error because it contains a wrong raw block

2021-03-23T22:09:39.786Z DEBUG   plugin-btcli4j-gen.sh: During http request to URL http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/testnet/api/block/0000000000000971dc0b16c2050d1910ef278d14eae048571c6da5efcf3bf066/raw
2021-03-23T22:09:39.786Z DEBUG   plugin-btcli4j-gen.sh: With error message: Block not found
2021-03-23T22:09:39.786Z DEBUG   plugin-btcli4j-gen.sh: retry time 0
2021-03-23T22:09:39.786Z UNUSUAL plugin-btcli4j-gen.sh: Response from server: Block not found
2021-03-23T22:09:39.787Z **BROKEN** lightningd: /home/vincent/github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad block), response was {"id":4066,"jsonrpc":"2.0","result":{"blockhash":"0000000000000971dc0b16c2050d1910ef278d14eae048571c6da5efcf3bf066","block":"426c6f636b206e6f7420666f756e64"}}

Crash with a error "Transaction already in block chain"

2021-03-18T20:23:12.324Z DEBUG   02312627fdf07fbdd7e5ddb136611bdde9b00d26821d14d94891395452f67af248-onchaind-chan#5: reducing max_possible_feerate from 253...
2021-03-18T20:23:12.324Z DEBUG   02312627fdf07fbdd7e5ddb136611bdde9b00d26821d14d94891395452f67af248-onchaind-chan#5: ... to 253
2021-03-18T20:23:12.324Z INFO    02312627fdf07fbdd7e5ddb136611bdde9b00d26821d14d94891395452f67af248-chan#5: State changed from FUNDING_SPEND_SEEN to ONCHAIN
2021-03-18T20:23:12.353Z DEBUG   plugin-btcli4j-gen.sh: During http request to URL https://blockstream.info/testnet/api/tx
2021-03-18T20:23:12.354Z DEBUG   plugin-btcli4j-gen.sh: With error message: sendrawtransaction RPC error: {\"code\":-27,\"message\":\"Transaction already in block chain\"}
2021-03-18T20:23:12.354Z DEBUG   plugin-btcli4j-gen.sh: retry time 0
2021-03-18T20:23:12.354Z UNUSUAL plugin-btcli4j-gen.sh: Response from server: sendrawtransaction RPC error: {\"code\":-27,\"message\":\"Transaction already in block chain\"}
2021-03-18T20:23:12.355Z DEBUG   gossipd: Deleting channel 1940739x46x1 due to the funding outpoint being spent
2021-03-18T20:23:12.362Z DEBUG   02312627fdf07fbdd7e5ddb136611bdde9b00d26821d14d94891395452f67af248-onchaind-chan#5: Resolved FUNDING_TRANSACTION/FUNDING_OUTPUT by MUTUAL_CLOSE (008876d124516b3595411464d1e5a59032d280ab3957c60234b192667909658c)
2021-03-18T20:23:12.394Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method closed
2021-03-18T20:23:12.449Z DEBUG   plugin-btcli4j-gen.sh: Error occurs 1 time: and the waiting time is set to 60000
2021-03-18T20:24:12.538Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method closed
2021-03-18T20:24:12.545Z DEBUG   plugin-btcli4j-gen.sh: Error occurs 2 time: and the waiting time is set to 120000
2021-03-18T20:26:12.678Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method closed
2021-03-18T20:26:12.714Z DEBUG   plugin-btcli4j-gen.sh: Error occurs 3 time: and the waiting time is set to 180000
2021-03-18T20:29:12.750Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method closed
2021-03-18T20:29:12.775Z DEBUG   plugin-btcli4j-gen.sh: Error occurs 4 time: and the waiting time is set to 240000
2021-03-18T20:30:12.639Z DEBUG   03b572c05791de9bd14c41cb6eec722375170d0f276fb71fbb918cd7990d5d5d6f-gossipd: Received channel_update for channel 1697171x91x1/1 now DISABLED
2021-03-18T20:33:13.001Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
2021-03-18T20:33:13.323Z **BROKEN** lightningd: /root/github/btcli4j/btcli4j-gen.sh error: bad response to sendrawtransaction (bad 'result' field: Parsing '{result:{success:': object does not have member success), response was {"id":666,"jsonrpc":"2.0","result":{}}
2021-03-18T20:33:13.811Z **BROKEN** lightningd: FATAL SIGNAL 6 (version 0.9.

Another crash with a timeout message

I receive on server the timeout message like the following

2021-03-21T21:37:10.282Z DEBUG   030f0bf260acdbd3edcad84d7588ec7c5df4711e87e6a23016f989b8d3a4147230-gossipd: Received channel_announcement for channel 1452206x88x0
2021-03-21T21:37:10.415Z DEBUG   030f0bf260acdbd3edcad84d7588ec7c5df4711e87e6a23016f989b8d3a4147230-gossipd: Updated pending announce with update 1452206x88x0/0
2021-03-21T21:37:25.291Z UNUSUAL plugin-btcli4j-gen.sh: timeout
2021-03-21T21:37:25.292Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
2021-03-21T21:37:25.298Z **BROKEN** lightningd: /home/vincent/github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad 'result' field: Parsing '{result:{blockhash:': object does not have member blockhash), response was {"id":8885,"jsonrpc":"2.0","result":{}}

Support bitcoin pruning mode

This issue describes all the details to support the pruning mode on the java plugin

  • lite-bitcoin-rpc
  • testing alpha version, code can be founded here
  • Beta testing on server with a node in pruning mode
  • release first version with the following milestone

Autogenerate POM for Github "Used by"

The library used in this repository is not linked in the Github "Used by", because Gradle it is not supported yet.

I found a workaround some time ago, described in this post the only thing to do is adding the autogeneration of pom.xml file in the Gradle file.

Client crash with internet error

Sometimes the client can crash (error crash) and this can happen on a normal computer with a poor connection

This I the log that I receive from the test


**2021-03-19T07:08:16.296Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:31)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:283)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:128)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)
Caused by: jrpc.clightning.plugins.exceptions.CLightningPluginException: java.net.SocketException: Socket closed
	at io.vincenzopalazzo.btcli4j.control.commands.GetRawBlockByHeightCommand.run(GetRawBlockByHeightCommand.kt:66)
	at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:49)
	at io.vincenzopalazzo.btcli4j.Plugin.getRawBlockByHeight(Plugin.kt:73)
	... 8 more
Caused by: java.net.SocketException: Socket closed
	at java.base/sun.nio.ch.NioSocketImpl.endRead(NioSocketImpl.java:248)
	at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:327)
	at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:350)
	at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:803)
	at java.base/java.net.Socket$SocketInputStream.read(Socket.java:982)
	at okio.InputStreamSource.read(JvmOkio.kt:90)
	at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:129)
	at okio.RealBufferedSource.indexOf(RealBufferedSource.kt:427)
	at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:320)
	at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
	at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:178)
	at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
	at io.vincenzopalazzo.btcli4j.util.HttpRequestFactory.makeRequest(HttpRequestFactory.kt:144)
	at io.vincenzopalazzo.btcli4j.util.HttpRequestFactory.execRequest(HttpRequestFactory.kt:104)
	at io.vincenzopalazzo.btcli4j.control.commands.GetRawBlockByHeightCommand.run(GetRawBlockByHeightCommand.kt:42)
	... 10 more
/home/vincent/Github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad 'result' field: Parsing '{result:{blockhash:': object does not have member blockhash), response was {"id":2651,"jsonrpc":"2.0","result":{}}
2021-03-19T07:08:16.309Z **BROKEN** lightningd: /home/vincent/Github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad 'result' field: Parsing '{result:{blockhash:': object does not have member blockhash), response was {"id":2651,"jsonrpc":"2.0","result":{}}
lightningd: FATAL SIGNAL 6 (version 0.9.3)
**

Crash with wrong block value

2020-09-09T02:24:07.933Z DEBUG   plugin-btcli4j-gen.sh: Request{method=GET, url=http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api/block-height/647402} Hash 00000000000000000009e2c5bd5b35372ee0d5fff540e3783e50b38ec87f800d
2020-09-09T02:24:08.848Z DEBUG   plugin-btcli4j-gen.sh: During http request to URL http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api/block/00000000000000000009e2c5bd5b35372ee0d5fff540e3783e50b38ec87f800d/raw
2020-09-09T02:24:08.849Z DEBUG   plugin-btcli4j-gen.sh: With error message: Block not found
2020-09-09T02:24:08.849Z DEBUG   plugin-btcli4j-gen.sh: retry time 0
2020-09-09T02:24:08.849Z **BROKEN** lightningd: /root/github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad block), response was {"id":900,"jsonrpc":"2.0","result":{"blockhash":"00000000000000000009e2c5bd5b35372ee0d5fff540e3783e50b38ec87f800d","block":"426c6f636b206e6f7420666f756e64"}}
2020-09-09T02:24:08.879Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v0.9.0-287-g62f80f7)
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: common/daemon.c:43 (send_backtrace) 0x55b70f545a2d
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: common/daemon.c:51 (crashdump) 0x55b70f545a7f
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fce917d120f
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fce917d118b
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fce917b0858
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: lightningd/log.c:820 (fatal) 0x55b70f51650b
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:119 (bitcoin_plugin_error) 0x55b70f50311c
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:381 (getrawblockbyheight_callback) 0x55b70f50367e
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:367 (plugin_response_handle) 0x55b70f52c594
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:473 (plugin_read_json_one) 0x55b70f52c6a7
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:518 (plugin_read_json) 0x55b70f52c81c
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x55b70f57a2b6
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x55b70f57a761
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x55b70f57a7fe
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:445 (io_loop) 0x55b70f57c142
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:24 (io_loop_with_timers) 0x55b70f510c6d
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1015 (main) 0x55b70f514444
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fce917b20b2
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x55b70f502e6d
2020-09-09T02:24:08.879Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

bad send transaction

This is one of the crash that I found on my routing node

2022-11-14T23:11:20.273Z **BROKEN** lightningd: /home/vincent/github/btcli4j/btcli4j-gen.sh error: bad response to sendrawtransaction (bad 'result' field: Parsing '{result:{success:': object does not have member success), response was {"id":917787410,"jsonrpc":"2.0","result":{}}

Exception Caused by: java.net.SocketTimeoutException: timeout

The backend can have a problem and generate some exception like this

2020-09-03T09:41:51.650Z UNUSUAL plugin-btcli4j.sh: {\"id\":328,\"jsonrpc\":\"2.0\",\"result\":{\"blockhash\":null,\"block\":null}}
2020-09-03T09:42:06.521Z UNUSUAL plugin-btcli4j.sh: Request: {\"jsonrpc\":\"2.0\",\"id\":329,\"method\":\"estimatefees\",\"params\":{}}
2020-09-03T09:42:06.521Z UNUSUAL plugin-btcli4j.sh: estimatefees
2020-09-03T09:42:06.522Z DEBUG plugin-btcli4j.sh: Method estimatefees found
2020-09-03T09:42:11.026Z DEBUG gossipd: seeker: no peers, waiting
java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:33)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:279)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:127)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:9)
Caused by: java.net.SocketTimeoutException: timeout
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.newTimeoutException(Http2Stream.kt:677)
	at okhttp3.internal.http2.Http2Stream$StreamTimeout.exitAndThrowIfTimedOut(Http2Stream.kt:686)
	at okhttp3.internal.http2.Http2Stream.takeHeaders(Http2Stream.kt:143)
	at okhttp3.internal.http2.Http2ExchangeCodec.readResponseHeaders(Http2ExchangeCodec.kt:96)
	at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:106)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:79)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
	at io.vincenzopalazzo.btcli4j.util.HttpRequestFactory.execRequest(HttpRequestFactory.kt:26)
	at io.vincenzopalazzo.btcli4j.control.commands.EstimateFeeCommand.run(EstimateFeeCommand.kt:18)
	at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:27)
	at io.vincenzopalazzo.btcli4j.Plugin.estimateFees(Plugin.kt:17)
	... 7 more

bad transaction script in testnet

Today I receive the following crash on my testnet node

0000000003cb2b284f93a48b7f5893b5c10bb16cfe763adc0aa7876dada/raw with the following result [size=42429 hex=0000002039afb2b61ad1f723ebde1a4e053384c652bbf26840091f5469aa01000000000075014081e7a33d3cb62fcc171242e4670a1791c068d51d867abb260a?]
2022-08-24T14:31:36.428Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutCommand: TxId: 5a1f85a749ab570336069a85a5e7e377ca42200d3c015c452d42e9f2bfcc8d5b
2022-08-24T14:31:36.429Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutCommand: Vout: 1
2022-08-24T14:31:37.856Z DEBUG   plugin-btcli4j-gen.sh: Request to http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/testnet/api/tx/5a1f85a749ab570336069a85a5e7e377ca42200d3c015c452d42e9f2bfcc8d5b/outspend/1 with the following result [text={\"spent\":false}]
2022-08-24T14:31:37.857Z DEBUG   038863cf8ab91046230f561cd5b386cbff8309fa02e3f0c3ed161a3aeb64a643b9-gossipd: seeker: found 0 new node_announcements in 66 scids
2022-08-24T14:31:37.857Z DEBUG   gossipd: seeker: state = NORMAL No new node_announcements in 66 scids
2022-08-24T14:31:37.863Z DEBUG   plugin-btcli4j-gen.sh: GetUtxOutCommand: UTXO Status: {
2022-08-24T14:31:37.863Z DEBUG   plugin-btcli4j-gen.sh:   \"spend\": false
2022-08-24T14:31:37.863Z DEBUG   plugin-btcli4j-gen.sh: }
2022-08-24T14:31:38.372Z DEBUG   plugin-btcli4j-gen.sh: Request to http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/testnet/api/tx/5a1f85a749ab570336069a85a5e7e377ca42200d3c015c452d42e9f2bfcc8d5b with the following result [size=1562 text={\"txid\":\"5a1f85a749ab570336069a85a5e7e377ca42200d3c015c452d42e9f?]
2022-08-24T14:31:38.373Z **BROKEN** plugin-btcli4j-gen.sh: We receive a 200 code from the server, but the reponse looks invalid
2022-08-24T14:31:38.373Z **BROKEN** plugin-btcli4j-gen.sh: Expected a com.google.gson.JsonPrimitive but was com.google.gson.JsonObject
2022-08-24T14:31:38.374Z UNUSUAL plugin-btcli4j-gen.sh: For input string: \"Check fails\"
2022-08-24T14:31:38.376Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
2022-08-24T14:31:38.377Z **BROKEN** lightningd: /home/vincent/github/btcli4j/btcli4j-gen.sh error: bad response to getutxout (bad 'result' field: Parsing '{result:{script:': object does not have member script), response was {"id":197,"jsonrpc":"2.0","result":{}}
2022-08-24T14:31:38.541Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v0.12.0rc3)
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: common/daemon.c:38 (send_backtrace) 0x55ca6c1f1f0d
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: common/daemon.c:46 (crashdump) 0x55ca6c1f1f5d
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: /build/glibc-fWwxX8/glibc-2.28/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 ((null)) 0x7f95b34f283f
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: ../sysdeps/unix/sysv/linux/raise.c:51 (__GI_raise) 0x7f95b34f27bb
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: /build/glibc-fWwxX8/glibc-2.28/stdlib/abort.c:79 (__GI_abort) 0x7f95b34dd534
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/log.c:854 (fatal_vfmt) 0x55ca6c193349
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/log.c:864 (fatal) 0x55ca6c1933fa
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:115 (bitcoin_plugin_error) 0x55ca6c1649cf
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:539 (getutxout_callback) 0x55ca6c1657b2
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:591 (plugin_response_handle) 0x55ca6c1bc544
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:702 (plugin_read_json_one) 0x55ca6c1bc79f
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:747 (plugin_read_json) 0x55ca6c1bc97e
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x55ca6c2ab44f
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x55ca6c2abfef
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x55ca6c2ac02d
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:453 (io_loop) 0x55ca6c2ae24a
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:22 (io_loop_with_timers) 0x55ca6c18a441
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1195 (main) 0x55ca6c19023c
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: ../csu/libc-start.c:308 (__libc_start_main) 0x7f95b34df09a
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x55ca6c164369
2022-08-24T14:31:38.541Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

Looks like there is somethings wrong with the transaction script

Exception on node without proxy

java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:31)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:283)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:128)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
Caused by: java.lang.IllegalStateException: plugin.configs.proxy must not be null
	at io.vincenzopalazzo.btcli4j.Plugin.configurePluginInit(Plugin.kt:90)
	at io.vincenzopalazzo.btcli4j.Plugin.getChainInfo(Plugin.kt:62)
	... 8 more

Crash on close transaction

When I close the channel on mobile I receive the following crash to the server side

2021-02-14T23:01:34.528Z UNUSUAL plugin-btcli4j-gen.sh: {
2021-02-14T23:01:34.529Z UNUSUAL plugin-btcli4j-gen.sh:   \"jsonrpc\": \"2.0\",
2021-02-14T23:01:34.530Z UNUSUAL plugin-btcli4j-gen.sh:   \"id\": 79106,
2021-02-14T23:01:34.530Z UNUSUAL plugin-btcli4j-gen.sh:   \"method\": \"sendrawtransaction\",
2021-02-14T23:01:34.530Z UNUSUAL plugin-btcli4j-gen.sh:   \"params\": {
2021-02-14T23:01:34.530Z UNUSUAL plugin-btcli4j-gen.sh:     \"tx\": \"02000000000101dae47bdf7fd5010e472af2bfe9aa6d80a8d75047372b5f6a50b1bd19b77f3eff0000000000ffffffff017d9c1000000000001600146b3590d9c69a721493f91a37f8b3ba2a9a22e7c2040047304402204fb97a8332ddf23738abe094fa72ae4a453bd7a7f0d2fcccac5d129963cd4ee20220031cf5ae1d82c4d3f2b4b93f816e8abc8705568fc91782ab285efae1ea9845240147304402201b00d2c6391f1e7b9ff9d577088af853ccfb138f57b3400ca9eaa4d2e1309f74022056c37bb84c0c360f654dd5a52da06482abcbe9d3d8431911d517d66c2433610b01475221037e8131ee4080bebd55091d143edff2728fda0a7ec8e54364e76926415309b4652103c2b0675e43dc38ea4d38cc5fe41ec2b058b7dee5aa6e48bda5efa81087be304152ae00000000\",
2021-02-14T23:01:34.531Z UNUSUAL plugin-btcli4j-gen.sh:     \"allowhighfees\": false
2021-02-14T23:01:34.531Z UNUSUAL plugin-btcli4j-gen.sh:   }
2021-02-14T23:01:34.531Z UNUSUAL plugin-btcli4j-gen.sh: }
2021-02-14T23:01:34.807Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:31)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:283)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:128)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt)
Caused by: java.lang.NoClassDefFoundError: okhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink
	at okhttp3.internal.http1.Http1ExchangeCodec.newKnownLengthSink(Http1ExchangeCodec.kt:215)
	at okhttp3.internal.http1.Http1ExchangeCodec.createRequestBody(Http1ExchangeCodec.kt:96)
	at okhttp3.internal.connection.Exchange.createRequestBody(Exchange.kt:73)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:58)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
	at io.vincenzopalazzo.btcli4j.util.HttpRequestFactory.execRequest(HttpRequestFactory.kt:102)
	at io.vincenzopalazzo.btcli4j.control.commands.SendRawTransactionCommand.run(SendRawTransactionCommand.kt:41)
	at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:44)
	at io.vincenzopalazzo.btcli4j.Plugin.sendRawTransaction(Plugin.kt:83)
	... 9 more
Caused by: java.lang.ClassNotFoundException: okhttp3.internal.http1.Http1ExchangeCodec$KnownLengthSink
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 28 more
/home/vincent/Github/btcli4j/btcli4j-gen.sh error: bad response to sendrawtransaction (bad 'result' field: Parsing '{result:{success:': object does not have member success), response was {"id":79106,"jsonrpc":"2.0","result":{}}
2021-02-14T23:01:34.885Z **BROKEN** lightningd: /home/vincent/Github/btcli4j/btcli4j-gen.sh error: bad response to sendrawtransaction (bad 'result' field: Parsing '{result:{success:': object does not have member success), response was {"id":79106,"jsonrpc":"2.0","result":{}}
lightningd: FATAL SIGNAL 6 (version 0.9.3rc2)
0x55a213feadf8 send_backtrace
	common/daemon.c:38
0x55a213feae92 crashdump
	common/daemon.c:51
0x7fbc7de8720f ???
	???:0
0x7fbc7de8718b ???
	???:0
0x7fbc7de66858 ???
	???:0
0x55a213fb5e58 fatal
	lightningd/log.c:803
0x55a213fa1221 bitcoin_plugin_error
	lightningd/bitcoind.c:120
0x55a213fa14d3 sendrawtx_callback
	lightningd/bitcoind.c:275
0x55a213fa152b sendrawtx_compatv090_callback
	lightningd/bitcoind.c:344
0x55a213fcd45c plugin_response_handle
	lightningd/plugin.c:432
0x55a213fcd57e plugin_read_json_one
	lightningd/plugin.c:538
0x55a213fcd702 plugin_read_json
	lightningd/plugin.c:583
0x55a2140242df next_plan
	ccan/ccan/io/io.c:59
0x55a21402478a do_plan
	ccan/ccan/io/io.c:407
0x55a214024827 io_ready
	ccan/ccan/io/io.c:417
0x55a21402616b io_loop
	ccan/ccan/io/poll.c:445
0x55a213fb0524 io_loop_with_timers
	lightningd/io_loop_with_timers.c:24
0x55a213fb3e8f main
	lightningd/lightningd.c:1016
0x7fbc7de680b2 ???
	???:0
0x55a213fa0f6d ???
	???:0
0xffffffffffffffff ???
	???:0
2021-02-14T23:01:35.080Z **BROKEN** lightningd: FATAL SIGNAL 6 (version 0.9.3rc2)

Systemd unit crashing when running with MemoryDenyWriteExecute=true

When running c-lightning with the plugin enabled, under systemd unit with MemoryDenyWriteExecute set to true, c-lightning is crashing with error:

libjvm.so: cannot restore segment prot after reloc: Operation not permitted

Anyway to solve it without disabling MemoryDenyWriteExecute?

bad sendtransaction from c-lightning

The node have some problem with getting a transaction from outside (I think bitcoincore)

The log here

2021-09-27T00:49:14.369Z **BROKEN** plugin-btcli4j-gen.sh: GetChainInfoBtc: terminate bitcoin core with error: bad-txns-inputs-missingorspent
2021-09-27T00:59:44.864Z **BROKEN** plugin-btcli4j-gen.sh: GetChainInfoBtc: terminate bitcoin core with error: bad-txns-inputs-missingorspent
2021-09-27T00:59:51.243Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method SOCKS: Host unreachable
2021-09-27T01:04:56.746Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method SOCKS: Host unreachable
2021-09-27T01:10:01.412Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method SOCKS: Host unreachable
2021-09-27T01:16:01.385Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method SOCKS: Host unreachable
2021-09-27T01:21:09.810Z **BROKEN** plugin-btcli4j-gen.sh: Error during the request method SOCKS: Host unreachable
2021-09-27T01:26:09.811Z **BROKEN** plugin-btcli4j-gen.sh: After all retry time (4) all request failed
2021-09-27T01:26:09.812Z **BROKEN** lightningd: /home/vincent/github/btcli4j/btcli4j-gen.sh error: bad response to sendrawtransaction (bad 'result' field: Parsing '{result:{success:': object does not have member success), response was {"id":29918736,"jsonrpc":"2.0","result":{}}
2021-09-27T01:26:09.875Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v0.10.1-50-g372fffa)
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: common/daemon.c:44 (send_backtrace) 0x564cb44dcd7b
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: common/daemon.c:52 (crashdump) 0x564cb44dcdbd
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f753c7c583f
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f753c7c57bb
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f753c7b0534
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: lightningd/log.c:819 (fatal) 0x564cb44a2b51
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:120 (bitcoin_plugin_error) 0x564cb448755f
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:285 (sendrawtx_callback) 0x564cb448789d
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:529 (plugin_response_handle) 0x564cb44bc1a7
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:635 (plugin_read_json_one) 0x564cb44bc2cc
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:680 (plugin_read_json) 0x564cb44bc452
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x564cb451e4e5
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x564cb451e9b8
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x564cb451e9ea
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:445 (io_loop) 0x564cb45202a2
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:24 (io_loop_with_timers) 0x564cb449cfb2
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1124 (main) 0x564cb44a0b29
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7f753c7b209a
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x564cb44872b9
2021-09-27T01:26:09.875Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

Empity script found

During the tests of #33 , I receive the following exception

2021-04-23T00:40:17.379Z DEBUG   plugin-btcli4j-gen.sh: Option btcli4j-endpoint=
2021-04-23T00:40:17.527Z **BROKEN** lightningd: /home/vincent/github/btcli4j/btcli4j-gen.sh error: bad response to getutxout (bad 'result' field: Parsing '{result:{script:': object does not have member script), response was {"id":1581,"jsonrpc":"2.0","result":{}}

Another some strange exception with the stream

java.lang.reflect.InvocationTargetException
	at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:31)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:284)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:129)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
Caused by: jrpc.clightning.plugins.exceptions.CLightningPluginException: stream was reset: INTERNAL_ERROR
	at io.vincenzopalazzo.btcli4j.control.commands.GetRawBlockByHeightCommand.run(GetRawBlockByHeightCommand.kt:64)
	at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:44)
	at io.vincenzopalazzo.btcli4j.Plugin.getRawBlockByHeight(Plugin.kt:65)
	... 7 more

Ugly debug output

Here is how the debug output looks like:

...
2021-03-30T18:26:05.793Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.794Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.795Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.795Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.796Z DEBUG   plugin-run-plugin.sh: ?O??\u0005\u0000\u0000\u0000\u0000\u0000\u0017?\u0014??A\u0000??J ???EpJ
2021-03-30T18:26:05.796Z DEBUG   plugin-run-plugin.sh: ?O?f0\u001f\u0004\u0000\u0000\u0000\u0000\u0019v?\u0014t\u0014#?@???F??$3??<?B?????\u0007\u0000\u0000\u0000\u0000\u0019v?\u0014??I??gph?q{?(x%~?j???\u001e?\b\u0000\u0000\u0000\u0000\u0019v?\u0014??I??gph?q{?(x%~?j????\u000f\u0000\u0000\u0000\u0000\u0019v?\u0014??I??gph?q{?(x%~?j??\u0000\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0001[?\u0014????\u000e?U?J?u\u0014\u0007=)??T7?w \u001ct??C?\u0000\u0000\u0000\u0000?H0E\u0002!\u0000?PT??rj?;?S\b??\u0006Q-\u000f9?W???!\u0016??\u0002 VU????\u0019?

The plugin is run via run-plugin.sh which does not need to be generated (will be in a PR at some point):

#!/bin/sh
a="/$0"; a=${a%/*}; a=${a:-.}; a=${a#/}/; BINDIR=$(cd $a; pwd)
java -jar $BINDIR/build/libs/btcli4j-all.jar

The second line is a POSIX shell-only dirname replacement.

Caused by: kotlin.UninitializedPropertyAccessException: lateinit property network has not been initialized

This crash is present when the api deprecated are available!

2020-09-08T13:33:26.408Z DEBUG 03ca6c08d0a2399dc24f5e52c96ca3f8650988ca7a72f54de5da2f9fb40cddb541-gossipd: Updated pending announce with update 601553x1905x1/1
java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at jrpc.clightning.plugins.rpcmethods.RPCMethodReflection.doRun(RPCMethodReflection.java:31)
	at jrpc.clightning.plugins.CLightningPlugin.doMethods(CLightningPlugin.java:284)
	at jrpc.clightning.plugins.CLightningPlugin.start(CLightningPlugin.java:129)
	at io.vincenzopalazzo.btcli4j.AppKt.main(App.kt:26)
Caused by: kotlin.UninitializedPropertyAccessException: lateinit property network has not been initialized
	at io.vincenzopalazzo.btcli4j.control.commands.GetUtxOutCommand.getUTXOInformation(GetUtxOutCommand.kt:69)
	at io.vincenzopalazzo.btcli4j.control.commands.GetUtxOutCommand.run(GetUtxOutCommand.kt:45)
	at io.vincenzopalazzo.btcli4j.control.MediationMethod.runCommand(MediationMethod.kt:44)
	at io.vincenzopalazzo.btcli4j.Plugin.getUtxOut(Plugin.kt:70)
	... 8 more
2020-09-08T13:33:26.475Z DEBUG 03ca6c08d0a2399dc24f5e52c96ca3f8650988ca7a72f54de5da2f9fb40cddb541-gossipd: Received channel_announcement for channel 633743x1309x0

UNUSUAL plugin-btcli4j-gen.sh: timeout

2020-09-14T09:44:49.764Z UNUSUAL plugin-btcli4j-gen.sh: timeout
2020-09-14T09:44:49.782Z **BROKEN** plugin-btcli4j-gen.sh: Message empty
2020-09-14T09:44:49.782Z **BROKEN** lightningd: /root/github/btcli4j/btcli4j-gen.sh error: bad response to getrawblockbyheight (bad 'blockhash' field), response was {"id":165068,"jsonrpc":"2.0","result":{}}
2020-09-14T09:44:49.853Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v0.9.1rc2-1-gf1d5fdf)
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: common/daemon.c:43 (send_backtrace) 0x55ed5115922e
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: common/daemon.c:51 (crashdump) 0x55ed51159280
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fe23dafb20f
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fe23dafb18b
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fe23dada858
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: lightningd/log.c:820 (fatal) 0x55ed5112963c
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:120 (bitcoin_plugin_error) 0x55ed5111611c
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: lightningd/bitcoind.c:442 (getrawblockbyheight_callback) 0x55ed511166e7
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:367 (plugin_response_handle) 0x55ed5113fac2
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:473 (plugin_read_json_one) 0x55ed5113fbd5
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: lightningd/plugin.c:518 (plugin_read_json) 0x55ed5113fd4a
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x55ed5118f0e5
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x55ed5118f590
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x55ed5118f62d
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:445 (io_loop) 0x55ed51190f71
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:24 (io_loop_with_timers) 0x55ed51123d9e
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1015 (main) 0x55ed51127575
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x7fe23dadc0b2
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x55ed51115e6d
2020-09-14T09:44:49.853Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff

Fresh install of lightning with fresh install of plugin and plugin install fails

# ./gradlew createRunnableScript -Dorg.gradle.daemon=false --no-build-cache
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.8.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 
add from dependencies: lite-bitcoin-rpc-0.0.1-rc2-SNAPSHOT.jar
add from dependencies: logging-interceptor-4.9.1.jar
add from dependencies: kotlin-stdlib-jdk8-1.4.30.jar
add from dependencies: jrpclightning-0.2.2.jar
add from dependencies: gson-2.8.8.jar
add from dependencies: okhttp-4.9.1.jar
add from dependencies: kotlin-stdlib-jdk7-1.4.30.jar
add from dependencies: okio-jvm-2.8.0.jar
add from dependencies: kotlin-stdlib-1.4.30.jar
add from dependencies: kotlin-stdlib-common-1.4.30.jar
add from dependencies: logback-classic-1.2.6.jar
add from dependencies: logback-core-1.2.6.jar
add from dependencies: slf4j-api-1.7.32.jar
add from dependencies: junixsocket-common-2.4.0.jar
add from dependencies: junixsocket-native-common-2.4.0.jar
add from dependencies: reflections-0.9.12.jar
add from dependencies: guava-31.0.1-jre.jar
add from dependencies: commons-io-2.4.jar
add from dependencies: annotations-13.0.jar
add from dependencies: javassist-3.26.0-GA.jar
add from dependencies: failureaccess-1.0.1.jar
add from dependencies: listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
add from dependencies: jsr305-3.0.2.jar
add from dependencies: checker-qual-3.12.0.jar
add from dependencies: error_prone_annotations-2.7.1.jar
add from dependencies: j2objc-annotations-1.3.jar
add from sources: logback-test.xml
add from sources: App.kt
add from sources: Plugin.kt
add from sources: MediationMethod.kt
add from sources: CheckResult.kt
add from sources: CheckHandler.kt
add from sources: BlockNotFoundCheck.kt
add from sources: TransactionCheck.kt
add from sources: ChainOfResponsibilityCheck.kt
add from sources: SendRawTransactionCommand.kt
add from sources: GetChainInfoCommand.kt
add from sources: GetRawBlockByHeightCommand.kt
add from sources: EstimateFeeCommand.kt
add from sources: GetUtxOutCommand.kt
add from sources: ICommand.kt
add from sources: GetUtxOutBtc.kt
add from sources: EstimateFeeBtc.kt
add from sources: SendRawTransactionBtc.kt
add from sources: GetChainInfoBtc.kt
add from sources: GetRawBlockByHeightBtc.kt
add from sources: OptionsManager.kt
add from sources: JSONConverter.kt
add from sources: HttpRequestFactory.kt
add from sources: EstimateFeeTypeAdapter.kt
add from sources: PluginManager.kt
add from sources: UTXOBitcoin.kt
add from sources: BlockchainInfoBitcoin.kt
add from sources: EstimateFeeBitcoin.kt
add from sources: MemPoolInfo.kt
add from sources: BTCTransactionModel.kt
add from sources: EstimateFeeModel.kt
add from sources: BTCTransactionOutputModel.kt
add from sources: TransactionStatusModel.kt
add from sources: BTCTransactionInputModel.kt
add from sources: StatusUTXOModel.kt
add from sources: StatusOnChain.kt
The message received from the daemon indicates that the daemon has disappeared.
Build request sent: Build{id=6ab285f2-4de6-43dd-9fcf-e61cbd487e46, currentDir=/root/btcli4j}
Attempting to read last messages from the daemon log...
Daemon pid: 927
  log file: /root/.gradle/daemon/6.8.2/daemon-927.out.log
----- Last  20 lines from daemon log file - daemon-927.out.log -----
add from sources: EstimateFeeBtc.kt
add from sources: SendRawTransactionBtc.kt
add from sources: GetChainInfoBtc.kt
add from sources: GetRawBlockByHeightBtc.kt
add from sources: OptionsManager.kt
add from sources: JSONConverter.kt
add from sources: HttpRequestFactory.kt
add from sources: EstimateFeeTypeAdapter.kt
add from sources: PluginManager.kt
add from sources: UTXOBitcoin.kt
add from sources: BlockchainInfoBitcoin.kt
add from sources: EstimateFeeBitcoin.kt
add from sources: MemPoolInfo.kt
add from sources: BTCTransactionModel.kt
add from sources: EstimateFeeModel.kt
add from sources: BTCTransactionOutputModel.kt
add from sources: TransactionStatusModel.kt
add from sources: BTCTransactionInputModel.kt
add from sources: StatusUTXOModel.kt
add from sources: StatusOnChain.kt
----- End of the daemon log -----


FAILURE: Build failed with an exception.

* What went wrong:
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Did a fresh install of lightingd on turnkey core linux. Tried to gradle with this error....

getutxo crash with the #33

During the PR #33 testing, I receive the following exception

2021-04-24T16:55:39.758Z **BROKEN** lightningd: /home/vincent/github/btcli4j/btcli4j-gen.sh error: bad response to getutxout (bad 'result' field: Parsing '{result:{script:': object does not have member script), response was {"id":6936,"jsonrpc":"2.0","result":{}}

This looks like the plugin don't put any type of information inside the response

response was {"id":6936,"jsonrpc":"2.0","result":{}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.