lightning icon indicating copy to clipboard operation
lightning copied to clipboard

Peer remains in state CHANNELD_AWAITING_LOCKIN after funding tx confirmed

Open andrewtoth opened this issue 8 years ago • 49 comments

The funding tx has over 100 confirmations at this point. lightningd gives:

peer 02aeb693e2dfb2f890c65dcf27e6eb7d52dd3e4f7b74ce5fe646675793625f9b51: Got depth change 0->99 for 223f614f539312509ef60286ea56972f6a6cd828108f908203e0b1e9c1aeec94
peer 02aeb693e2dfb2f890c65dcf27e6eb7d52dd3e4f7b74ce5fe646675793625f9b51: Funding tx 223f614f539312509ef60286ea56972f6a6cd828108f908203e0b1e9c1aeec94 depth 99 of 3

lightning-cli getpeers gives:

{ "peers" : 
	[ 
		{ "state" : "CHANNELD_AWAITING_LOCKIN", "netaddr" : 
			[ "202.84.20.11:9735" ], "peerid" : "02aeb693e2dfb2f890c65dcf27e6eb7d52dd3e4f7b74ce5fe646675793625f9b51", "connected" : true, "owner" : "lightning_channeld", "channel" : "505117:367:1", "msatoshi_to_us" : 100000000, "msatoshi_total" : 100000000 }, 

andrewtoth avatar Jan 20 '18 18:01 andrewtoth

I caught clightning trying to create a funding transaction with an invalid input. Perhaps there's a bug in tracking output statuses?

jb55 avatar Jan 22 '18 15:01 jb55

I caught clightning trying to create a funding transaction with an invalid input. Perhaps there's a bug in tracking output statuses?

That can't be related to this since these are actually confirming.

cdecker avatar Jan 22 '18 15:01 cdecker

Are the funds that you are attempting to add to lightningd confirmed?

Yes, you could know it is, since you broadcasted it.

How are lightningd and bitcoind communicating?

tinspin avatar Jan 22 '18 16:01 tinspin

Ok, it seems we are getting away from the actual issue here, let's concentrate on fixing the channels getting stuck on confirmation here.

cdecker avatar Jan 22 '18 17:01 cdecker

Could one of the affected users please upload a full debug log for examination? I'm trying to reproduce the issue, but without any luck so far. Even my channel to 02aeb693e2dfb2f890c65dcf27e6eb7d52dd3e4f7b74ce5fe646675793625f9b51 seems to be working fine.

cdecker avatar Jan 22 '18 18:01 cdecker

I didn't start my lightningd with --log-level=debug when I had that problem. If I stop it now and restart it with this flag, will it help you?

otaviobonder avatar Jan 22 '18 18:01 otaviobonder

Would have been nicer to actually see the problem while it happens. But we can try, channels should reconnect automatically, and we should be able to at least see if we are still stuck or if it resolves itself in your case (others have reported that restarting doesn't help, but it might in your case).

cdecker avatar Jan 22 '18 18:01 cdecker

log.txt

andrewtoth avatar Jan 22 '18 18:01 andrewtoth

I've restarted multiple times and it didn't solve the problem. Now I'm with more problems when I tried to close other channels. I will restart my node with this flag and post the log here

otaviobonder avatar Jan 22 '18 18:01 otaviobonder

lightning_gossipd(1528): TRACE: Received channel_update for channel ID lightning_gossipd(1528): TRACE: Replacing existing update lightning_gossipd(1528): TRACE: Deferring update for pending channel ID lightning_gossipd(1528): TRACE: Received node_announcement for node OTHER_ID lightning_gossipd(1528): TRACE: Node not found, was the node_announcement preceded by at least channel_announcement?

Over and over again.

I'm not getting any blocks or anything.

tinspin avatar Jan 22 '18 18:01 tinspin

lightning_gossipd(1528): TRACE: Received channel_update for channel lightning_gossipd(1528): TRACE: Replacing existing update lightning_gossipd(1528): TRACE: Deferring update for pending channel

That's ok, these are incoming gossip messages from your peers.

cdecker avatar Jan 22 '18 18:01 cdecker

Note my node also ran into #632 so the logs will also show issues related to that.

andrewtoth avatar Jan 22 '18 18:01 andrewtoth

log.txt

otaviobonder avatar Jan 22 '18 19:01 otaviobonder

@andrewtoth @otaviobps Thanks for the logs, I figured it out. Patch in CI system now...

rustyrussell avatar Jan 25 '18 11:01 rustyrussell

Great! It's always nice to help you. You guys are doing an extraordinary job!

otaviobonder avatar Jan 25 '18 12:01 otaviobonder

@rustyrussell I pulled the latest, rebuilt and restarted. The issue persists. I've attached the latest logs. log.txt

andrewtoth avatar Jan 25 '18 23:01 andrewtoth

Just checked now and suddenly the channel is CHANNELD_NORMAL. Not sure what happened, as I didn't restart. Let me know if you want updated logs. Thanks!

andrewtoth avatar Jan 27 '18 04:01 andrewtoth

I have got this very same issue. Any idea how to solve it?

satoshi-ninja avatar Jan 27 '18 16:01 satoshi-ninja

@satoshi-ninja what version are you running? Could you share the output of lightning-cli getinfo?

cdecker avatar Jan 27 '18 16:01 cdecker

Hi @cdecker ! This is the output of my lightning-cli getinfo.

{ "id" : "025ff8b6e43e88b545b11c441ffaecd32cecaaa57633889f9ae1f2ddec92c69783", "port" : 9735, "address" : [ { "type" : "ipv6", "address" : "2001:980:2ce6:1:a00:27ff:fefb:83f4", "port" : 9735 } ], "version" : "v0.5.2-2016-11-21-1704-gd36fa33", "blockheight" : 171414, "network" : "bitcoin" }

satoshi-ninja avatar Jan 28 '18 09:01 satoshi-ninja