I am not able to upload videos after upgrade to v12.5

After upgrading to v12.5, when I try uploading videos, I observe that it is stuck on the ‘Converting’ phase when I view the progress on the dashboard. When I check the logs, I see logs like this …

2016-12-03 21:14:19 [0.000246] [197.234.131.182] [1248245733] [30] [API] [kEventsManager::raiseEvent] ERR: exception 'kCoreException' with message 'Dynamic enum not found [scheduleBulkUpload.SCHEDULE_EVENT] for type [BulkUploadObjectType]' in /opt/kaltura/app/alpha/lib/kPluginableEnumsManager.php:167
Stack trace:
#0 /opt/kaltura/app/plugins/schedule/bulk_upload/BulkUploadSchedulePlugin.php(237): kPluginableEnumsManager::apiToCore('BulkUploadObjec...', 'scheduleBulkUpl...')
--
2016-12-03 21:14:20 [0.000693] [197.234.131.182] [1409259253] [39] [API] [KalturaStatement->execute] DEBUG: Sql took - 0.0004119873046875 seconds
2016-12-03 21:14:20 [0.000473] [197.234.131.182] [1409259253] [40] [API] [kCoreException->__construct] ERR: exception 'kCoreException' with message 'Dynamic enum not found [scheduleBulkUpload.SCHEDULE_EVENT] for type [BulkUploadObjectType]' in /opt/kaltura/app/alpha/lib/kPluginableEnumsManager.php:167
Stack trace:
#0 /opt/kaltura/app/plugins/schedule/bulk_upload/BulkUploadSchedulePlugin.php(237): kPluginableEnumsManager::apiToCore('BulkUploadObjec...', 'scheduleBulkUpl...')
--
#12 {main}
2016-12-03 21:14:20 [0.000357] [197.234.131.182] [1409259253] [41] [API] [kEventsManager::raiseEvent] ERR: exception 'kCoreException' with message 'Dynamic enum not found [scheduleBulkUpload.SCHEDULE_EVENT] for type [BulkUploadObjectType]' in /opt/kaltura/app/alpha/lib/kPluginableEnumsManager.php:167
Stack trace:
#0 /opt/kaltura/app/plugins/schedule/bulk_upload/BulkUploadSchedulePlugin.php(237): kPluginableEnumsManager::apiToCore('BulkUploadObjec...', 'scheduleBulkUpl...')
--
2016-12-03 21:14:20 [0.000691] [197.234.131.182] [2085363850] [28] [API] [KalturaStatement->execute] DEBUG: Sql took - 0.00042986869812012 seconds
2016-12-03 21:14:20 [0.000443] [197.234.131.182] [2085363850] [29] [API] [kCoreException->__construct] ERR: exception 'kCoreException' with message 'Dynamic enum not found [scheduleBulkUpload.SCHEDULE_EVENT] for type [BulkUploadObjectType]' in /opt/kaltura/app/alpha/lib/kPluginableEnumsManager.php:167
Stack trace:
#0 /opt/kaltura/app/plugins/schedule/bulk_upload/BulkUploadSchedulePlugin.php(237): kPluginableEnumsManager::apiToCore('BulkUploadObjec...', 'scheduleBulkUpl...')

I’ve tried running ‘/opt/kaltura/bin/kaltura-config-all.sh’ yet no success.
What am i doing wrong?

Hello,

First of all, did you rerun the config scripts post upgrading as explained here?


or for deb:

If not, please do. Assuming you DID run them, I suggest stop Apache and Memcached and then:
clear the cache with:
# find /opt/kaltura/app/cache -type f -exec rm {} ;
then run these scripts:
# php $BASE_DIR/app/generator/generate.php
# $APP_DIR/deployment/base/scripts/installPlugins.php

And restart Apache and Memcached.

All these actions are done as part of the kaltura-base postinst phase but perhaps something went wrong. If you get any errors when running these scripts manually, please post them here.

@jess
Thanks for coming to my rescue. Firstly, I did run all the config scripts as outlined for Centos. I have even tried some tips you shared on a similar issue as follows…

  594  service httpd stop
  595  service kaltura-monit stop
  596  find /opt/kaltura/app/cache/ -type f -exec rm {} \;
  597  php /opt/kaltura/app/generator/generate.php 
  598  service httpd start
  599  service kaltura-monit start

Tailing the logs using this command

