lightninglabs / pool

Lightning Pool: a non-custodial batched uniform clearing-price auction for Lightning Channel Leases (LCL). An LCL packages up inbound channel liquidity (ability to receive funds) as a fixed income asset with a maturity date expressed in blocks.
MIT License
253 stars 47 forks source link

poold: daemon hangs if unable to complete server handshake #80

Closed Roasbeef closed 3 years ago

Roasbeef commented 4 years ago

I nuked one of our staging servers earlier today, and when I tried to boot up my poold to manual sweep the account after expiry, it just hung as it wasn't able to connect to the server. We should eliminate this assumption, as even if the server isn't reachable for a period of time for w/e reason, users should still be able to interact w/ their local poold daemon.

Roasbeef commented 4 years ago

May be another case all together, but I did a force restart of the server and ran into this with one of my nodes:

2020-09-20 21:00:15.004 [INF] AUCT: Server is shutting down, will reconnect in 5s
2020-09-20 21:00:15.004 [DBG] AUCT: Closing server stream
2020-09-20 21:00:20.006 [DBG] AUCT: Connected successfully to server after 1 tries
2020-09-20 21:00:20.006 [INF] AUCT: Successfully connected to auction server
2020-09-20 21:00:21.049 [ERR] AUCT: [/poolrpc.ChannelAuctioneer/SubscribeBatchAuction]: rpc error: code = Unavailable desc = Bad Gateway: HTTP status code 502; transport: missing content-type field
2020-09-20 21:00:21.049 [TRC] AUCT: Received msg=(*poolrpc.ServerAuctionMessage)(nil), err=rpc error: code = Unavailable desc = Bad Gateway: HTTP status code 502; transport: missing content-type field from server
2020-09-20 21:00:21.049 [ERR] RPCS: Error in server stream: rpc error: code = Unavailable desc = Bad Gateway: HTTP status code 502; transport: missing content-type field
2020-09-20 21:00:21.051 [ERR] AUCT: Error in stream, trying to reconnect: rpc error: code = Unavailable desc = Bad Gateway: HTTP status code 502; transport: missing content-type field
Roasbeef commented 4 years ago

Should've grabbed a profile :/

Steps to (maybe) repro on staging: