on 19-Dec-201614:28 - edited on 05-Jun-202322:44 by JimmyPackets
Your iControl REST GET request reports 500 error after a considerable delay. The resource in question is verified present and obtainable at least from the equivalent tmsh command. All other resources can be accessible using the same userID/password but just THIS resource fails (curiouser and curiouser).
This error may occur when the response contains illegal characters. A workaround is to create a bash script that sanitizes the data, and invoke it using
HTTP response status code 500 (Internal Server Error) is received for a GET request after a considerable delay (say, 30s). For example,
Other similar requests work perfectly fine, so you are quite sure that you have used correct userID/password, management port, and curl (HTTP) command. You can get the same data by running the equivallent tmsh command, so you are sure that the target resource is present. For example, for
tmsh list ltm virtual vs
The issue here is that the response JSON data contains characters that are not permitted in JSON. To verify, dump the data from tmsh in hexadecimal.
# tmsh list ltm <virtual> | od -t x1c
0000040 20 64 65 73 63 72 69 70 74 69 6f 6e 20 54 65 73
d e s c r i p t i o n T e s
0000060 74 ff 44 61 74 61 0a 20 20 20 20 64 65 73 74 69
t 377 D a t a \n d e s t i
The above example indicates that the Description field of the virtual server contains 0xFF (333 in octal). The presence of such illegal character causes the iControl REST framework to discard the data and retry again. This retry is the reason for the "considerable delay".
Obviously, first thing to do is to remove any suspicious characters.
If it cannot be done, write a script that obtains the data directly from the equivallent tmsh command and sanitise the data. Then, call the script using the iControl REST node
. For example, one can use
to sanitize the output of a tmsh command like the one below:
Unfortunately, the output is not in JSON format: You need to add a parser function in the script if necessary.
When the response JSON data contains illegal characters, iControl REST request fails after long delay. To workaround it, write a script that sanitises the data first and call it using
. The workaround is handy when you cannot fix the resource data. iControl REST allows you to control multiple remote BIG-IP entities easily. If you are interested in the feature, please read the iControl REST Home.