New Installation - Error on DB Population

I’ve installed older versions of Kaltura (both 5 and 6) in the past, but I wanted to see what the newest version of Kaltura is like.

I’m using centos 6.7 as the base OS, installing inside virtual box with a fake SSL certificate setup for testing. I’m following the instructions on https://github.com/kaltura/platform-install-packages/blob/master/doc/install-kaltura-redhat-based.md#ssl-step-by-step-installation and it started out fairly well. However, it fails on one a of the sub-steps during the db population portion. The databases get created without issue and it shows as connectivity passed as well. The particular error displayed is: kaltura-db-config.sh FAILED with: 6264 on line 184

The error gets logged to /opt/kaltura/log/insertContent.log and the error appears to be:
PHP Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘Empty reply from server’ in /opt/kaltura/app/tests/lib/KalturaClientBase.php:362
Stack trace:
#0 /opt/kaltura/app/tests/lib/KalturaClientBase.php(953): KalturaClientBase->doQueue()
#1 /opt/kaltura/app/tests/standAloneClient/exec.php(345): KalturaClientBase->doMultiRequest()
#2 {main}
thrown in /opt/kaltura/app/tests/lib/KalturaClientBase.php on line 362

It’s interesting in that this particular step in the install seems to do a number of tests to do with uploading content - quite a number of which go through successfully. The error info doesn’t seem to provide much information about why this particular one fails. I’ve tried re-running the install via reverting with a snapsnot, but it hangs on the same step, albeit in a slightly different place in the test.

Any idea what the issue might be?

Hi Craig,

Not sure why this particular request got a bad response from the server, is Apache still running or has it crushed?
You can try:
# /opt/kaltura/bin/kaltura-drop-db.sh
and then rerun the kaltura-config-all.sh script and see if it fails again.

You also don’t need to reinput everything, the install scripts create answer files under /tmp/kaltura_*.ans files which you can pass to any of the config scripts rather than reinputting interactively.

You will probably see two of these files under /tmp concat them together and run:
# /opt/kaltura/bin/kaltura-config-all.sh /path/to/ans/file

Hi jess - thanks for your response. I do quite like the shell scripts that now exist to give better control over the installation (relative to kaltura 5 or 6). I ran the drop db script, then grabbed the answer file and re-ran the config-all script. Same error, so I thought I’d attach a screenshot of the console this time.

It appears as thought Apache is still running: I can pull it up in a browser window after the install fails. I can also login to the admin console successfully. The install log shows httpd getting stopped and started successfully.

Would a full copy of the insertContent.log file help? I can give you a few if you like, it doesn’t always seem to fail on the same step.

It’s a minimal centos 6.7 install in virtual box, although I am attempting to use SSL only with a fake cert that I’ve generated and setup.

Hi Craig,

Thanks for the feedback, I like the scripts and RPM/deb packages too:)
Please do mail me the log to jess.portnoy@kaltura

But also, I have a nagging suspicion: could you please try:
# service kaltura-monit stop
Then drop DB and rerun config-all?
I suspect maybe monit which we use as a watchdog, wrongly thinks Apache is irresponsive and restarts it in mid request…

Hi Jess,

I do really like what you’ve done overall with the installer. It’s much cleaner to install and probably a lot easier to gather the necessary debug info when needed. I’m excited also that it should be easier to update to new versions in the future.

That seems like a very reasonable conclusion. I re-ran a few minutes ago and was able to get past the insertContent step. The config-all script does stop and start kaltura-monit on its own, so I wondering why me stopping it manually prior to that accounts for a different outcome. I can’t argue with the results though - it definitely got past that step this time around! I’m curious also for when I setup a production version if I’ll have to run the setup once, then manually stop kaltura-monit, then re-run a second time.

I did hit an error later in the install process -
Missing the following params in ans.txt
IS_NGINX_SSL
(ans.txt is where I dumped the answers to the install questions)
It looks like an easier one to fix, so I’ll look into it in more detail as well.

I will still send you the logs - is your email a kaltura.org or a kaltura.com?

Hi Craig,

The fact you had to stop monit like that is most certainly a bug:) shouldn’t happen and doesn’t really happen on my ENV either, I’d love to checkout the logs. jess.portnoy@kaltura.com.

IS_NGINX_SSL - yep, you need to add it to your ans file, it is needed for the kaltura-nginx-config.sh stage only, which is why you didn’t get it in your file, the file generated, never got to that point.
You can just add:
IS_NGINX_SSL=N

or, if you DO want Nginx to run over SSL:
IS_NGINX_SSL=Y
VOD_PACKAGER_SSL_PORT=8443
SSL_CERT=/path/to/cert
SSL_KEY=/path/to/key

we use Nginx to provide on the fly MP4 repackging to DASH/HLS/HDS, you can read more about it here:

Also, indeed, upgrading is far easier nowadays and can in fact be done automatically without human interaction. Though, of course, nothing is perfect and sometimes manual intervention will be needed.

To upgrade from older versions, such as 6, we also have this howto:

