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

Problems when starting peerswapd #274

Open
YusukeShimizu opened this issue Jan 17, 2024 · 0 comments
Open

Problems when starting peerswapd #274

YusukeShimizu opened this issue Jan 17, 2024 · 0 comments

Comments

@YusukeShimizu
Copy link
Contributor

YusukeShimizu commented Jan 17, 2024

Background

Failure in peerswapd startup depending on lnd startup status.
Sometimes hangs indefinitely and sometimes the process is terminated.

Hangs indefinitely

It occurs when the lnd gRPC server is not up.
Hangs while waiting for DialContext to connect.

Reason

Because the DialContext is running in blocking mode and there is no context timeout.

Plan for improvement

I think it could have a certain time limit, and if it can't connect, it could output a log and terminate.

Process terminated

Occurs when unable to connect to lnd server.

[INFO] PeerSwap LND starting up with commit 600c73d8600c8bdf6226edf027cd9578e24e3978 and cfg: Host localhost:42069, ConfigFile peerswap.conf, Datadir .peerswap, Bitcoin enabled: true, Lnd Config: host: localhost:10009, macaroonpath admin.macaroon, tlspath tls.cert, elements: elements: rpcuser: admin1, rpchost: http://127.0.0.1/, rpcport 18884, rpcwallet: swaplnd, liquidswaps: true
2024/01/10 08:06:41 [INFO] DB version: v0.2, Protocol version: 3
2024/01/10 08:06:42 [DEBUG] [grpc_conn]: grpc_retry attempt: 0, got err: rpc error: code = Unknown desc = waiting to start, RPC services not available

Reason

When the error occurs, the process of peerswapd is terminated immediately without retry.

plan for improvement

When the said error occurs, how about trying to retry a certain number of times, since it is likely to be recovered by retrying?
RetryCodesWithMsg containing waiting to start, RPC services not available, etc.

@YusukeShimizu YusukeShimizu changed the title Fixing problems when starting peerswapd Problems when starting peerswapd Jan 17, 2024
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

No branches or pull requests

1 participant