Opencast Moodle problem - urgent

82 views
Skip to first unread message

s.la...@googlemail.com

unread,
Sep 5, 2022, 4:41:07 AM9/5/22
to Opencast Users
Hello there,

we did our upgrade from opencast 8 to now 11 a few days ago. After that I noticed, that the Moodle - Opencast connection seems to be broken partly.
We are using the Moodle Opencast admin tool (v3.11-r8) and the block (v3.11-r9).
The connection test from the admin tool tells me, everything is okay. Username, password and URL of opencast didn't change:

"Opencast API URL test successful. Opencast API User Credentials test successful."

A simple cURL call from command line with the same credentials against the API also completes successful.
Also all recordings (and changes of them) from series in a course are displayed properly, so the connection between those two is working.

BUT, after uploading a recording to moodle, it will not be uploaded to opencast. The log of the scheduled task tells me
"... series exists
Job failed due to: moodle_exception: Es gab ein Problem mit der Verbindung zum Opencast Server. Bitte kontrollieren Sie Ihre Opencast API Zugangsdaten und die Netzwerk-Einstellungen. in /opt/web/html/blocks/opencast/classes/local/apibridge.php:1101
Stack trace:
#0 /opt/web/html/blocks/opencast/classes/local/apibridge.php(1147): block_opencast\local\apibridge->create_event()
#1 /opt/web/html/blocks/opencast/classes/local/upload_helper.php(531): block_opencast\local\apibridge->ensure_event_exists()
#2 /opt/web/html/blocks/opencast/classes/local/upload_helper.php(621): block_opencast\local\upload_helper->process_upload_job()
#3 /opt/web/html/blocks/opencast/classes/local/upload_helper.php(660): block_opencast\local\upload_helper->process_upload_job()
#4 /opt/web/html/blocks/opencast/classes/task/process_upload_cron.php(37): block_opencast\local\upload_helper->cron()
#5 /opt/web/html/lib/cronlib.php(248): block_opencast\task\process_upload_cron->execute()
#6 /opt/web/html/lib/cronlib.php(120): cron_run_inner_scheduled_task()
#7 /opt/web/html/lib/cronlib.php(73): cron_run_scheduled_tasks()
#8 /opt/web/html/admin/cli/cron.php(79): cron_run()
#9 {main}"

After digging deeper, it seems the POST call to "/api/events" fails with http 400.

So this is the point where I don't know any further. I don't know why after upgrading from 8 to 11 this now fails. Where there any changes in between, did I miss any configuration change?

I also tried with our testing systems, both moodle testing and opencast testing and all produce the same error.
By the way, uploading directly in opencast, from opencast studio and feeding in from pyCA capture agent works!

Any help or hints are appreciated.

Best regards
Sven

itz.feli...@gmail.com

unread,
Sep 5, 2022, 5:05:54 AM9/5/22
to Opencast Users, s.la...@googlemail.com
Hi Sven,
AFIK, Moodle supports event uploads through External API and Ingest upload (there is a switch in one of the plugins). Have you, by any chance, updated the Moodle Plugins? IIRC, one had to press "save" again on the page listing the Opencast instances, in order for a database migration to happen. Also, we had to increase the apitimeout in tool_opencast to at least 5 minutes.

There is also an OC LMS group.

Felix

s.la...@googlemail.com

unread,
Sep 6, 2022, 7:51:45 AM9/6/22
to Opencast Users, itz.feli...@gmail.com
Hi Felix,

thanks for your instant response.
Yes I know there is a separate LMS group, but it's mostly german speaking and I think most of the members are reading here too. So there is a higher chance to get a solution in this group.

After a bit digging I found, it works in my testing moodle with the production opencast using the ingest endpoint.
Am I using API instead of the ingest endpoint, I'm getting the following error from opencast:
"Unable to parse event metadata because: 'java.text.ParseException: Unparseable date: "2022-09-06"'"

I can reproduce this error when trying to change recording metadata from moodle via the API.

So maybe this helps figuring it out?

Sven

s.la...@googlemail.com

unread,
Sep 6, 2022, 8:07:28 AM9/6/22
to Opencast Users
I forgot the error log from opencast (when changing the metadata):

2022-09-06T13:25:09,989 | WARN | (PhaseInterceptorChain:501) - Exception in handleFault on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor@3910441e
org.apache.cxf.interceptor.Fault: Unparseable date: "2022-08-30"
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162) ~[!/:3.4.3]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128) ~[!/:3.4.3]
...
Caused by: java.text.ParseException: Unparseable date: "2022-08-30"
at java.text.DateFormat.parse(DateFormat.java:395) ~[?:?]
at org.opencastproject.external.endpoint.EventsEndpoint.updateEventMetadataByType(EventsEndpoint.java:1467) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) ~[!/:3.4.3]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) ~[!/:3.4.3]
... 113 more
2022-09-06T13:25:09,995 | ERROR | (AbstractFaultChainInitiatorObserver:114) - An unexpected error occurred during error handling. No further error processing will occur.
org.apache.cxf.interceptor.Fault: Unparseable date: "2022-08-30"
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162) ~[!/:3.4.3]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128) ~[!/:3.4.3]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) ~[!/:3.4.3]
...
Caused by: java.text.ParseException: Unparseable date: "2022-08-30"
at java.text.DateFormat.parse(DateFormat.java:395) ~[?:?]
at org.opencastproject.external.endpoint.EventsEndpoint.updateEventMetadataByType(EventsEndpoint.java:1467) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) ~[!/:3.4.3]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) ~[!/:3.4.3]
... 113 more
2022-09-06T13:25:09,997 | WARN | (HttpChannel:591) - /api/events/1b5aa3f3-a576-400c-9cf8-f42d4a2ee5f9/metadata
org.apache.cxf.interceptor.Fault: Unparseable date: "2022-08-30"
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128) ~[?:?]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:201) ~[?:?]
...
Caused by: java.text.ParseException: Unparseable date: "2022-08-30"
at java.text.DateFormat.parse(DateFormat.java:395) ~[?:?]
at org.opencastproject.external.endpoint.EventsEndpoint.updateEventMetadataByType(EventsEndpoint.java:1467) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:179) ~[?:?]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) ~[?:?]
... 113 more

Selma Limbo

unread,
Jun 9, 2023, 5:18:10 AM6/9/23
to Opencast Users
Hi,

I know this is old, but were you able to solve your issue?

s.la...@googlemail.com

unread,
Jun 9, 2023, 5:30:21 AM6/9/23
to Opencast Users, jessic...@gmail.com
Hello,

IIRC we switched to "Use ingest upload" in moodle block settings to fix the upload.
But as of now, we do not need this anymore, the problem went a way. Maybe it was an update that fixed it, so unfortunately I can't exactly tell, what fixed it.

Best of luck
Sven
Reply all
Reply to author
Forward
0 new messages