This requires some manual labour but some parts include aiding scripts to make it easier. This howto was a user contribution and he was able to successfully upgrade from 6 to 9, 9 being the first version to include RPMs.

I needed to add all four directives above to my answers file to setup nginx and have the install complete successfully. I tried initially to cheat and only add IS_NGINX_SSL, which failed further down the line. I haven’t yet tried the red5 setup instructions or done any other post install config.

I ran across the 6 -> 9 upgrade docs while reading some other forum posts, but I haven’t given it a try yet. It is more labour intensive, so I ended up weighing how big my DB was vs. how much work it might take. Given that my install is on the smaller side, I thought I’d try a fresh install and then move over the videos that I end up wishing to keep. I plan to keep a copy of my old DB as well, so I can restore to a test box and check the analytics if the need arose.

With the changes you’ve made with moving to RPMs, the really great thing is that as long as I port over once, I’m good forever thereafter.

@jess

I removed my previous version of Kaltura and attempted to install a fresh copy in hopes of resolving the batch processing issue. However, I am get this same issue and kaltlog command does not work when I try to run it I get a command not found error on my instance running in the same environment described here CentOS 6.7.

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
Output for /opt/kaltura/app/deployment/base/scripts/insertContent.php being logged into /opt/kaltura/log/insertContent.log


kaltura-db-config.sh FAILED with: 27727 on line 184

Archving logs to /opt/kaltura/log/log_05_03_16_09_14.tar.gz...
ERROR: we failed on something else..

When attempting to review my logs I notice kaltura_batch.log and kaltura_poplate.log

Kaltura Batch Log

nohup: failed to run command `KGenericBatchMgr.class.php’: No such file or directory

Kaltura Populate Log

bash: populateFromLog.php: command not found

@jess

Here is a copy of my logs so you can see what is causing the error. I didnt want to send a 500 mb file via email.

https://www.dropbox.com/s/baan8ed2zekj7l7/log_05_03_16_09_14.tar.gz?dl=0

I am still not sure why the 'kaltlog" command is not working but I will assume it is related to whatever is missing during the installation. As mention in this thread I tried stopping Kaltura Monit too and re-running the scripts but that did not work for me with or without the ans file.

@jess

I also ran a sanity check and got the following results. Then end was a never ending loop…

[root@tig03 ~]# /opt/kaltura/bin/kaltura-sanity.sh
[Space on /] [PASSED, RC: 0] - [.001880148]
[Space on /opt/kaltura/web] [PASSED, RC: 0] - [.001866900]
[Check httpd daemon status] [PASSED, RC: 0] - [.013579884]
/opt/kaltura/bin/kaltura-sanity.sh: line 67: monit: command not found
Napping 1 seconds to allow the daemon httpd to finish its init after monit restarted it..
Napping 2 seconds to allow the daemon httpd to finish its init after monit restarted it..
[Check httpd daemon is started by Monit] [PASSED, RC: 0] - [2.160799346]
[check daemon httpd init status] [PASSED, RC: 0] - [.002807855]
[Check kaltura-sphinx daemon status] [PASSED, RC: 0] - [.017453629]
/opt/kaltura/bin/kaltura-sanity.sh: line 67: monit: command not found
[Check kaltura-sphinx daemon is started by Monit] [PASSED, RC: 0] - [10.541680566]
[check daemon kaltura-sphinx init status] [PASSED, RC: 0] - [.002737784]
[Check kaltura-batch daemon status] [FAILED, RC: 1] - [.017174912]
/opt/kaltura/bin/kaltura-sanity.sh: line 67: monit: command not found
Napping 1 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 2 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 3 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 4 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 5 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 6 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 7 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 8 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 9 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..
Napping 10 seconds to allow the daemon kaltura-batch to finish its init after monit restarted it..

What is in /opt/kaltura/log/insertContent.log?

Here is the contents of the log you requested.

Queuing action [userRole.add]
Queuing action [user.add]
Executing multirequest
service url: [http://tig03.hiphopservers.com]
curl: http://tig03.hiphopservers.com/api_v3/service/multirequest
post: {"format":"3","ignoreNull":true,"clientTag":"php5:16-03-05","apiVersion":"3.3.0","0":{"service":"userrole","action":"add","userRole":{"objectType":"KalturaUserRole","name":"System Administrator","systemName":"System Administrator","description":"System Administrator","status":"1","permissionNames":"*","tags":"admin_console"},"ks":"MGY1Y2Y5ODliZjhiZjNkNTYzYzUwZTY5MWZmOTBjM2RmMWE2NzJlOXwtMjstMjsxNDU3Mjg3MjEzOzI7ODIyNjs7"},"1":{"service":"user","action":"add","user":{"objectType":"KalturaUser","id":"admin@hiphopservers.com","screenName":"admin@hiphopservers.com","fullName":"Kaltura Administrator","email":"admin@hiphopservers.com","status":"1","password":"H0","isAdmin":"1","roleIds":"{1:result:id}","allowedPartnerIds":"*"},"ks":"MGY1Y2Y5ODliZjhiZjNkNTYzYzUwZTY5MWZmOTBjM2RmMWE2NzJlOXwtMjstMjsxNDU3Mjg3MjEzOzI7ODIyNjs7"},"kalsig":"25ba7d6c08caab401040013a78197736"}
result (serialized): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href="https://tig03.hiphopservers.com/"><b>https://tig03.hiphopservers.com/</b></a></blockquote></p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at tig03.hiphopservers.com Port 443</address>
</body></html>

PHP Fatal error:  Uncaught exception 'KalturaClientException' with message 'failed to unserialize server result
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Reason: You're speaking plain HTTP to an SSL-enabled server port.<br />
Instead use the HTTPS scheme to access this URL, please.<br />
<blockquote>Hint: <a href="https://tig03.hiphopservers.com/"><b>https://tig03.hiphopservers.com/</b></a></blockquote></p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at tig03.hiphopservers.com Port 443</address>
</body></html>
' in /opt/kaltura/app/tests/lib/KalturaClientBase.php:401
Stack trace:
#0 /opt/kaltura/app/tests/lib/KalturaClientBase.php(953): KalturaClientBase->doQueue()
#1 /opt/kaltura/app/tests/standAloneClient/exec.php(345): KalturaClientBase->doMultiRequest()
#2 {main}
  thrown in /opt/kaltura/app/tests/lib/KalturaClientBase.php on line 401

Right, so, like it says in the output, it could not make the request:
# curl -I -v https://tig03.hiphopservers.com

and got back HTTP 400. You need to understand why that is…
Making the above curl request manually from the shell can go a long way in helping you understand what’s wrong.

400 Bad Request

Bad Request

Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

Hint: https://tig03.hiphopservers.com/

Apache/2.2.15 (CentOS) Server at tig03.hiphopservers.com Port 443 ' in /opt/kaltura/app/tests/lib/KalturaClientBase.php:401 ``` Stack trace: #0 /opt/kaltura/app/tests/lib/KalturaClientBase.php(953): KalturaClientBase->doQueue() #1 /opt/kaltura/app/tests/standAloneClient/exec.php(345): KalturaClientBase->doMultiRequest() #2 {main} thrown in /opt/kaltura/app/tests/lib/KalturaClientBase.php on line 401 ```

