Developer

 View Only
  • 1.  Failing API call (async)

    Posted 12 days ago

    Hello,

    I am trying to use the New Central show command API to retrieve data from a gateway but it is timing out. I check the status of my call and it does eventually say status complete, but it gives a failure reason of 'timed out'. For resource-light commands it works fine, like show clock and show version etc. but I am trying to run 'show datapath session | include Err' which takes a long time to run. It looks like the timeout must be around 30secs as that is the difference between start and end time given in the check show command status API call.

    Is there anything I can do to make this work or extend the relevant timeout?

    Thanks

    Guy



  • 2.  RE: Failing API call (async)

    Posted 12 days ago

    Sounds like a fixed timeout on the Central side at first look, not something you can set in the call. I don't know of a timeout field on the show command task, and the Troubleshooting Tools doc doesn't list a limit either, so I can't prove it, but a flat ~30 secs on every long command fits a service limit.

    The include won't save you any time, the gateway still walks the whole session table and filters after, so it runs as long as the full dump.

    I'd try a smaller command that finishes inside the window:
    -show datapath session counters
    -show datapath session table <client ip>
    -show datapath error counters

    If you need the full table, Remote Console/SSH to the gateway for now. If you have support I'd open a TAC case and ask if that timeout can be raised, otherwise a feature request.

    What are you trying to catch with Err? And how long does that command take from the CLI on that gateway? Also, does a short piped one like show version | include Version come back fine? That would rule out the pipe. Happy to lab it out if you want :)



    ------------------------------
    Dustin Burns
    @Worldcom Exchange, Inc.
    www.wei.com

    - - -
    The comments I post here are my own, and not my employers
    If my post was useful accept solution and/or give kudos
    Personal Blog: www.networkfieldnotes.com
    - - -
    ------------------------------



  • 3.  RE: Failing API call (async)

    Posted 12 days ago

    Thanks for your reply. Yes, smaller commands work with no problem so I think you're right - it's an internal Central timeout 




  • 4.  RE: Failing API call (async)

    Posted 12 days ago
    Edited by KD-804ce1 12 days ago
    The Show Command API currently has a bounded execution window and is intended for operational troubleshooting commands that complete within that timeframe. Commands that require walking large internal tables, such as datapath session information, may exceed this limit. We're interested in understanding the specific troubleshooting workflow you're trying to accomplish, as there may be a better long-term solution than exposing large outputs through a dedicated API or increasing the existing API's timeout. Could you share what information you're looking for from the show datapath session | include Err output?




  • 5.  RE: Failing API call (async)

    Posted 12 days ago

    Thank you for your reply,

    The use case for this was we were asked by TAC to run the datapath command in relation to a case we have open, I wanted to automate this so we could repeatedly run this command and save the output. I currently don't have any other examples of needing to run slow commands like this but we've only recently migrated to Central. I can definitely see the potential for this being an issue in future though, in similar situations.