Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
Description
Current Situation
- The Running Task Log provides live monitoring of tasks.
- Originally, the system used an event-based approach, where events were generated by the History Service.
- This was replaced by a file-based approach (
JOC-1821), which works reliably in most environments.- In some Windows environments, the file-based approach still causes unexpected Java crashes in ntdll.dll.
- This appears to be due to how the log file is accessed and deleted by multiple threads over time, which can lead to invalid file handles.
Desired Behaviour
- Introduce a configuration property running_task_log_event_based in joc.properties to select the log handling mode.
- Supported values:
- false file-based polling
- true event-based handling
- Default values per OS:
- Unix-based: false
- Windows: false
- Users who are affected by the issue can add the
running_task_log_event_based=truesetting to the <jetty-base>/resources/joc/joc.properties file. A restart of the JOC Cockpit is required for the change to take effect.
Test Instructions
- Check default behaviour
- Check joc.log
- find start info: ... Running Task Log = file-based
- Check service-history.log
- find start info: running_task_log_event_based=false
- Check joc.log
- Manually adjust <jetty-base>/resources/joc/joc.properties
- File-based mode
- Add running_task_log_event_based=false
- Configure JOC Cockpit to use DEBUG level:
- Edit resources/log4j2.xml and set both RootLogLevel and JocLogLevel to DEBUG
- Perform JOC Cockpit restart
- Run a workflow and open/close a running order/task log
- Check joc-debug.log
- find DEBUG lines for running task log threads like:
- [runningTaskLogMonitor][historyId=...][file-based]..
- [runningTaskLogMonitor][historyId=...][thread=running-task-log-...]
- find DEBUG lines for running task log threads like:
- Check joc-debug.log
- Recheck using multiple browser sessions - expected behaviour: running log is displayed normally across different windows.
- Event-based mode
- Change running_task_log_event_based=true
- Perform JOC Cockpit restart
- Check joc.log: find start info: Running Task Log = event-based
- Check service-history.log: find start info: running_task_log_event_based=true
- Run a workflow and open/close a running order/task log
- Check joc-debug.log
- find DEBUG lines for running task log
- [runningTaskLogMonitor][historyId=...][event-based]..
- find DEBUG lines for running task log
- Recheck using multiple browser sessions- expected behaviour: running log is displayed normally across different windows
- Check joc-debug.log
- File-based mode
- Execute JOC Update
- Ensure that the running_task_log_event_based setting was not changed or removed by the installer.