Closed GordianLN closed 2 years ago
Sounds like a weird interaction with db.postgres.timeout=20s
. Can you try if setting the timeout to 0 allows you to unlock the wallet normally?
What do you know, it does start by setting the timeout to 0, I was able to test once again on-chain and off-chain recovery, this time on postgres. What should be the role of the timeout in this case?
From journalctl I now notice long bursts (tens of lines each time) of:
[ERR] RPCS: [/lnrpc.Lightning/GetTransactions]: failed to connect to
host=127.0.0.1 user=bitcoin database=bitcoin: server error (FATAL: sorry, too many clients already (SQLSTATE 53300))
You need to increase the number of allowed connections (I think it's -N xxx
, so set -N 500
as we do in our integration tests) until this is merged: https://github.com/lightningnetwork/lnd/pull/5992
Background
Following #5975, after compiling lnd from source with postegres enabled, I am still not able to start lnd; database tables get sometimes initialized but I cannot get a working instance out of them.
Your environment
lnd
0.14rc3uname -a
on *Nix) Linux 5.10.63-v8+ # 1459 SMP PREEMPT ** aarch64 GNU/Linuxbitcoind
,Steps to reproduce
Compiled as per https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md#building-a-development-version-from-source I edited lnd/make/release_flags.mk adding kvdb_postgres to tags, and commenting out any platform except linux arm64. Sidenote: I am a newbie, I spent quite a deal of time to reach this point, having to delve into code and several searches... a little fast addition to the docs could save inexperienced people like me a great deal of suffering. I just made a pull request of it: https://github.com/lightningnetwork/lnd/pull/5982 Relevant config:
Expected behaviour
A node is started from scratch, I can recover from SCB, lnd works on a postgres backend.
Actual behaviour
I get this in journalctl a few times:
Then, at the Nth iteration, without any intervention from my part, I get:
I run lncli create to recover funds from previous installation's seed, I enter known seed, passphrase, look ahead, at the end of which I get shown the seed again, and right after,
[lncli] rpc error: code = Unavailable desc = error reading from server: EOF
, in journal the previous logs are followed by:Database tables have been initialized, as shown in here after running psql from bitcoin user cli: