Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to startup: account alraedy exists #372

Closed
kornpow opened this issue Jun 14, 2022 · 1 comment · Fixed by #373
Closed

Unable to startup: account alraedy exists #372

kornpow opened this issue Jun 14, 2022 · 1 comment · Fixed by #373

Comments

@kornpow
Copy link

kornpow commented Jun 14, 2022

I have recently recovered a Pool account and was attempting to fund it.
I think I attempted to fund it once (pool account new), but had no balance in my Lightning node, so I added coins to my node and attempting the funding process again, pool account new.

It gave me an error saying that a funding event was already in progress. Which I then looked at using CLI

{
	"accounts": [
		{
			"trader_key": "{my_trader_key}",
			"outpoint": "0000000000000000000000000000000000000000000000000000000000000000:0",
			"value": 10000000,
			"available_balance": 10000000,
			"expiration_height": 745017,
			"state": "PENDING_OPEN",
			"latest_txid": "0000000000000000000000000000000000000000000000000000000000000000"
		}
	]
}

I thought it was weird, so I stopped pool, and restarted and then this error started to occur, preventing me from starting the daemon.

rpc error: code = Unknown desc = account alraedy exists

Expected behavior

Actual behavior

The daemon does not start up

To reproduce

System information

Standalone

0.5.6-alpha commit=v0.5.6-alpha
self-compiled

x86 linux

ubuntu 20.04

2022-06-14 09:20:21.391 [INF] POOL: Version: 0.5.6-alpha commit=v0.5.6-alpha
2022-06-14 09:20:21.391 [INF] LNDC: Creating lnd connection to {connect url}
2022-06-14 09:20:21.392 [INF] LNDC: Connected to lnd
2022-06-14 09:20:21.536 [INF] LNDC: Waiting for lnd to unlock
2022-06-14 09:20:21.672 [INF] LNDC: Wallet state of lnd is now: Lnd main server is ready for requests
2022-06-14 09:20:21.827 [INF] LNDC: lnd version: v0.14.3-beta, build tags 'experimental,monitoring,autopilotrpc,chainrpc,invoicesrpc,routerrpc,signrpc,walletrpc,watchtowerrpc,wtclientrpc'
2022-06-14 09:20:21.827 [INF] LNDC: Using network mainnet
2022-06-14 09:20:21.827 [INF] LNDC: Waiting for lnd to be fully synced to its chain backend, this might take a while
2022-06-14 09:20:22.045 [INF] LNDC: lnd is now fully synced to its chain backend
2022-06-14 09:20:22.118 [INF] POOL: Auction server address: pool.lightning.finance:12010
2022-06-14 09:20:22.118 [INF] CLDB: Checking for schema update: latest_version=1, db_version=1
2022-06-14 09:20:22.118 [INF] RPCS: Starting trader server
2022-06-14 09:20:22.254 [INF] RPCS: Connected to lnd node {node_alias} with pubkey {pubkey}
2022-06-14 09:20:22.538 [ERR] AUCT: [/poolrpc.ChannelAuctioneer/InitAccount]: rpc error: code = Unknown desc = account alraedy exists
2022-06-14 09:20:22.538 [DBG] LNDC: Closing lnd connection
2022-06-14 09:20:22.538 [DBG] LNDC: Wait for client to finish
2022-06-14 09:20:22.538 [DBG] LNDC: Wait for chain notifier to finish
2022-06-14 09:20:22.538 [ERR] ACCT: Unable to receive block notification: rpc error: code = Canceled desc = grpc: the client connection is closing
2022-06-14 09:20:22.538 [DBG] LNDC: Wait for invoices to finish
2022-06-14 09:20:22.538 [DBG] LNDC: Wait for router to finish
2022-06-14 09:20:22.538 [DBG] LNDC: Lnd services finished
2022-06-14 09:20:22.538 [DBG] LNDC: Lnd services finished
2022-06-14 09:20:22.538 [INF] AUCT: Shutting down auctioneer client
unable to start server: unable to start account manager: unable to resume account {account hex}: rpc error: code = Unknown desc = account alraedy exists
@guggero
Copy link
Member

guggero commented Jun 14, 2022

Discussed offline. Connected lnd node was restored as well and is at account key 0. We need to update the account recovery to bump the account key derivation index to at least the last recovered account's ID.

guggero added a commit that referenced this issue Jun 14, 2022
Fixes #372.
This commit fixes the issue that if the lnd node the trader client is
connected to was also restored from seed, it is starting at account key
derivation index 0. So when recovering accounts we need to make sure we
re-derive the right number of keys from the wallet in order to allow
properly creating new accounts with the recovered node.
guggero added a commit that referenced this issue Jun 14, 2022
Fixes #372.
This commit fixes the issue that if the lnd node the trader client is
connected to was also restored from seed, it is starting at account key
derivation index 0. So when recovering accounts we need to make sure we
re-derive the right number of keys from the wallet in order to allow
properly creating new accounts with the recovered node.
guggero added a commit that referenced this issue Jun 15, 2022
Fixes #372.
This commit fixes the issue that if the lnd node the trader client is
connected to was also restored from seed, it is starting at account key
derivation index 0. So when recovering accounts we need to make sure we
re-derive the right number of keys from the wallet in order to allow
properly creating new accounts with the recovered node.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants