Internal Server Error Occured - Help Troubleshooting!

Good Morning guys,

I’m using the Kaltura Community Edition and currently having a problem when using the KMC.

I can login to the Admin Console fine, but once i login to the KMC and navigate to any page other than the Dashboard, i get the “Internal Server Error Occurred”. I’m not very adept in Kaltura or CentOS, so i’m looking for some assistance in what i should do to troubleshoot the error!

Thanks in advance guys

Hi @Razoe,

Please see Kaltura Media Center kmc1 file.

Hi @jess

Thanks for the quick reply. Is it correct for me to assume you’re pointing me in the direction of the “Logging in with the Admin account in KMC”? If so, that actually happened to me at first, but i had already gotten pass that hurdle fortunately!

I am able to successfully login to the KMC, and see info on the dashboard. It’s only when time to go to another page in the KMC like “content” or any of the other “tabs” at the top, i get the problem of the internal server error occured.

I may have missed it, but i didn’t see anything about that in the post pointed out.

Hi @Razoe,

Please check the following logs for errors:

/opt/kaltura/log/kaltura_apache_errors*.log 
/opt/kaltura/log/kaltura_api_v3.log
/opt/kaltura/log/kaltura_prod.log

Also, please open your browser’s dev tools and look under the “Network” tab for failing requests and under the “Console” tab for errors.

@jess

The Dev tools show no errors.

In regards to the 3 files you specified, the apache_errors is blank.

I don’t notice any errors in the other two, but my untrained eye may have missed things. What’s the best way to show you the logs? JUst copy and past them here?

Hi @Razoe,

If you’re getting “Internal Server Error Occurred” then one of the HTTP requests KMC makes is failing. This means there must be a request in the “Network” tab that returned with HTTP 500. Please look carefully.

In parallel from a root shell on the server, run:

# . /etc/profile.d/kaltura*base.sh
# kaltlog

And look at the errors outputted to STDOUT.

Also, just to be on the safe side, restart your Apache and make sure it starts correctly. I’m suggesting this because you say /opt/kaltura/log/kaltura_apache_errors*.log is empty.

See attached screenshot of Network tab.

Restarted Apache, no different in the problem. Will proceed to do what you suggested about the kaltlog now.

Seems to be database errors?

[root@localhost ~]# kaltlog
[2018-03-22 03:51:21]exception ‘Exception’ with message ‘SQLSTATE[HY000] [2003] Can’t connect to MySQL server on ‘localhost.localdomain’ (111)’ in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/plugins/search/providers/sphinx_search/scripts/populateFromLog.php(92): KalturaLog::err(‘SQLSTATE[HY000]…’)

[2018-03-22 03:51:26]exception ‘Exception’ with message ‘SQLSTATE[HY000] [2003] Can’t connect to MySQL server on ‘localhost.localdomain’ (111)’ in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/plugins/search/providers/sphinx_search/scripts/populateFromLog.php(92): KalturaLog::err(‘SQLSTATE[HY000]…’)

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

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

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

==> /opt/kaltura/log/batch/partnerloadcleanup-0-2018-03-22.err.log <==
PHP Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘Failed connect to 192.168.18.23:80; Connection refused’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:362
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(1380): KalturaClientBase->doQueue()

thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 894
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal server error occurred’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaPlugins/KalturaContentDistributionClientPlugin.php(2792): KalturaClientBase->throwExceptionIfError(Array)

thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 894
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal server error occurred’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaPlugins/KalturaContentDistributionClientPlugin.php(2792): KalturaClientBase->throwExceptionIfError(Array)

thrown in /opt/kaltura/app/batch/client/KalturaClientBase.php on line 894
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal server error occurred’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaPlugins/KalturaContentDistributionClientPlugin.php(2792): KalturaClientBase->throwExceptionIfError(Array)

==> /opt/kaltura/log/batch/validatelivemediaservers-0-2018-03-22.err.log <==
PHP Fatal error: Uncaught exception ‘KalturaClientException’ with message ‘Failed connect to 192.168.18.23:80; Connection refused’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:362
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(2315): KalturaClientBase->doQueue()
^[[A^[[A^[[B^[[B^[[B

k^H–
2018-03-22 12:28:50 [0.000129] [192.168.18.23] [669781608] [53] [API] [SphinxCriteria->applyFilters] DEBUG: Add sort field[entry.CREATED_AT] copy from [entry.CREATED_AT ASC]
2018-03-22 12:28:50 [0.000542] [192.168.18.23] [669781608] [54] [API] [DbManager::connectFallbackLogic] ERR: exception ‘Exception’ with message ‘failed to connect to sphinx2’ in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/db/DbManager.php(279): KalturaLog::err(‘failed to conne…’)

#13 {main}
2018-03-22 12:28:50 [0.000337] [192.168.18.23] [669781608] [55] [API] [DbManager::connectFallbackLogic] ERR: exception ‘Exception’ with message ‘failed to connect to sphinx1’ in /opt/kaltura/app/infra/log/KalturaLog.php:83
Stack trace:
#0 /opt/kaltura/app/alpha/apps/kaltura/lib/db/DbManager.php(279): KalturaLog::err(‘failed to conne…’)

#13 {main}
2018-03-22 12:28:50 [0.000233] [192.168.18.23] [669781608] [56] [API] [KalturaFrontController->getExceptionObject] CRIT: exception ‘Exception’ with message ‘Failed to connect to any Sphinx config’ in /opt/kaltura/app/alpha/apps/kaltura/lib/db/DbManager.php:220
Stack trace:
#0 /opt/kaltura/app/plugins/search/providers/sphinx_search/lib/SphinxCriteria.php(144): DbManager::getSphinxConnection()

==> /opt/kaltura/log/batch/clearcuepoints-0-2018-03-22.err.log <==
PHP Fatal error: Uncaught exception ‘KalturaException’ with message ‘Internal server error occurred’ in /opt/kaltura/app/batch/client/KalturaClientBase.php:894
Stack trace:
#0 /opt/kaltura/app/batch/client/KalturaClient.php(4285): KalturaClientBase->throwExceptionIfError(Array)

I went ahead and tried to see the status of the MySQL;

sudo service mysql status

results were

Redirecting to /bin/systemctl status mysql.service
Unit mysql.service could not be found.