Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Troubleshoot Commit Scripts

After you enable a commit script and issue a commit command, the commit script takes effect immediately.

Table 1 describes some common problems that might occur.

Table 1: Troubleshooting Commit Scripts



The output of the commit check | display detail command does not reference the expected commit scripts.

Make sure you have enabled all the scripts by including the file statement for each one at the [edit system scripts commit] hierarchy level.

The output contains the error message:

error: could not open commit script: 
No such file or directory

Make sure the commit script is present in the /var/db/scripts/commit/ directory on your Junos device.

The following error and warning messages appear:

error: invalid transient change 
generated by commit script: filename 
 warning: 1 transient change was generated 
without [system scripts commit allow-transients]

One of your commit scripts contains instructions to generate a transient change, but you have not enabled transient changes.

To rectify this problem, take one of the following actions:

  • Include the allow-transients statement at the [edit system scripts commit] or the [edit system scripts commit file filename] hierarchy level.

  • Remove the code that generates a transient change from the indicated script.

  • Disable the script in the configuration.

An expected action does not occur.

For example, a warning message does not appear even though the configuration contains the problem that is supposed to evoke the warning message.

  • Make sure you have enabled the script. Scripts are ignored if they are not enabled.

    To enable a script, include the file filename statement at the [edit system scripts commit] hierarchy level.

  • Make sure that the XPath expressions in the script contain valid configuration statements expressed as Junos XML protocol tag elements.

    You can verify the XML hierarchy by issuing the show configuration | display xml operational mode command.

  • Make sure that the programming instructions in the script are referencing the correct context node.

    If you nest one instruction inside another, the outer instruction changes the context node, so the inner instruction must be relative to the outer.

    For example, the <xsl:for-each> instruction contains an XPath expression, which changes the context node. So the nested <xsl:if> instruction uses an XPath expression that is relative to the interfaces/interface[starts-with(name, 't1-')] XPath expression.

    <xsl:for-each select="interfaces/
         interface[starts-with(name, 't1-')]">
    <xsl:if test="not(description)">

The commit operation fails, and an error message in the system log file indicates:

Process (pid,cscript) attempted to exceed RLIMIT_DATA

When committing a configuration that is inspected by one or more commit scripts, you might need to increase the amount of memory allocated to the commit scripts to accommodate the processing of large configurations.

To increase the maximum memory allocated for each executed commit script, configure the max-datasize size statement with an appropriate memory limit in bytes at the [edit system scripts commit] hierarchy level before committing the configuration.