tail -f /opt/kaltura/log/*.log /opt/kaltura/log/batch/*.log | grep -A 1 -B 1 --color "ERR:\|PHP\|trace\|CRIT\|\[error\]"

now gives me this output

 ==> /opt/kaltura/log/kaltura_apache_errors.log <==
[Sat Dec 03 22:06:37 2016] [error] [client 197.234.131.182] PHP Warning:  file_get_contents(/opt/kaltura/app/cache//api_v3/classMap.cache): failed to open stream: Permission denied in /opt/kaltura/app/infra/KAutoloader.php on line 415
[Sat Dec 03 22:06:37 2016] [error] [client 197.234.131.182] PHP Class map could not be loaded from path [/opt/kaltura/app/cache//api_v3/classMap.cache] file permissions [0600]

--
2016-12-03 22:06:37 [0.007871] [1796791053] [8] [BATCH] [KalturaClientBase->doQueue] NOTICE: server: [kaltura.yookos.com], session: []
2016-12-03 22:06:37 [0.000168] [1796791053] [9] [BATCH] [KalturaClientBase->doQueue] NOTICE: result (serialized): PHP Class map could not be loaded
2016-12-03 22:06:37 [0.000258] [1796791053] [10] [BATCH] [KScheduleHelper->run] ERR: exception 'Exception' with message 'System is not yet ready - ping failed' in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/batch/batches/KScheduleHelper.class.php(42): KalturaLog::err('System is not y...')
--
==> /opt/kaltura/log/kaltura_apache_errors.log <==
[Sat Dec 03 22:06:42 2016] [error] [client 197.234.131.182] PHP Warning:  file_get_contents(/opt/kaltura/app/cache//api_v3/classMap.cache): failed to open stream: Permission denied in /opt/kaltura/app/infra/KAutoloader.php on line 415
[Sat Dec 03 22:06:42 2016] [error] [client 197.234.131.182] PHP Class map could not be loaded from path [/opt/kaltura/app/cache//api_v3/classMap.cache] file permissions [0600]

--
2016-12-03 22:06:42 [0.172050] [574576929] [8] [BATCH] [KalturaClientBase->doQueue] NOTICE: server: [kaltura.yookos.com], session: []
2016-12-03 22:06:42 [0.000165] [574576929] [9] [BATCH] [KalturaClientBase->doQueue] NOTICE: result (serialized): PHP Class map could not be loaded

==> /opt/kaltura/log/batch/validatelivemediaservers-0-2016-12-03.err.log <==
PHP Fatal error:  Uncaught exception 'KalturaClientException' with message 'failed to unserialize server result
PHP Class map could not be loaded' in /opt/kaltura/app/batch/client/KalturaClientBase.php:401
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(2296): KalturaClientBase->doQueue()
--
==> /opt/kaltura/log/kaltura_apache_errors.log <==
[Sat Dec 03 22:06:52 2016] [error] [client 197.234.175.234] PHP Warning:  file_get_contents(/opt/kaltura/app/cache//api_v3/classMap.cache): failed to open stream: Permission denied in /opt/kaltura/app/infra/KAutoloader.php on line 415, referer: http://kaltura.yookos.com/flash/kmc/v5.40.3/kmc.swf
[Sat Dec 03 22:06:52 2016] [error] [client 197.234.175.234] PHP Class map could not be loaded from path [/opt/kaltura/app/cache//api_v3/classMap.cache] file permissions [0600], referer: http://kaltura.yookos.com/flash/kmc/v5.40.3/kmc.swf

--
==> /opt/kaltura/log/kaltura_apache_errors.log <==
[Sat Dec 03 22:06:53 2016] [error] [client 197.234.131.182] PHP Warning:  file_get_contents(/opt/kaltura/app/cache//api_v3/classMap.cache): failed to open stream: Permission denied in /opt/kaltura/app/infra/KAutoloader.php on line 415
[Sat Dec 03 22:06:53 2016] [error] [client 197.234.131.182] PHP Class map could not be loaded from path [/opt/kaltura/app/cache//api_v3/classMap.cache] file permissions [0600]

--
2016-12-03 22:06:53 [0.007128] [1578181319] [8] [BATCH] [KalturaClientBase->doQueue] NOTICE: server: [kaltura.yookos.com], session: []
2016-12-03 22:06:53 [0.000172] [1578181319] [9] [BATCH] [KalturaClientBase->doQueue] NOTICE: result (serialized): PHP Class map could not be loaded
2016-12-03 22:06:53 [0.000263] [1578181319] [10] [BATCH] [KScheduleHelper->run] ERR: exception 'Exception' with message 'System is not yet ready - ping failed' in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/batch/batches/KScheduleHelper.class.php(42): KalturaLog::err('System is not y...')
--
==> /opt/kaltura/log/kaltura_apache_errors.log <==
[Sat Dec 03 22:06:54 2016] [error] [client 197.234.175.234] PHP Warning:  file_get_contents(/opt/kaltura/app/cache//api_v3/classMap.cache): failed to open stream: Permission denied in /opt/kaltura/app/infra/KAutoloader.php on line 415, referer: http://kaltura.yookos.com/flash/kmc/v5.40.3/kmc.swf
[Sat Dec 03 22:06:54 2016] [error] [client 197.234.175.234] PHP Class map could not be loaded from path [/opt/kaltura/app/cache//api_v3/classMap.cache] file permissions [0600], referer: http://kaltura.yookos.com/flash/kmc/v5.40.3/kmc.swf

--
==> /opt/kaltura/log/kaltura_apache_errors.log <==
[Sat Dec 03 22:07:09 2016] [error] [client 197.234.131.182] PHP Warning:  file_get_contents(/opt/kaltura/app/cache//api_v3/classMap.cache): failed to open stream: Permission denied in /opt/kaltura/app/infra/KAutoloader.php on line 415
[Sat Dec 03 22:07:09 2016] [error] [client 197.234.131.182] PHP Class map could not be loaded from path [/opt/kaltura/app/cache//api_v3/classMap.cache] file permissions [0600]

--
2016-12-03 22:07:09 [0.008771] [750742699] [8] [BATCH] [KalturaClientBase->doQueue] NOTICE: server: [kaltura.yookos.com], session: []
2016-12-03 22:07:09 [0.000203] [750742699] [9] [BATCH] [KalturaClientBase->doQueue] NOTICE: result (serialized): PHP Class map could not be loaded
2016-12-03 22:07:09 [0.000384] [750742699] [10] [BATCH] [KScheduleHelper->run] ERR: exception 'Exception' with message 'System is not yet ready - ping failed' in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/batch/batches/KScheduleHelper.class.php(42): KalturaLog::err('System is not y...')
--
==> /opt/kaltura/log/kaltura_apache_errors.log <==
[Sat Dec 03 22:07:13 2016] [error] [client 197.234.131.182] PHP Warning:  file_get_contents(/opt/kaltura/app/cache//api_v3/classMap.cache): failed to open stream: Permission denied in /opt/kaltura/app/infra/KAutoloader.php on line 415
[Sat Dec 03 22:07:13 2016] [error] [client 197.234.131.182] PHP Class map could not be loaded from path [/opt/kaltura/app/cache//api_v3/classMap.cache] file permissions [0600]

--
2016-12-03 22:07:13 [0.007878] [1091426457] [8] [BATCH] [KalturaClientBase->doQueue] NOTICE: server: [kaltura.yookos.com], session: []
2016-12-03 22:07:13 [0.000169] [1091426457] [9] [BATCH] [KalturaClientBase->doQueue] NOTICE: result (serialized): PHP Class map could not be loaded

==> /opt/kaltura/log/batch/validatelivemediaservers-0-2016-12-03.err.log <==
PHP Fatal error:  Uncaught exception 'KalturaClientException' with message 'failed to unserialize server result
PHP Class map could not be loaded' in /opt/kaltura/app/batch/client/KalturaClientBase.php:401
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(2296): KalturaClientBase->doQueue()
--
==> /opt/kaltura/log/kaltura_apache_errors.log <==
[Sat Dec 03 22:07:16 2016] [error] [client 197.234.131.182] PHP Warning:  file_get_contents(/opt/kaltura/app/cache//api_v3/classMap.cache): failed to open stream: Permission denied in /opt/kaltura/app/infra/KAutoloader.php on line 415
[Sat Dec 03 22:07:16 2016] [error] [client 197.234.131.182] PHP Class map could not be loaded from path [/opt/kaltura/app/cache//api_v3/classMap.cache] file permissions [0600]

--
2016-12-03 22:07:16 [0.007893] [658025717] [8] [BATCH] [KalturaClientBase->doQueue] INFO: server: [kaltura.yookos.com], session: []
2016-12-03 22:07:16 [0.000171] [658025717] [9] [BATCH] [KalturaClientBase->doQueue] INFO: result (serialized): PHP Class map could not be loaded
2016-12-03 22:07:16 [0.000260] [658025717] [10] [BATCH] [KAsyncDropFolderWatcher->getDropFoldersList] ERR: exception 'Exception' with message 'Cannot get drop folder list - failed to unserialize server result
PHP Class map could not be loaded' in /opt/kaltura/app/infra/log/KalturaLog.php:83

What am I still doing wrong. I’m a little concerned about permission denied errors as well

Hello,

Now there is an issue with writing to the cache, probably stemming from the fact you ran these scripts as root so now, /opt/kaltura/app/cache//api_v3/classMap.cache [to name one file] is owned by root as well.
It’s easy to fix, just run:
# chown -R apache.kaltura /opt/kaltura/app/cache
# find /opt/kaltura/app/cache/ -type f -exec chmod 660 {} ;
# find /opt/kaltura/app/cache/ -type d -exec chmod 775 {} ;

Also, you did not mention whether we’re on RHEL/CentOS or Debian/Ubuntu, if Debian Ubuntu, then instead of:
# chown -R apache.kaltura /opt/kaltura/app/cache
it should be:
# chown -R www-data.kaltura /opt/kaltura/app/cache

This should straighten things up.

@jess I’ll try it now and report back. I’m on Centos
You mentioned I should not have run the script as root. How do I correct that? Did I miss something in the update guide?

@jess Looks like it worked! I just uploaded a video and it converted just fine.
Many thanks!!!

So what do I do to prevent this from recurring? The permissions issue I mean?

Hello,

Running the relevant scripts is covered as part of the RPM post install process so it should run automatically, same goes for making sure the permissions on the cache dir are correct.
I only asked you to run it manually in case something is wrong, preventing it from succeeding. One possible explanation is that the DB was down at the time of the upgrade, which is why these actions failed during the upgrade, could this be the case?