Closed patrikmojzis closed 3 years ago
Seems related to https://github.com/lightningnetwork/lnd/issues/3629
Okay here's more info. I think if I could find a way to abandon the channel causing this issue then it could possibly work. (I did not edit the chan_point to zeros.)
lncli feereport
[lncli] rpc error: code = Unknown desc = no policy for outgoing channel 718214189422280704
{
"channel_id": "718214189422280704",
"chan_point": "0000000000000000000000000000000000000000000000000000000000000000:0",
"last_update": 1603001982,
"node1_pub": "02ce0da01c1e86dd80ef1888febda8905e0ac03290a48a77d5aa9ad574f072040a",
"node2_pub": "03beddc8adbf7d56a7da15cdaf95d97b24d07088c3571b421c0e6f9d551a210342",
"capacity": "0",
"node1_policy": null,
"node2_policy": {
"time_lock_delta": 40,
"min_htlc": "1",
"fee_base_msat": "1000",
"fee_rate_milli_msat": "2400",
"disabled": false,
"max_htlc_msat": "2107308000",
"last_update": 1603001982
}
},
lncli updatechanpolicy --base_fee_msat 100 --fee_rate 0.000001 --time_lock_delta 144 --chan_point 0000000000000000000000000000000000000000000000000000000000000000:0
[lncli] rpc error: code = Unknown desc = channel from self node has no policy
lncli abandonchannel 0000000000000000000000000000000000000000000000000000000000000000 0
[lncli] rpc error: code = Unknown desc = unable to find closed channel summary
note added: abandonchannel
is a dangerous command and can lead to loss of funds if used incorrectly - ask in the LND slack channel if unsure
@parakeety just to confirm, you weren't the one that funded the channel, right? Also you're running a neutrino node right? Finally does the channel how as active or even prevent under listchannels
?
If the answer to the first question is no, then you can abandon the channel by recompiling lnd with the dev
build tag: make install tags=dev
. From there you'll have installed a version of lnd
that makes this command useable over the RPC or command line.
listchannels
. I already tried building lnd
with dev
tag but did not succeed in abandoning the channel, got this error.
[lncli] rpc error: code = Unknown desc = unable to find closed channel summary
Interesting, if the channel isn't found under listchanenls
, then it doesn't exist from the PoV of lnd at all. Since it errors out before removing the channel from the graph, that portion isn't being executed. I suspect this channel is actually closed as well, and will be properly removed from the graph once #5138 lands.
I saw that #5138 just landed but after I updated I still see that the issue persists.
Your node needs to be up for 30 seconds when running with neutrino to prune the graph. It'll be done again every hour after that.
I let it restart multiple times then waited few hours and tried again but still no success.
It seems to start pruning.
2021-04-22 22:34:26.265 [INF] CRTR: Initial zombie prune starting
2021-04-22 22:34:26.266 [INF] CRTR: Examining channel graph for zombie channels
2021-04-22 22:34:26.269 [INF] CRTR: Pruning 13 zombie channels
Sometimes it gets to "synced_to_chain": true, "synced_to_graph": true
and makes some channels active and then it crashes but most of the time it is only "synced_to_chain": true
.
These are the errors I am getting.
2021-04-22 22:49:18.726 [ERR] DISC: Unable to rebroadcast stale announcements: unable to retrieve outgoing channels: channel from self node has no policy
2021-04-22 22:49:48.315 [ERR] SRVR: Unable to connect to 02c38022478fc46244e229be5bfa3d3de94a009c64cd380bad5bfad8d8e2120917@192.168.1.108:9735: socks connect tcp 127.0.0.1:9050->192.168.1.108:9735: unknown error general SOCKS server failure
2021-04-22 22:49:48.668 [ERR] BTCN: utxo scan failed: Couldn't retrieve block 00000000000000000009e1854d60d0ce3a456c1dd59d6e9ad497ca762fc7d26a from network
2021-04-22 22:49:49.216 [ERR] WTWR: Unable to fetch block for (height=a6108, hash=00000000000000000000a2599df86fa2e5349fc9c52402041bd250f5bfba80ee): Couldn't retrieve block 00000000000000000000a2599df86fa2e5349fc9c52402041bd250f5bfba80ee from network
2021-04-22 22:49:57.637 [ERR] BTCN: Unable to parse IP network for peer t7jlaj6ggyx7s5vy.onion:8333: unsupported IP type
Ah I see, it's because we don't allow pruning your own channels from the graph. The following patch should get rid of the already spent channel from the graph, but it could also affect any of your other channels within the graph if they are considered prune-able (either edge hasn't been updated in 2 weeks, or both edges are disabled).
diff --git a/routing/router.go b/routing/router.go
index 243bde49..ccc49b1f 100644
--- a/routing/router.go
+++ b/routing/router.go
@@ -817,13 +817,6 @@ func (r *ChannelRouter) pruneZombieChans() error {
return nil
}
- // We'll ensure that we don't attempt to prune our *own*
- // channels from the graph, as in any case this should be
- // re-advertised by the sub-system above us.
- if isSelfChannelEdge(info) {
- return nil
- }
-
// If *both* edges haven't been updated for a period of
// chanExpiry, then we'll mark the channel itself as eligible
// for graph pruning.
Thanks that worked.
It did not fix the crashing though. I checked the log once again and I noticed every time it crashes the log ends with something like: [INF] WTWR: Accepted incoming peer 02d28e82e3c94bea9e26fbebd68a8f4ef1a5fc1c244bfea68bdd4c136730c958d3@83.250.140.254:39242
.
Tried to disable WT and it does not crash anymore.
Sounds like a panic. What does stdout/stderr show?
Closing due to inactivity.
Background
Lnd v0.12.1 was working normally since the release but now I noticed that my channels were offline. I checked what's happening and I found out that something went wrong and lnd just keeps restarting. Tried to update to the latest commit but did not help.
I don't know what could cause it since I did not do any changes. I regularly check up on my node and everything was always fine.
Environment
Steps to reproduce
Not clear.
Log