Kaltura is not stable on my server

Hello,

Since last sunday installed kaltura was not working well. That time we restarted our server. Sometimes Internal Database Error message appear in Admin Console and also some of the uploaded video not displayed in Admin Console. But video data exist in database.

Kaltlog

PHP Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘Empty reply from server’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:357
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(1144): KalturaClientBase->doQueue()

thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 734
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal database error’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:734
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(644): KalturaClientBase->throwExceptionIfError(Array)

thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 357
PHP Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘Empty reply from server’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:357
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(643): KalturaClientBase->doQueue()

thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 357
PHP Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘Empty reply from server’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:357
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(1127): KalturaClientBase->doQueue()

thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 357
PHP Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘Operation timed out after 180000 milliseconds with 0 bytes received’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:357
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaPlugins/KalturaContentDistributionClientPlugin.php(2425): KalturaClientBase->doQueue()

==> /opt/kaltura/log/batch/validatelivemediaservers-0-2015-02-23.err.log <==
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal database error’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:734
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(3996): KalturaClientBase->throwExceptionIfError(Array)

thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 357
PHP Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘couldn’t connect to host’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:357
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(3995): KalturaClientBase->doQueue()

[2015-02-22 19:49:49]failed to connect [1] [0.0012218952178955] 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[USER] password[PASSWORD] [wrapped: SQLSTATE[HY000] [2013] Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111]’ 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’)

==> /opt/kaltura/log/batch/bulkupload-0-2015-02-25.err.log <==
PHP Notice: Use of undefined constant DUPLICATE_CATEGORY - assumed ‘DUPLICATE_CATEGORY’ in /opt/kaltura/app/plugins/bulk_upload/xml/batch/BulkUploadEngineXml.php on line 1251

What is the reason I got above errors ? How do I fix this.

Hello,
It sounds like your MySQL is not running… is it?

MySQL is running. I can log in to MySQL with username, password.

[eberx@cms ~]$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 120490
Server version: 5.1.73 Source distribution

Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> exit
Bye
[USERNAME@HOSTNAME]$ ps -ef | grep mysql
root 5427 1 0 09:03 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --d atadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mys qld/mysqld.pid --basedir=/usr --user=mysql
mysql 5547 5427 0 09:03 ? 00:07:16 /usr/libexec/mysqld --basedir=/u sr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --open- files-limit=20000 --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/ mysql.sock

Can you log in with:
mysql -u $DB1_USER $DB1_NAME -p$DB1_PASS

This is what release matters as Kaltura does not make use of the root account.

Does your iptable service turned off ? (i.e. do you have a firewall or something that is blocking the access)

If on a single machine, it can listen on 127.0.0.1 only, on a cluster, needs to be accessible to other members.
On a single host however, make sure you inputted 127.0.0.1 as your MySQL IP and not its FQDN or external IP addr.
You can reconf this using kaltura-base-config.sh

This is single machine. Yes I’m sure inputted 127.0.0.1 in my.cnf. Not external ip and domain name.

I cannot log in with mysql -u $DB1_USER $DB1_NAME -p$DB1_PASS

[USER@DOMAIN ~]$ mysql -u $DB1_USER $DB1_NAME -p$DB1_PASS
ERROR 1045 (28000): Access denied for user ‘-p’@‘localhost’ (using password: NO)

This is proof of I can log in to mysql with kaltura user.

[USER@DOMAIN ~]$ mysql -u kaltura -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 159874
Server version: 5.1.73 Source distribution

Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql> exit

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[xxxx] [wrapped: SQLSTATE[HY000] [2013] Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111]’ in /opt/kaltura/app/vendor/propel/Propel.php:649

mysql -u $DB1_USER $DB1_NAME -p$DB1_PASS

[root@kaltura ~]# mysql -u $DB1_USER $DB1_NAME -p$DB1_PASS
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 731812
Server version: 5.1.73 Source distribution

Copyright © 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>

You can google for this message for possible errors in connecting to MySql.
If you add yo the mysql line -h 127.0.0.1 does it still work?

1 Like

Thanks @oferc1

Have a good day