08-07-2017 03:25 AM - edited 03-01-2019 03:57 AM
I am trying to delete a file from IOS device through REST northbound API in NSO. I am using live status API to send the request (live-status/ios-stats:exec/_operations/any)
I am sending below request in the body of REST API
<input><args>delete flash:2:c2600-is-mz.123-6a | noprompts</args></input>
I am getting following error response from NSO.
<errors xmlns="http://tail-f.com/ns/tailf-rest-error">
<error>
<error-tag>operation-failed</error-tag>
<error-urlpath>/api/operational/devices/device/10.105.52.236/live-status/ios-stats:exec/any</error-urlpath>
<error-message>External error in the NED implementation for device 10.105.52.236: Read timed out</error-message>
</error>
</errors>
Please let me know if I need to configure anything in the NED.
08-08-2017 06:12 AM
Is 10.105.52.236 your device name? Do other basic REST commands work before trying for a more complex one?
08-08-2017 08:31 AM
Thanks Scott for your response.
yes 10.105.52.236 is our IOS device. With live status API I am able to get show version, show running-config output. But for copy I am getting this error.
Also I am looking for copying files from ftp/tftp server to device. will this same API address this requirement.
08-09-2017 07:31 AM
Hey Santosh,
This is a message that appears when NSO doesn't / cant hear anything back from the device beyond the timeout. Do you know how long the command you are sending should take to run on the device? I have seen this error before when devices hit TCAM or CPU utilization issues and take to long to process information or even when it fails to implement the command we are sending down. So may be of value to make sure the device can process the command properly.
But to answer the question
By default read-timeout is set to 20 seconds and can be modified inside the global-settings container.
Goodluck!
Brandon
08-09-2017 08:13 AM
Global settings changes the global default. The global default can be overridden for devices individually, e.g.
devices device name read-timeout 60
commit
disconnect
Then retry your operation.
08-09-2017 09:58 PM
Hi Brandon,
I am facing this issue where we need to provide a prompt for a cli command. This is delete command, it will not taking significant time to execute. I have execute the same in device and it is executing very fast.
When I am appending the cli command with “noprompts”, I am getting this time out error. I have increase the read-timeout for the device still I am getting the same error. I tried appending the cli with “prompts ENTER” it is working. My problem is, incase of multiple prompt I am trying with “noprompts” and I am getting timeout error.
Thanks & Regards
Santosh Panda
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide