1. Create a scheduled event for a capture agent (tested with Galicaster 2.x)
2. Capture agent transitions to recording
3. Error is logged on admin node
Associated links
[1] The line of the NullPointer from missing workflowService.
https://bitbucket.org/opencast-community/matterhorn/src/fca080ec382138d054654c9cdb3d9bb022645fba/modules/matterhorn-capture-admin-service-impl/src/main/java/org/opencastproject/capture/admin/impl/CaptureAgentStateServiceImpl.java?at=r%2F2.2.x&fileviewer=file-view-default#CaptureAgentStateServiceImpl.java-649
[2] The Commit removing the workflow service wiring from capture admin
https://bitbucket.org/opencast-community/matterhorn/commits/43895fb974aed3235b485590beedebf4179bcb68#chg-modules/matterhorn-capture-admin-service-impl/src/main/resources/OSGI-INF/capture-admin-service.xml
From a brief test on a 2.2.x system, the Admin UI does seem to be showing the correct state of events while they are recording, i.e. if you schedule an event, the CA starts recording, and you filter on Status: Recording in the Admin UI, you get the event currently recording. If the CA isn't online and never started recording, the event doesn't show as recording.
Here's the stack trace you get from this, when a CA transitions from idle to recording (capturing) for a scheduled recording:
2017-01-09 14:12:53,104 | WARN | (LogUtils:365) - Application {http://endpoint.admin.capture.opencastproject.org/}CaptureAgentStateRestService has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)[120:org.apache.cxf.bundle-jaxrs:2.2.9]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)[120:org.apache.cxf.bundle-jaxrs:2.2.9]
(omitted for brevity)
Caused by: java.lang.NullPointerException
at org.opencastproject.capture.admin.impl.CaptureAgentStateServiceImpl.updateWorkflow(CaptureAgentStateServiceImpl.java:717)
at org.opencastproject.capture.admin.impl.CaptureAgentStateServiceImpl.setRecordingState(CaptureAgentStateServiceImpl.java:670)
at org.opencastproject.capture.admin.endpoint.CaptureAgentStateRestService.setRecordingState(CaptureAgentStateRestService.java:414)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_92]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_92]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_92]
at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_92]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)[120:org.apache.cxf.bundle-jaxrs:2.2.9]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)[120:org.apache.cxf.bundle-jaxrs:2.2.9]
... 91 more
Adding back Description from Karen which got lost when I changed the issue type to a Bug:
1. The CaptureAgentStateServiceImplTest passes non-long recording ids in it's JUNITS, "Recording1", and misses the now missing workflow Service in line #649 of the impl "workflowService.getWorkflowById(Long.parseLong(recordingId));"
Change the "Recording1" to "101" in the JUNIT to catch the NullPointer.
/modules/matterhorn-capture-admin-service-impl/src/test/java/org/opencastproject/capture/admin/impl/CaptureAgentStateServiceImplTest.java
2. The capture admin service formerly (v1.x) updated the workflow state of the scheduled recording. But in OC 2.2x the workflow service is not available for scheduled recordings, so I don't know what the capture admin service is supposed to now update, the messaging service? The logic of sending status needs to be re-addressed by the Capture API team
3. The workflow service references need to be fully removed from the capture admin code if it cannot update workflows for scheduled recordings.