If lnd is restarted (either manually or by supervisord) xud status for lndbtc is stuck at lnd-BTC is Unlocked even though lndbtc is up and running fine. xud restart fixes this.
Is lnd unlocked manually or by xud after it is restarted?
I also had this issue and used xucli unlock
Updates? @sangaman
I reproduced this yesterday on testnet with full-nodes.
Steps:
lnd-xTC is UnlockedWhereas they were unlocked and running just fine, responding to all calls I tested.
SO, I think it's ok to go for the sledge hammer restart L1/L2 client-way via xud-docker if clients don't come up properly. BUT I think if the status is not being detected correctly by xud - we should fix this. Here the only solution is to restart xud, which is never nice and potentially cancelling/failing orders.
Here my xud-docker testnet full setup showing LND's stuck in lnd-xTC is Unlocked within xud:
testnet > status
โโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SERVICE โ STATUS โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ bitcoind โ Ready โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ litecoind โ Ready โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ geth โ Syncing 99.99% (7715612/7715737) โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ lndbtc โ Ready โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ lndltc โ Ready โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ raiden โ Container running โ
โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ xud โ Waiting for lndbtc, lndltc, raiden โ
โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
testnet > getinfo
General XUD Info
โโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Status โ LND-BTC: lnd-BTC is Unlocked โ
โ โ LND-LTC: lnd-LTC is Unlocked โ
โ โ Raiden: connect ECONNREFUSED 10.0.2.6:500 โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Alias โ CubeAcoustic โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Node Key โ 036c0742ac1dd74a81479ca9daf6964302def944f8a393cd7064048fa48b82e7b6 โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Address โ 036c0742ac1dd74a81479ca9daf6964302def944f8a393cd7064048fa48b82e7b6 โ
โ โ @5lfnxmuzqonpcx7uno3kvzilwirp5ms2rmrgd7lbtrsk35c7yxnmliad.onion:18885 โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Network โ testnet โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Version โ 1.0.0-beta.2-f75f94c-dirty โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Peers โ 6 โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Pairs โ 4 โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Own orders โ 0 โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Peer orders โ 0 โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Pending swaps โ [] โ
โโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Raiden info:
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Status โ connect ECONNREFUSED 10.0.2.6:5001 โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Version โ โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Address โ โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Channels โ Active: 0 | Pending: 0 | Closed: 0 โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Network โ raiden testnet โ
โโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
LND-BTC Info:
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Status โ lnd-BTC is Unlocked โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Version โ โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Address โ โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Alias โ โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Channels โ Active: 0 | Pending: 0 | Closed: 0 โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Network โ โ
โโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
LND-LTC Info:
โโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Status โ lnd-LTC is Unlocked โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Version โ โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Address โ โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Alias โ โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Channels โ Active: 0 | Pending: 0 | Closed: 0 โ
โโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Network โ โ
โโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
I haven't had any success at reproducing this, unfortunately, starting from testnet docker and waiting for bitcoind/litecoind to sync then unlocking.
However, I stepped closely through the entire flow of unlocking lnd and setting the status to connected and I suspect a possible culprit. One of the first things we do after we make a successful GetInfo call to lnd, but before we update the client's status to Connected, is we call the logic to update the capacity for that client. It's done this way so that we know how much capacity we have for that currency before we attempt to start using it.
For lnd this involves a ChannelBalance call and a ListChannels call. If either of these two calls hang, then xud will never finish setting the status to connected. Since we're making these calls almost immediately after unlocking lnd, I wouldn't be shocked if lnd may not be fully initialized nor ready (maybe it's still trying to figure out whether local channels still exist, for instance) at this point and fails to respond. Since I haven't reproduced yet, I can't say this is what's happening for sure, but that's my suspicion.
I opened #1493 which is a quick fix that makes sure we don't wait more than a few seconds for the first attempt to update capacity immediately after lnd is unlocked. I'd be interested to see if that makes the issue go away for you.
I tested this with xud master 1e20723 , this is still on. Since this prevents simnet from getting channels we have to bump this to P0 @sangaman :
simnet-1: Opening BTC channel to SuspectNaive (02d50056c51365f4c7288485074096eb4a9c005577b2edaaff4dc04763a6c49526)
simnet-1: Could not open BTC channel to SuspectNaive (02d50056c51365f4c7288485074096eb4a9c005577b2edaaff4dc04763a6c49526): rpc error: code = Unknown desc = failed to open channel with nodePubKey: 02d50056c51365f4c7288485074096eb4a9c005577b2edaaff4dc04763a6c49526, currency: BTC, amount: 500000000, message: peer not connected to swap client
I tested this with xud master
1e20723, this is still on. Since this prevents simnet from getting channels we have to bump this to P0 @sangaman :simnet-1: Opening BTC channel to SuspectNaive (02d50056c51365f4c7288485074096eb4a9c005577b2edaaff4dc04763a6c49526) simnet-1: Could not open BTC channel to SuspectNaive (02d50056c51365f4c7288485074096eb4a9c005577b2edaaff4dc04763a6c49526): rpc error: code = Unknown desc = failed to open channel with nodePubKey: 02d50056c51365f4c7288485074096eb4a9c005577b2edaaff4dc04763a6c49526, currency: BTC, amount: 500000000, message: peer not connected to swap client
Have you confirmed that the peer here is running a version of xud with the patch related to this issue? Are there any other issues on that node? It'd be interesting to see the logs from SuspectNative if you have those.
@kilrau Should we close this issue, or is this still something you're experiencing?
No, this was solved by the restarts we implemented in https://github.com/ExchangeUnion/xud-docker/pull/429. I already put the closing statement there and it will automatically close this issue here once it gets merged into master.
No need to do anything :)