Troubleshooting ExternalControl I/O Request Setup
Troubleshooting ExternalControl I/O Request Setup
What to do when request fails to run?
As a general rule for any IOServer, first troubleshooting action should be to increase the debug level of the server. Debug level can be increased by clicking on ExternalControlBroker component, locating Debug property and setting it to non-zero value. By setting Debug to value 2 causes ExternalControlBroker to print out every request input and and output value into the application output window. By setting Debug to 9 causes to print out additional info about network request headers and encryption layer (when used). By setting Debug to 10 causes to print out byte-by-byte dump of all the data that was sent and received to/from the server during the request.
What to do when LocalCommandRun request fails to run and returns with code 127 or 1?
First, you should increase the Debug level of the ExternalControlBroker to see the actual output of the command run and thus possible error message occurred on launching it.
When the application window contains errors like:
DEBUG: ExternalControlBroker: LocalCommandRun: Received command output ''command' is not recognized as an internal or external command'
or
DEBUG: ExternalControlBroker: LocalCommandRun: Received command output '/bin/sh: 1: command: not found'
then it means, that the command specified in CommandLine can not located by the application target operating system.
In that case verify that:
- the command actually exists on the controller you run the application on
- when the command is shell or batch script (i.e. text file containing commands to be executed by system shell, typically ending with .sh or .bat extension) then make sure that UseShell property is set to 1
- on Linux target, when the command (or shell script) can not be found in the target system PATH then make sure that CommandLine points to it either using full path or by prefixing the "locate from working directory" prefix ./ (like ./myscript.sh). Ensure also that the command or shell script is executable (has executable bit set in command file permissions).
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.