Event Notification Template: An error occurred (error code: Server:INTERNAL_SERVERL_ERROR)

I have been trying to access event notification templates via admin console. When I click publishers’ actions, I get this error. In kaltlog, here are errors that I get.

Stack trace:
#0 /opt/kaltura/clients-generator/lib/ClientGeneratorFromXml.php(348): ClientGeneratorFromXml->loadTypesRecursive(‘KalturaLockFile…’)
tail: cannot open ‘/opt/kaltura/log/batch/*.log’ for reading: No such file or directory

2022-03-10 12:29:20 [0.000160] [1337639013] [11] [%context%] [Kaltura_Client_ClientBase->doQueue] DEBUG: execution time for [https://my_url/api_v3/service/eventnotification_eventnotificationtemplate/action/listTemplates]: [0.1383638381958]
2022-03-10 12:29:20 [0.001685] [1337639013] [12] [%context%] [ErrorController->errorAction] ERR: exception ‘Kaltura_Client_Exception’ with message ‘Internal server error occurred’ in /opt/kaltura/app/admin_console/lib/Kaltura/Client/ClientBase.php:937
Stack trace:
#0 /opt/kaltura/app/admin_console/lib/Kaltura/Client/ClientBase.php(953): Kaltura_Client_ClientBase->getKalturaAPIException(‘Internal server…’, ‘INTERNAL_SERVER…’, Array)

2022-03-10 12:29:20 [0.003124] [31.3.1.67] [1814227230] [28] [API] [KalturaStatement->execute] DEBUG: Sql took - 0.0029549598693848 seconds
2022-03-10 12:29:20 [0.007578] [31.3.1.67] [1814227230] [29] [API] [kCoreException->__construct] ERR: exception ‘kCoreException’ with message ‘Event notification template type [10114] not found’ in /opt/kaltura/app/plugins/event_notification/lib/model/EventNotificationTemplatePeer.php:56
Stack trace:
#0 /opt/kaltura/app/plugins/event_notification/lib/model/om/BaseEventNotificationTemplatePeer.php(743): EventNotificationTemplatePeer::getOMClass(Array, 0)

#8 {main}
2022-03-10 12:29:20 [0.000552] [31.3.1.67] [1814227230] [30] [API] [KalturaFrontController->getExceptionObject] CRIT: exception ‘kCoreException’ with message ‘Event notification template type [10114] not found’ in /opt/kaltura/app/plugins/event_notification/lib/model/EventNotificationTemplatePeer.php:56
Stack trace:
#0 /opt/kaltura/app/plugins/event_notification/lib/model/om/BaseEventNotificationTemplatePeer.php(743): EventNotificationTemplatePeer::getOMClass(Array, 0)

Any help on this?

Is everything else working as expected?
Have you made any changes to the event notification templates in KAC?

What does /opt/kaltura/bin/monit summary give you?

No I did not make any changes. Everything is working well. Here is the summary.

Monit 5.25.3 uptime: 5h 49m
┌─────────────────────────────────┬────────────────────────────┬───────────────┐
│ Service Name │ Status │ Type │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ my_url │ OK │ System │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ sphinx │ Initializing │ Process │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ sphinx-populate │ OK │ Process │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ memcache │ OK │ Process │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ apache │ OK │ Process │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ sphinx.conf │ OK │ File │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ searchdbin │ OK │ File │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ populate.conf │ OK │ File │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ populate_script │ OK │ File │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ memcachedconf │ OK │ File │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ memcachedbin │ OK │ File │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ httpd.conf │ OK │ File │
├─────────────────────────────────┼────────────────────────────┼───────────────┤
│ httpd │ OK │ File │
└─────────────────────────────────┴────────────────────────────┴───────────────┘

Is there anyone for help about this issue?

So, something is trying to find Event notification template with type 10114, but it’s not there.

It’s not in in the event_notification_template table?
Run query SELECT id,name,type FROM event_notification_template WHERE type = "10114"\G

What does query SELECT count(*) FROM event_notification_template\G give you?

Could you try to find what’s making that query? If you set log level to DEBUG it should be in:
/opt/kaltura/log/kaltura_api_v3.log

MariaDB [kaltura]> SELECT id,name,type FROM event_notification_template WHERE type = “10114”\G
*************************** 1. row ***************************
id: 1
name: New Item Pending Moderation (Emailing to KMC Moderators)
type: 10114
*************************** 2. row ***************************
id: 2
name: New Item Flagged For Moderation (Emailing to KMC Moderators)
type: 10114
*************************** 3. row ***************************
id: 3
name: New Item Pending Moderation
type: 10114
*************************** 4. row ***************************
id: 4
name: New Item Pending Moderation
type: 10114
*************************** 5. row ***************************
id: 5
name: Entry Approved In Category
type: 10114
*************************** 6. row ***************************
id: 6
name: Entry Rejected In Category
type: 10114
*************************** 7. row ***************************
id: 7
name: Entry Rejected
type: 10114
*************************** 8. row ***************************
id: 8
name: Entry Approved
type: 10114
*************************** 9. row ***************************
id: 9
name: Entry Ready
type: 10114
*************************** 10. row ***************************
id: 10
name: User was added to category as [role]
type: 10114
*************************** 11. row ***************************
id: 11
name: User’s role was changed in category
type: 10114
*************************** 12. row ***************************
id: 12
name: User was removed from category
type: 10114
*************************** 13. row ***************************
id: 13
name: Entry was added to channel
type: 10114
*************************** 14. row ***************************
id: 14
name: Comment was added to entry
type: 10114
14 rows in set (0.02 sec)

MariaDB [kaltura]> SELECT count() FROM event_notification_template\G
*************************** 1. row ***************************
count(
): 233
1 row in set (0.00 sec)

The log file consists so many logs. I could not find exact matches when I make these queries but here are the results of queries.

Ok. I was a bit off.

We actually have the rows from the database. That’s where 10114 is coming from. 10114 is the type of some of your event_notification_profile rows in database.

We’re failing when trying to map the database rows to Classes.
First the eventnotification plugin tries the cache, if it doesn’t find a Class there, it uses KalturaPluginManager to find a Class.

When I have time I’ll try to have a look at how the Class mapping process looks like.

My guess is the KalturaPluginManager fails to instantiate the EventNotification class.

What does this give you:
grep -e EventNotification /opt/kaltura/app/configurations/plugins.ini

Here is the result;

resim