I’m trying to get Kaltura’s KMC page to load I have been trying over and over again throughout the day and havent had any luck. I had the flash issues earlier but resolved that by using “localhost” host name, after which now I render a blank page when I browse to it (tried in FF, Chrome, Safari) when I look at browser console logs I see the following:
Uncaught SyntaxError: Unexpected token <
A Parser-blocking, cross-origin script, http://www.google-analytics.com/ga.js,
is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity. See https://www.chromestatus.com/feature/5718547946799104 for more details.
Uncaught ReferenceError: logout is not defined
at <anonymous>:1:1
I have tried reseting the install by doing the following:
In the shell on the server, run:
# . /etc/profile.d/kaltura*base.sh
# kaltlog
Then make the request and look at the log to find the error.
kaltlog is an alias that uses grep to find erroneous patterns in the logs so it should provide an initial direction as to what the issue is. Also, take a look at the browser’s dev tools, under the “Network” tab to see if there are failing requests, HTTP 404 or 500…
2017-02-23 05:00:37 [1568599569] [addPermissionsAndItems.php] [addItemToPermissions] ALERT: exception ‘Exception’ with message ‘ERROR - Permission name [BATCH_BASE] for partner [0] not found in database - skipping!’ in /opt/kaltura/app/infra/log/KalturaLog.php:65
Stack trace: #0 /opt/kaltura/app/alpha/scripts/utils/permissions/addPermissionsAndItems.php(284): KalturaLog::alert(‘ERROR - Permiss…’)
I believe I know what happened. You first configuration attempt failed, leaving a half baked DB, hence the
2017-02-23 05:00:37 [1568599569] [addPermissionsAndItems.php] [addItemToPermissions] ALERT: exception 'Exception' with message 'ERROR - Permission name [BATCH_BASE] for partner [0] not found in database - skipping!' in /opt/kaltura/app/infra/log/KalturaLog.php:65
error.
I recommend you drop the existing DB with:
# /opt/kaltura/bin/kaltura-drop-db.sh
and then rerun the install.sh script from outside or, from within the container, run:
# /opt/kaltura/bin/kaltura-config-all.sh /root/install/config.ans
which is basically what install.sh does, after it sets up MySQL and other things.
@jess ok so I watched the entire install from start to finish…I didnt see one hiccup…but then right after everything completed I check kaltlog and i see this again:
2017-02-23 16:10:56 [1760061325] [addPermissionsAndItems.php] [addItemToPermissions] ALERT: exception ‘Exception’ with message ‘ERROR - Permission name [BATCH_BASE] for partner [0] not found in database - skipping!’ in /opt/kaltura/app/infra/log/KalturaLog.php:65
Stack trace: #0 /opt/kaltura/app/alpha/scripts/utils/permissions/addPermissionsAndItems.php(284): KalturaLog::alert(‘ERROR - Permiss…’)
Clearly, the code cannot access the DB. The password for the kaltura DB user defined in /opt/kaltura/app/configurations/db.ini. Not sure what happened here exactly but I think it would be most helpful for you to drop the DB again, rerun the config script and post the full output.
Also, the passwords for the operational and DWH DBs are cached here from previous install attempts: /etc/kaltura.d/system.ini, please make sure they match whatever you put in your answer file.
2017-02-23 21:23:01 [403565341] [addPermissionsAndItems.php] [addItemToPermissions] ALERT: exception ‘Exception’ with message ‘ERROR - Permission name [BATCH_BASE] for partner [0] not found in database - skipping!’ in /opt/kaltura/app/infra/log/KalturaLog.php:65
Stack trace: #0 /opt/kaltura/app/alpha/scripts/utils/permissions/addPermissionsAndItems.php(284): KalturaLog::alert(‘ERROR - Permiss…’)
thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 894
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal database error’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace: #0 /opt/kaltura/app/batch/client/KalturaClient.php(1321): KalturaClientBase->throwExceptionIfError(Array)
thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 894
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal database error’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace: #0 /opt/kaltura/app/batch/client/KalturaClient.php(1159): KalturaClientBase->throwExceptionIfError(Array)
thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 894
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal database error’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace: #0 /opt/kaltura/app/batch/client/KalturaClient.php(4694): KalturaClientBase->throwExceptionIfError(Array)
thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 894
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal database error’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace: #0 /opt/kaltura/app/batch/client/KalturaClient.php(1144): KalturaClientBase->throwExceptionIfError(Array)
thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 894
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal database error’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace: #0 /opt/kaltura/app/batch/client/KalturaClient.php(2318): KalturaClientBase->throwExceptionIfError(Array)
Any other suggestions? I tried tearing down the host completly removing the docker image and pulling it down again, that didnt work. I also tried dropping the database and re-adding
Checking MySQL version…
Ver 5.1.73 found compatible
CREATE USER kaltura;
CREATE USER etl;
CREATE DATABASE kaltura;
…
Here are the errors (kaltlog):
[2017-02-23 21:44:23]failed to connect [1] [0.0015690326690674] mysql:host=127.0.0.1;port=3306;dbname=kaltura_sphinx_log;
PHP Fatal error: Uncaught exception ‘PropelException’ with message ‘Unable to open PDO connection dsn[mysql:host=127.0.0.1;port=3306;dbname=kaltura_sphinx_log;] user[kaltura] password[RlO2ywX10Zt1YIz] [wrapped: SQLSTATE[42000] [1044] Access denied for user ‘kaltura’@’%’ to database ‘kaltura_sphinx_log’]’ in /opt/kaltura/app/vendor/propel/Propel.php:649
Stack trace: #0 /opt/kaltura/app/vendor/propel/Propel.php(532): Propel::initConnection(Array, ‘sphinx_log_read’)
[2017-02-23 21:44:24]exception ‘Exception’ with message ‘Scheduler already running - pid[6395]’ in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace: #0 /opt/kaltura/app/plugins/sphinx_search/scripts/populateFromLog.php(51): KalturaLog::err(‘Scheduler alrea…’)
The installation continues however without a hitch:
Checking MySQL version…
Ver 5.1.73 found compatible
CREATE USER kaltura;
CREATE USER etl;
CREATE DATABASE kaltura;
CREATE DATABASE kaltura_sphinx_log;
CREATE DATABASE kalturadw;
CREATE DATABASE kalturadw_ds;
CREATE DATABASE kalturadw_bisources;
CREATE DATABASE kalturalog;
Checking connectivity to needed daemons…
Connectivity test passed:)
Cleaning cache…
Populating DB with data… please wait…
Output for /opt/kaltura/app/deployment/base/scripts/installPlugins.php being logged into /opt/kaltura/log/installPlugins.log
Output for /opt/kaltura/app/deployment/base/scripts/insertDefaults.php being logged into /opt/kaltura/log/insertDefaults.log
Output for /opt/kaltura/app/deployment/base/scripts/insertPermissions.php being logged into /opt/kaltura/log/insertPermissions.log
…
@jess Any ideas? This is still not working. Can you confirm this isn’t happening for everyone? Seems to me that if I run this thing from scratch, I shouldnt be getting this error.
You get these errors continuously, because the code cannot access your DB. That’s not because of the drop-db script which simply drops all the Kaltura schemas and users [kaltura and etl].
The real question is why the code cannot access your DB. Is the password in /opt/kaltura/app/configurations/db.ini correct?
I am unable to reproduce an issue when installing inside a Docker container [or any other method for that matter] nor have I gotten any other reports to that effect so, other than prompting you for information to help fix your specific issue, there’s not much I can do.
Can you start a new container, deploy from scratch, share the full output and, if that does not reveal anything new, perhaps share the resulting container image so I can debug it locally?
@jess the kaltura db user pw is autogenerated…I did not create or touch it. When I run mysql -u kaltura -p from the CLI and use the pw in that file it works, I can get in.
What I meant is for you to send me the container POST the installation attempt.
From within the container, do upgrade to the latest packages, then, drop the DB, make sure the kaltura schemas and users were indeed dropped and run /opt/kaltura/bin/kaltura-config-all.sh
This script can accept an answer file as the first argument but in light of the current situation, it may be best to run it interactively and the post the entire flow [minus sensitive info, of course] for further inspection.
Not strange at all considering the whole problem is the code cannot access the DB. Asking again, are the DB creds in /opt/kaltura/app/configurations/db.ini correct?
Can you access the DB manually from the shell using them?
@jess Yes I can get in using the password in db.ini
sh-4.1# mysql -u kaltura -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 283
Server version: 5.1.73 Source distribution