You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Start cardano-wallet server and wait for ~20 seconds
Expected behavior
Either cardano-wallet server should infinitely listen or fail more gracefully after some timeout.
Actual behavior
$ cardano-wallet server
[INFO] waiting for connection to the node...
[INFO] waiting for connection to the node...
[INFO] waiting for connection to the node...
[INFO] waiting for connection to the node...
[INFO] waiting for connection to the node...
.......
[INFO] waiting for connection to the node...
[INFO] waiting for connection to the node...
[INFO] waiting for connection to the node...
cardano-wallet: ErrNetworkTipNetworkUnreachable (ErrNetworkUnreachable "HttpExceptionRequest Request {\n host = \"localhost\"\n port = 8080\n secure = False\n requestHeaders = [(\"Accept\",\"text/plain\")]\n path = \"/testnet/tip\"\n queryString = \"\"\n method = \"GET\"\n proxy = Nothing\n rawBody = False\n redirectCount = 10\n responseTimeout = ResponseTimeoutDefault\n requestVersion = HTTP/1.1\n}\n (ConnectionFailure Network.Socket.connect: <socket: 11>: does not exist (Connection refused))")
Resolution Plan
Handle errors as they arrive in the application instead of using unsafe code runners.
Networking errors now gracefully fails with a nice and colorful error message, including a few hints to guide users in their debugging.
$ cardano-wallet-jormungandr serve --genesis-hash 1234
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 14:58:05.58 UTC] Wallet backend server starting...
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 14:58:05.58 UTC] Running as v2019.6.24
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 14:58:05.58 UTC] Node is Jörmungandr on testnet
[iohk.cardano-wallet.serve.database:Notice:ThreadId 4] [2019-07-09 14:58:05.59 UTC] 13 migrations were applied to the database.
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 14:58:05.60 UTC] Waiting for Jörmungandr to be ready on tcp/8080
[iohk.cardano-wallet.serve:Alert:ThreadId 4] [2019-07-09 14:58:06.60 UTC] Waited too long for Jörmungandr to become available. Giving up!
Hint (1): If you're launching the wallet server on your own, double-check that Jörmungandr is up-and-running and listening on the same port given to '--node-port' (i.e. tcp/8080).
Hint (2): Should you be starting from scratch, make sure to have a good-enough network connection to synchronize the first blocks in a timely manner.
$ cardano-wallet-http-bridge serve
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 14:58:25.13 UTC] Wallet backend server starting...
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 14:58:25.13 UTC] Running as v2019.6.24
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 14:58:25.13 UTC] Node is Http-Bridge on testnet
[iohk.cardano-wallet.serve.database:Notice:ThreadId 4] [2019-07-09 14:58:25.14 UTC] 13 migrations were applied to the database.
[iohk.cardano-wallet.serve:Info:ThreadId 4] [2019-07-09 14:58:25.15 UTC] Waiting for http-bridge to be ready on tcp/8080
[iohk.cardano-wallet.serve:Alert:ThreadId 4] [2019-07-09 14:58:26.15 UTC] Waited too long for http-bridge to become available. Giving up!
Hint (1): If you're launching the wallet server on your own, double-check that http-bridge is up-and-running and listening on the same port given to '--node-port' (i.e. tcp/8080).
Hint (2): Should you be starting from scratch, make sure to have a good-enough network connection to synchronize the first blocks in a timely manner
Perhaps worth having one or two automated tests regarding this, though the actual time-out is ~60 seconds... And that's not something we are free to tweak at the command-line level. Perhaps a manual test would be fine here?
The text was updated successfully, but these errors were encountered:
Context
Steps to Reproduce
Start
cardano-wallet server
and wait for ~20 secondsExpected behavior
Either
cardano-wallet server
should infinitely listen or fail more gracefully after some timeout.Actual behavior
Resolution Plan
PR
master
QA
The text was updated successfully, but these errors were encountered: