clightning4j / btcli4j

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.
GNU General Public License v2.0
8 stars 7 forks source link

Error Server 502 return a html page! #24

Closed vincenzopalazzo closed 3 years ago

vincenzopalazzo commented 3 years ago
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)
vincenzopalazzo commented 3 years ago

Reproduced again, this is a bug to solve if we want to run the plugin in a real scenario.