Troubleshooting script-related errors

Often you see errors in the exception or application log files that are caused by scripts.

Procedure

Use the following steps to get details on the script causing the errors.

  1. Check whether it is a scheduler error by looking at the corresponding entry in the scheduler_default or scheduler_exception logs. If so, you can research the scheduler log for this issue.
  2. If not, then it is most likely caused by a user action. The user actions can be traced from the from the System Administrator > Audit logs and then selecting the appropriate time when you have experienced this error.
  3. If you need more help, you can also increase the debug level in the appsvr logs and see whether you can get more information about this error. To increase the debug level, perform the following:
    1. Look for the logs directory under the trigo installation directory on the server.
    2. Locate and edit the appsvr.log4j2.xml to change the priority value="debug" for following austin.error.AustinException category.
      <Logger name=" austin.error.AustinException " level="info" additivity="false">
      <AppenderRef ref="EXCEP" />
      </Logger>
      
    3. Save your change. Once this change is done, you should see more information about this error in the appsvr logs, which help you to better locate this error.
  4. You can change the suspect scripts to add the following:
    catchError(e){ 
    ....the entire script goes here..... 
    } 
    wt = createOtherOut("test.out"); 
    wt.println("script="+name of this script); //enter name of this script 
    wt.println("error message = "+e); 
    wt.println("user name = "+getCurrentUserName()); 
    wt.save("temp/test.out"+script_name); //the script name goes here along 
    with any docstore path 
    wt.close();
    This creates a new file for each script run.
    Note: Run only for a short time, as might fill up the logs, and create a memory issue and delete temporary docstore files after your testing is complete.