Dwh_plays_views_sync.sh cron not working

Hi,

Two weeks ago, I noticed that the entries plays on KMC were not working. After investigating the issue, I ran the dwh_plays_views_sync.sh and the plays were updated again.

Now I see that the cron does not work or aborts but haven’t found a reason. If I run the script directly as root it works.

I have gone through the dwh logs and can’t find anything related to this issue. I only see this kind of error on cron.log for some entries:

2017-01-17 09:22:00 [global] ERR: exception ‘Exception’ with message ‘Couldn’t find entry [0_4wu69gs2]’ in /opt/kaltura/app/infra/log/KalturaLog.php:83

Any ideas will be appreciated …

Hi @david.eusse,

What happens if you run /opt/kaltura/app/alpha/scripts/dwh/dwh_plays_views_sync.sh as the kaltura user interactively from the shell?

Hi Jess,

Thank you again for your patience. This is apparently the problem:

PHP Class map could not be loaded from path [/opt/kaltura/app/cache//scripts/classMap.cache] file permissions [0600]

classMap.cache had the wrong permissions (owned by root but I don’t know why).

I deleted it and it was recreated and correctly owned by kaltura. I guess it will work tomorrow :slight_smile:

Regards,

David

Hi David,

You’re welcome and I’m happy to help:)
I suggest you recursively permission all files and directories with apache.kaltura, 664 for files and 775 for directories.

# find /opt/kaltura/app/cache -exec chown apache.kaltura {} \;
# find /opt/kaltura/app/cache -type f -exec chmod 664 {} \;
# find /opt/kaltura/app/cache -type f -exec chmod 775 {} \;

Should do the trick. If you’re running on Debian or Ubuntu, it should be www-data.kaltura.