lightninglabs/pool

Unable to connect to the auctioneer (`no order found`)

positiveblue opened this issue · 2 comments

Describe the issue
Some users are unable to trade because the auctioneer ends the connection with the client. The client has two accounts that get disconnected after starting poold because of the server getting an unrecoverable error ([/poolrpc.ChannelAuctioneer/OrderState]: rpc error: code = Unknown desc = no order found)

What behavior did you expect?

The user is able to start the client and participate in trades for the orders that the server stored properly. Even if we consider this a critical error (it is a state that should never happen) poold should not stop without given the user a chance to fix the problem (cancel the order? force sync orders with the server?)

What was the actual behavior (provide screenshots if the issue is UI related)?
The user cannot restart the deamon. It exits during the startup process

relevant logs:

2022-04-12 23:10:48.972 [INF] RPCS: Trader server is now active
2022-04-12 23:10:49.043 [INF] POOL: Starting gRPC listener
2022-04-12 23:10:49.044 [INF] POOL: Starting REST proxy listener
2022-04-12 23:10:49.068 [INF] POOL: RPC server listening on [::]:8443
2022-04-12 23:10:49.068 [INF] POOL: REST proxy listening on 127.0.0.1:828
...
2022-04-12 23:10:50.519 [INF] AUCT: Shutting down auctioneer client
2022-04-12 23:10:50.519 [DBG] AUCT: Closing server stream
2022-04-12 23:10:50.519 [TRC] AUCT: Received msg=(*auctioneerrpc.ServerAuctionMessage)(nil), err=rpc error: code = Canceled desc = context canceled from server
2022-04-12 23:10:50.519 [INF] RPCS: Trader server stopping
2022-04-12 23:10:50.519 [INF] AUCT: Shutting down auctioneer client
...
2022-04-12 23:28:39.013 [DBG] LNDC: Closing lnd connection
2022-04-12 23:28:39.013 [DBG] LNDC: Wait for client to finish
2022-04-12 23:28:39.013 [DBG] LNDC: Wait for chain notifier to finish
2022-04-12 23:28:39.014 [DBG] LNDC: Wait for invoices to finish
2022-04-12 23:28:39.014 [DBG] LNDC: Wait for router to finish
2022-04-12 23:28:39.014 [DBG] LNDC: Lnd services finished
2022-04-12 23:28:39.014 [DBG] LNDC: Lnd services finished
unable to start server: unable to fetch order state: rpc error: code = Unknown desc = no order found
...

@positiveblue 's PR got me unstuck yesterday. I had 4 orders in my DB that the order didnt store properly somehow

Will be fixed (at least the startup problem part) by #360.