Jason_Nance
Sep 25, 2018Nimbostratus
REST Call Timeout - Python SDK
Running 11.6.0 HF5 the following Python SDK call:
mgmt.tm.util.bash.exec_cmd(
command='run',
utilCmdArgs="-c 'tmsh save /sys ucs /var/local/ucs/f5-create-backup-python.ucs'",
)
...throws this exception:
Traceback (most recent call last):
File "", line 1, in
File ".../f5env/lib/python3.6/site-packages/f5/bigip/tm/util/bash.py", line 55, in exec_cmd
return self._exec_cmd(command, **kwargs)
File ".../f5env/lib/python3.6/site-packages/f5/bigip/mixins.py", line 257, in _exec_cmd
self._meta_data['uri'], json=kwargs, **requests_params)
File ".../f5env/lib/python3.6/site-packages/icontrol/session.py", line 287, in wrapper
raise iControlUnexpectedHTTPError(error_message, response=response)
icontrol.exceptions.iControlUnexpectedHTTPError: 400 Unexpected Error: Bad Request for uri: https://my.ltm.com:443/mgmt/tm/util/bash/
Text: '{
"code":400,
"message":"remoteSender:10.1.1.1,
uri:http://localhost:8110/tm/util/bash/,
method:POST ",
"originalRequestBody":"{
\\"utilCmdArgs\\": \\"-c \'tmsh save /sys ucs /var/local/ucs/f5-create-backup-python.ucs\'\\",
\\"command\\": \\"run\\"",
"referer":"10.1.1.1",
"restOperationId":28795163,
"errorStack":[
"java.util.concurrent.TimeoutException: remoteSender:10.1.1.1,
uri:http://localhost:8110/tm/util/bash/,
method:POST ",
"at com.f5.rest.common.RestRequestSender.checkExpiredOperations(RestRequestSender.java:505)",
"at com.f5.rest.common.RestServer.checkAndExpirePendingWorkerOperations(RestServer.java:854)",
"at com.f5.rest.common.RestServer.access$400(RestServer.java:43)",
"at com.f5.rest.common.RestServer$3.run(RestServer.java:822)",
"at com.f5.rest.common.ScheduleTaskManager$2.run(ScheduleTaskManager.java:105)",
"at java.util.TimerThread.mainLoop(Timer.java:555)",
"at java.util.TimerThread.run(Timer.java:505)\\n"
]
}'
I'm using util.bash to make the call because of the old TMOS version. This same script works fine on our other 11.6.0 LTMs - two of them are failing and under much heavier load.
Is there a way to increase this timeout?