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

cardano-cli ping: Reduce TCP timeout or add timeout option #4866

Open
liv-io opened this issue Apr 30, 2024 · 0 comments
Open

cardano-cli ping: Reduce TCP timeout or add timeout option #4866

liv-io opened this issue Apr 30, 2024 · 0 comments
Labels
cardano-ping Iessues / PRs related to cardano-ping

Comments

@liv-io
Copy link

liv-io commented Apr 30, 2024

Description

cardano-cli ping takes around 1 minute and 30 seconds (apparently the default TCP timeout) until it exits when specifying a non-existent address, port or offline target.

Steps to Reproduce

  1. Run cardano-cli against a non-existent address, port or offline target:
time cardano-cli ping --host 10.10.10.10 --port 1337 --count 1
  1. Verify the time
real    1m31.542s
user    0m0.003s
sys     0m0.003s

Expected behavior

Ideally, cardano-cli ping would offer an option (--timeout 10) to specify the timeout or exit after a reasonable timeout (maybe 10 seconds).

Actual behavior

cardano-cli ping times out after around 1 minute 30 seconds, which is quite long for working with the tools in scripts.

Workaround

I am currently using the Linux timeout command and can live without this feature being added:

timeout 10 cardano-cli ping --host 10.10.10.10 --port 1337 --count 1

Additional Context

I am using the cardano-cli version from the compiled cardano-node tarball 8.9.2:

  • cardano-node:

    $ cardano-node version
    cardano-node 8.9.2 - linux-x86_64 - ghc-8.10
    git rev 424983fa186786397f5a99539f51710abf62c37b
    
  • cardano-cli:

    $ cardano-cli version 
    cardano-cli 8.20.3.0 - linux-x86_64 - ghc-8.10
    git rev 424983fa186786397f5a99539f51710abf62c37b
    

Please let me know if you need additional information or you want me to test with different cardano-cli versions. Thanks.

@coot coot added the cardano-ping Iessues / PRs related to cardano-ping label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cardano-ping Iessues / PRs related to cardano-ping
Projects
Status: No status
Development

No branches or pull requests

2 participants