Sometimes you need to have a closer look at synchronization scripts to find out whats wrong. This article shows how to investigate the Exalate errors.
There are two ways to get the feedback from the Exalate app:
- Exalate logging: it doesn't block the synchronization and requires the processor changes to run again.
- Debugging error from the scripts - blocks the issue synchronization and requires Resolve and retry to run again.
- Set up Exalate logging in your Jira
Add the code below into the Incoming sync Create/Change Processor
- Exalate an issue which is not synchronized yet. In this case, it should execute the Create/Change Processor on the Destination Instance.
- Look at the logging and compare it with your expectations
- Unexalate the issue
- Add more logging/fix
- Repeat until the fix
Debugging errors from the scripts
To get more details about values passed in a replica you can use IssueTrackerException class.
Below you can find some examples of the debugging scripts.
Add the exception script into the Create/Change Processor
- Exalate an issue to see a detailed description of the error, which blocks the synchronization.
- Check the details and fix the script.
- Resolve and retry: Once you resolve the error, another synchronization attempt processes. In case you will get an error again, repeat the steps above.
Once the error is resolved successfully, remove the script below from your Create/Change Processor and resolve the error.
How to get only debug logging for the scripts
If you want to debug your scripts, then capturing all com.exalate logging is too much as it also captures all transport protocol details.
You can limit the logging to different levels:
- for only scripts logging use com.exalate.script
- for information how scripts run use com.exalate.processor
For Exalate 4.2 and lower
- for scripts and information how they run use com.exalate.processor
- for Outgoing sync(data filter) scripts use com.exalate.processor.jira.JiraCreateReplicaProcessor
- for Incoming sync for new issues(create processor) scripts use com.exalate.processor.jira.JiraCreateIssueProcessor
- for Incoming sync for existing(change processor) scripts use com.exalate.processor.jira.JiraChangeIssueProcessor
You can test how logging works by adding the code, provided below. It will add 'Hello world' text to the log file.