Skip to content
Guides & References

Troubleshooting SIE scripts

Match the error an SIE script run reports to its cause, and fix scripts that store the wrong output or show a change on every run.

Script Integration EngineUpdated
On this page

Troubleshooting SIE scripts

When a script run fails, rConfig records a reason. The first table maps each reason to its usual cause. The second covers runs that pass but store the wrong thing. Start by running the script by hand as the web user, as described in Test the way rConfig runs it: most problems show up there straight away.


Why did the run fail?

The reason rConfig gives What it means What to do
Script feature is not enabled in your rConfig environment SIE is switched off on this server. Enable SIE and clear the cache.
Unresolved placeholders found: {...} Text in braces was left after substitution. Check the placeholder spelling (the device ID is {deviceid}), and check the device password doesn’t contain braces.
Script returned a non-zero exit code (N) The script exited with an error and the template has no exit_codes list. Read the stderr shown with the failure. Code 127 usually means the interpreter path is wrong, 2 from Python usually means the script file wasn’t found.
Exit code N matched failure criteria The exit code is in the template’s exit_codes list. As above.
Output contains error pattern: '...' A failure pattern was found in stdout or stderr. If the pattern also appears in good output, make it more specific.
Output missing any required success pattern from: [...] None of the success patterns appeared. The script stopped before printing its marker, or this script prints a marker the template doesn’t list.
A message saying the process exceeded the timeout or exceeded the idle timeout The script ran too long, or printed nothing for too long. Raise timeout or idletimeout in the template, and print progress to stderr during long waits.
Permission denied in stderr The web user can’t read the script or a file it uses. Fix ownership, as in get your server ready for scripts.
It works by hand but fails when scheduled You tested as root, or as yourself. Test as the web user. See which user runs your scripts.

Why is the stored config wrong?

What you see Cause Fix
Login banners, prompts or the command itself in the stored config The session output went to stdout. Common with Expect. Send only the config to stdout. See the Expect recipe.
Progress or debug messages in the stored config They were printed to stdout. Print them to stderr.
--More-- or odd characters in the config The device’s pager was driven but its output wasn’t cleaned. Turn paging off on the device if it allows it, or strip the pager text in the script.
Indentation has gone rConfig trims every stored line. Expected. Flatten indented output, as in the cleaning output recipe.
Every run shows as a change The output includes timestamps, counters or unstable ordering. Remove them in the script or add diff exclusions. See the cleaning output recipe.
An empty config was stored The script printed nothing and exited 0, and the template has no success pattern. Add a success marker. A run that collects nothing should fail, not store nothing.
All the scripts on a device failed when only one broke One failed script fails the whole download for that device. Fix the script that failed, or move it to its own device. See several scripts on one device.

Arguments arrive in the wrong order

A script reads the wrong value from an argument, for example the enable password where it expected the username. The command is split on whitespace, so:

  • An empty value in the middle of the command, usually {device_enable_password} on a device with none set, disappears and moves every later argument up one place. Put optional placeholders last.
  • A value with a space in it, usually a password, becomes two arguments. Change the credential, or have the script read it from a file in the keys folder.

Print the number of arguments the script received to stderr while testing. It shows both problems straight away.


Type to search.