KMC :: Internal Server Error Occured

After logging in KMC I got the following caption error.

I then ran ‘kaltlog’ after loging out of KMC and then logging back in and got the following errors.

2016-03-06 22:35:15 [0.000268] [69.88.44.114] [1554651178] [26] [API] [myReportsMgr::executeQuery] ERR: exception 'Exception' with message 'Invalid query: Table 'kalturadw.dwh_hourly_partner' doesn't exist' in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/reports/myReportsMgr.class.php(1328): KalturaLog::err('Invalid query: ...')
--
#10 {main}
2016-03-06 22:35:15 [0.000163] [69.88.44.114] [1554651178] [27] [API] [kCoreException->__construct] ERR: exception 'kCoreException' with message 'Invalid query' in /opt/kaltura/app/alpha/apps/kaltura/lib/reports/myReportsMgr.class.php:1330
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/reports/myReportsMgr.class.php(871): myReportsMgr::executeQuery('?SELECT??DATE(D...', Object(mysqli))
--
2016-03-06 22:35:15 [0.000069] [69.88.44.114] [1554651178] [28] [API] [myReportsMgr::executeQueryByType] NOTICE: Invalid query
2016-03-06 22:35:15 [0.000193] [69.88.44.114] [1554651178] [29] [API] [KalturaFrontController->getExceptionObject] CRIT: exception 'kCoreException' with message 'Invalid query' in /opt/kaltura/app/alpha/apps/kaltura/lib/reports/myReportsMgr.class.php:1330
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/reports/myReportsMgr.class.php(871): myReportsMgr::executeQuery('?SELECT??DATE(D...', Object(mysqli))
--

2016-03-06 22:35:15 [0.000178] [69.88.44.114] [1554651178] [43] [API] [myReportsMgr::executeQuery] ERR: exception 'Exception' with message 'Invalid query: PROCEDURE kalturadw.calc_partner_usage_data does not exist' in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/reports/myReportsMgr.class.php(1328): KalturaLog::err('Invalid query: ...')
--
#11 {main}
2016-03-06 22:35:15 [0.000102] [69.88.44.114] [1554651178] [44] [API] [kCoreException->__construct] ERR: exception 'kCoreException' with message 'Invalid query' in /opt/kaltura/app/alpha/apps/kaltura/lib/reports/myReportsMgr.class.php:1330
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/reports/myReportsMgr.class.php(871): myReportsMgr::executeQuery('?CALL kalturadw...', Object(mysqli))
--
==> /opt/kaltura/log/kaltura_batch.log <==
PHP Warning:  file_put_contents(/batch.pid): failed to open stream: Permission denied in /opt/kaltura/app/batch/scheduler/KGenericScheduler.class.php on line 97

Please help identify the issue and advise how to resolve these errors.

As the log says, you’re missing core DWH tables:
2016-03-06 22:35:15 [0.000268] [69.88.44.114] [1554651178] [26] [API] [myReportsMgr::executeQuery] ERR: exception ‘Exception’ with message ‘Invalid query: Table ‘kalturadw.dwh_hourly_partner’ doesn’t exist’ in /opt/kaltura/app/infra/log/KalturaLog.php:83

See:

In particular, there is a section on how to drop the current DWH DBs and recreating them.

As for the batch, I answered you on a different thread. In general, lets try to discuss each problem in its own thread and not open duplicates, it makes it easier for me to answer and also for others to reuse the answer.

I am have no success with running the MySQL commands from command line and I can not get phpMyAdmin to work on the host with Kaltura running. The syntax is not as simple as copying and pasting the commands link by line and pasting them in the terminal. Plus there is no script available to run to do this for you and simplify the process if your not certified in MySQL Uninstalling and re-installing Kaltura fresh does not resolve this issue either.

Overall this current release has way more issu
es than the last release. I will have to open a total of four threads to address each issue. Thing is just looking at the notes from each of my existing threads. It looks like all the errors are connected directly or indirectly. This error is likely the reason why I see errors or failed process in the system monitor and explains why my batches are not processing.

So until I fix this issue I do not think I can trouble shoot the batch issue in my other thread.

If you can provide more detail on exactly what to do to drop the database and then I can move forward to re-create it using the scripts provided by the link you gave me.

@jess

I attempted to following the instructions to drop the DWH SQL data and then re-install it but when I ran the script again it a VERY LONG time to complete. However, after it completed it resolved the issue.

The instructions on how to do this are ambiguous and unclear. Please update the instructions to provide straight forward how to instructions to complete this task. Specifically it has reference on how to set a password variable but I still had to enter the password with each command.

As I said before I am not well versa in working with MySQL from the command line and I have not been able to install a working copy of phpMyAdmin on this host running Kaltura. Some others maybe able to get phpMyAdmin to work on their host and it would be some much simpler to fix this issue using phpMyAdmin rather than CLI to pass SQL command.

A short script to do the same thing would be the simplest solution but I just speaking from my encounter with the issue. However, thank you for the assistance in resolving this issue.