@jess

Here is what I got when I ran the following command:

curl -I -v https://tig03.hiphopservers.com

I do not see any errors.

> [root@tig03 ~]# curl -I -v https://tig03.hiphopservers.com
> * About to connect() to tig03.hiphopservers.com port 443 (#0)
> *   Trying 107.152.128.122... connected
> * Connected to tig03.hiphopservers.com (107.152.128.122) port 443 (#0)
> * Initializing NSS with certpath: sql:/etc/pki/nssdb
> *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
>   CApath: none
> * SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
> * Server certificate:
> *       subject: CN=*.hiphopservers.com,OU=Domain Control Validated
> *       start date: Jan 13 14:32:00 2015 GMT
> *       expire date: Mar 13 06:29:57 2017 GMT
> *       common name: *.hiphopservers.com
> *       issuer: CN=AlphaSSL CA - SHA256 - G2,O=GlobalSign nv-sa,C=BE
> > HEAD / HTTP/1.1
> > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> > Host: tig03.hiphopservers.com
> > Accept: */*
> >
> < HTTP/1.1 302 Found
> HTTP/1.1 302 Found
> < Date: Sun, 06 Mar 2016 17:05:26 GMT
> Date: Sun, 06 Mar 2016 17:05:26 GMT
> < Server: Apache/2.2.15 (CentOS)
> Server: Apache/2.2.15 (CentOS)
> < Location: https://tig03.hiphopservers.com/start/index.php
> Location: https://tig03.hiphopservers.com/start/index.php
> < Connection: close
> Connection: close
> < Content-Type: text/html; charset=iso-8859-1
> Content-Type: text/html; charset=iso-8859-1

> <
> * Closing connection #0

@jess

I will try and set the default URLs in front-end configuration all to https instead of http and see if that resolves the issue. Previously, in older versions of Kaltura CE this is now I got the SSL version to work properly. However, in the last version before the current release it worked without doing this but I will try it now in the lastest release to see if this fixes the issue. Although, we both know this is not how it is suppose to work.

@jess

I was able to resolve this issue by change the service URL from ‘http’ to ‘https’ and re-ran the script with the revised answer file. This fixed the issue.

Thank you

I will need your to help me install my kaltura on my Server. I will really appreciates your help

Thanks

What exactly do you need help with @steveayo27? If your issue is not related to errors described in this thread people start a new thread describing the problem your having as detailed as possible so someone can help you.

I think this is not the area i should response to, Basically what i need is help in installing Kaltura CE from the scratch with the Mediaspace. But is there a forum aspect here that deals with new installation. But if you know someone that can help me i will really appreciates it

@steveayo27

It really depends on the enviroment you want to install Kaltura CE on. Here is a link to all the guides for the verious flavors of OS you can install Kaltura on.