lnd
lnd copied to clipboard
StateUpdateCodeClientBehind watchtower client error
Background
From some days I have this error every 5 minutes on lnd logs
[WRN] WTCL: (legacy) SessionQueue() unable to upload state update to tower=023bad37e5795654cecc69b43599da8bd5789ac633c098253f60494bde602b60bf@iiu4epqzm6cydqhezueenccjlyzrqeruntlzbx47mlmdgfwgtrll66qd.onion:9911: received error code StateUpdateCodeClientBehind in StateUpdateReply for seqnum=1 [ERR] WTCL: (legacy) SessionQueue() unable to send state update: received error code StateUpdateCodeClientBehind in StateUpdateReply for seqnum=1
I've tried to remove the watchtower but I can't
lncli wtclient remove 023bad37e5795654cecc69b43599da8bd5789ac633c098253f60494bde602b60bf [lncli] rpc error: code = Unknown desc = tower has unacked updates
so I just stopped lnd, removed the wtclient.db and added the watchtower again, unlucky after some minutes the error showed up again
Your environment
- lnd 0.15
- Linux 5.15.32-v8+ 1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
- bitcoind 23
Steps to reproduce
Add a watchtower and monitor the logs, I use the one provided by lightningnetwork.plus
Expected behaviour
No errors in the log
Actual behaviour
StateUpdateCodeClientBehind errors each 5 minutes
This indicates that your watchtower client is somehow out of sync or lost track about which updates it has sent to the watchtower. Unsure if there's a way to signal to a watchtower that it should delete a session such that one could start over from scratch.
Would you mind sharing logs for this? Either your node or the watchtower has data loss or a bug
Hi @bota87 - I think this can happen if you perhaps deleted your wtclient.db. Do you recall ever doing that? I know you said in your original post that you did delete it but that was only after encountering this error. Did you perhaps also delete the db before encountering the error?
Hi @ellemouton, yes I had to delete the wtclient.db even before this error. Before using the lightningnetwork.plus watchtower I used many others that became unreliables and deleting the db file was the only solution that worked. Now I'm not using the LN+ WT anymore, using a private WT I don't have this problem so if you want to close the issue is fine for me.
no need to close - other people have run into this too. I just wanted to confirm my suspicion of the cause :) working on fix that will help others in this state
Fixed in https://github.com/lightningnetwork/lnd/pull/7541 :)