Issue when the kaltura-batch-config.sh is executed


#1

Hello @jess,

I have tryed to install the Kaltura CE 13.14.0 to a single server .
OS of the server is CentOS 7.4.
Then, “kaltura-batch-config.sh” called by “kaltura-config-all.sh” prints the following error:

Redirecting to /bin/systemctl reload httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
   
 kaltura-batch-config.sh FAILED with: 1 on line 103

Archving logs to /opt/kaltura/log/log_05_03_18_14_31.tar.gz...
ERROR: /opt/kaltura/bin/kaltura-batch-config.sh failed:( You can re-run it when the issue is fixed.

And, result of “journalctl -xe” command is as follows:

-- Unit httpd.service has begun starting up.
 3月 05 14:39:30 cak02bs.cc.yamaguchi-u.ac.jp httpd[7645]: httpd: Syntax error on line 353 of /etc/httpd/conf/httpd.conf: Syntax error on line 7 of /etc/httpd/conf.d/zzzkaltura.conf: Could not open config directory /etc/httpd/@APP_DIR@/c
 3月 05 14:39:30 cak02bs.cc.yamaguchi-u.ac.jp systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
 3月 05 14:39:30 cak02bs.cc.yamaguchi-u.ac.jp kill[7647]: kill: cannot find process ""
 3月 05 14:39:30 cak02bs.cc.yamaguchi-u.ac.jp systemd[1]: httpd.service: control process exited, code=exited status=1
 3月 05 14:39:30 cak02bs.cc.yamaguchi-u.ac.jp systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

When an apachce service on the Kaltura CE server uses HTTPS protocol, “zzzkaltura.conf” and “zzzkaltura.ssl.conf” are created in “/etc/httpd/conf.d” directory.
And, the “zzzkaltura.conf” is not configured.

This issue also occurred in the Kaltura CE 12.x.
So that, I made the following changes to “kaltura-batch-config.sh” (add a statement to line 86).

86  PROTOCOL="https"
87
88  ln -sf $APP_DIR/configurations/logrotate/kaltura_batch /etc/logrotate.d/
89  ln -sf $APP_DIR/configurations/logrotate/kaltura_apache /etc/logrotate.d/
90  ln -sf $APP_DIR/configurations/logrotate/kaltura_apps /etc/logrotate.d/
91  if [ "$PROTOCOL" = "https" ]; then
92          ln -sf $APP_DIR/configurations/apache/kaltura.ssl.conf /etc/httpd/conf.d/zzzkaltura.ssl.conf
93  else
94          ln -sf $APP_DIR/configurations/apache/kaltura.conf /etc/httpd/conf.d/zzzkaltura.conf
95  fi

I seem that variable “PROTOCOL” has a wrong value.
But. in “kaltura-front-config.sh”, the variable “PROTOCOL” has a correct value.
This issue does not occur if the batch server uses the HTTP protocol.

Regards


#2

Hi @t-saito,

Not exactly sure what happened here.
Can you please remove /etc/httpd/conf.d/zzzkaltura.ssl.conf and /etc/httpd/conf.d/zzzkaltura.conf, restart Apache, ensure it is up and running and then re-run the config scripts?

If SSL is desired, PROTOCOL should indeed be set to “https”. If after doing this, you’re still having issues, please post your auto generated answer file here [it is saved under /tmp/kaltura_$TIMESTAMP.ans every time you run the config scripts. Of course, be sure to mask sensitive information before posting.

Thanks,


#3

Hi @jess,

After delete “/etc/httpd/conf.d/zzzkaltura.conf” and “/etc/httpd/conf.d/zzzkaltura.ssl.conf”, “kaltura-batch-config.sh” printed same error.

On the other hand, when I set the value of PROTOCOL to “https” in the “kaltura-batch-config.sh” before executing the “kaltura-config-all.sh”, executiing of the “kaltura-config-all.sh” finished safely.

I also faced the same issue in the old version of Kaltura CE.
Since then I feel that some codes to set the value of “PROTOCOL” should be added to the “kaltura-batch-config.sh”.
But, I still do not know the codes which should be added to the script.

Thanks


#4

Hi @t-saito,

Before running kaltura-batch-config.sh, kaltura-base-config.sh needs to run. On a single server, the safest deployment procedure would be to exec /opt/kaltura/bin/kaltura-config-all.sh which is a wrapper that calls all the role config scripts in the correct order.

If, after removing “/etc/httpd/conf.d/zzzkaltura.conf” and “/etc/httpd/conf.d/zzzkaltura.ssl.conf” and re-running /opt/kaltura/bin/kaltura-config-all.sh you’re still having issues, please supply your Kaltura answer file as I requested in my previous reply.

Thanks,


#5

Hi @jess,

I’m sorry for the delay in replying your message.
Today, I tried configuration of the Kaltura CE on a single server again by using “kaltura-config-all.sh”.
At first try, the script printed the same error as yesterday.
And, the script created two answer file, “kaltura_06_03_14_23.ans” and “kaltura_06_03_14_24.ans”.

The content of “kaltura_06_03_14_23.ans” is as follows:

TIME_ZONE="Asia/Tokyo"
KALTURA_FULL_VIRTUAL_HOST_NAME="cak02bs.cc.yamaguchi-u.ac.jp"
KALTURA_VIRTUAL_HOST_NAME="cak02bs.cc.yamaguchi-u.ac.jp"
DB1_HOST="127.0.0.1"
DB1_PORT="3306"
DB1_PASS=".........."
DB1_NAME="kaltura"
DB1_USER="kaltura"
SERVICE_URL="https://cak02bs.cc.yamaguchi-u.ac.jp"
SPHINX_SERVER1="127.0.0.1"
SPHINX_SERVER2="127.0.0.1"
DWH_HOST="127.0.0.1"
DWH_PORT="3306"
ADMIN_CONSOLE_ADMIN_MAIL="kadmin@cak02bs.cc.yamaguchi-u.ac.jp"
ADMIN_CONSOLE_PASSWORD=".........."
CDN_HOST="cak02bs.cc.yamaguchi-u.ac.jp"
KALTURA_VIRTUAL_HOST_PORT="443"
SUPER_USER="root"
SUPER_USER_PASSWD=".........."
ENVIRONMENT_NAME="Contents Archive System"
DWH_PASS=".........."
PROTOCOL="https"
PRIMARY_MEDIA_SERVER_HOST="cak02bs.cc.yamaguchi-u.ac.jp"
USER_CONSENT="0"
CONTACT_MAIL="kadmin@cak02bs.cc.yamaguchi-u.ac.jp"
VOD_PACKAGER_HOST="cak02bs.cc.yamaguchi-u.ac.jp"
VOD_PACKAGER_PORT="88"
IP_RANGE="0.0.0.0-255.255.255.255"
WWW_HOST="cak02bs.cc.yamaguchi-u.ac.jp"

And, The content of “kaltura_06_03_14_24.ans” is as follows:

CONFIG_CHOICE="0"
IS_SSL="Y"
CRT_FILE="/etc/httpd/ssl.crt/cak02bs.cc.yamaguchi-u.ac.jp.cer"
KEY_FILE="/etc/httpd/ssl.crt/cak02bs.cc.yamaguchi-u.ac.jp.key"
CHAIN_FILE="/etc/httpd/ssl.crt/nii-odca3sha2.cer"

After removing “/etc/httpd/conf.d/zzzkaltura.conf” and “/etc/httpd/conf.d/zzzkaltura.ssl.conf”, I re-executed the “kaltura-config-all.sh”.
Then, the script printed the same error as first try, and it created “/etc/httpd/conf.d/zzzkaltura.conf” and “/etc/httpd/conf.d/zzzkaltura.ssl.conf” again.
And, the script created one answer file, “kaltura_06_03_14_34.ans”.
The content of “kaltura_06_03_14_34.ans” is as follows:

TIME_ZONE="Asia/Tokyo"
KALTURA_FULL_VIRTUAL_HOST_NAME="cak02bs.cc.yamaguchi-u.ac.jp"
KALTURA_VIRTUAL_HOST_NAME="cak02bs.cc.yamaguchi-u.ac.jp"
DB1_HOST="127.0.0.1"
DB1_PORT="3306"
DB1_PASS=".........."
DB1_NAME="kaltura"
DB1_USER="kaltura"
SERVICE_URL="https://cak02bs.cc.yamaguchi-u.ac.jp"
SPHINX_SERVER1="127.0.0.1"
SPHINX_SERVER2="127.0.0.1"
DWH_HOST="127.0.0.1"
DWH_PORT="3306"
ADMIN_CONSOLE_ADMIN_MAIL="kadmin@cak02bs.cc.yamaguchi-u.ac.jp"
ADMIN_CONSOLE_PASSWORD=".........."
CDN_HOST="cak02bs.cc.yamaguchi-u.ac.jp"
KALTURA_VIRTUAL_HOST_PORT="443"
SUPER_USER="root"
SUPER_USER_PASSWD=".........."
ENVIRONMENT_NAME="Contents Archive System"
DWH_PASS=".........."
PROTOCOL="https"
PRIMARY_MEDIA_SERVER_HOST="cak02bs.cc.yamaguchi-u.ac.jp"
USER_CONSENT="0"
VOD_PACKAGER_HOST="cak02bs.cc.yamaguchi-u.ac.jp"
VOD_PACKAGER_PORT="88"
IP_RANGE="0.0.0.0-255.255.255.255"
WWW_HOST="cak02bs.cc.yamaguchi-u.ac.jp"
CONFIG_CHOICE="0"
IS_SSL="Y"
CRT_FILE="/etc/httpd/ssl.crt/cak02bs.cc.yamaguchi-u.ac.jp.cer"
KEY_FILE="/etc/httpd/ssl.crt/cak02bs.cc.yamaguchi-u.ac.jp.key"
CHAIN_FILE="/etc/httpd/ssl.crt/nii-odca3sha2.cer

“kaltura-config-all.sh” finishes safely, if I set the value of “PROTOCOL” to “https” in “kaltura-batch-cofig.sh” manually before executing of the “kaltura-config-all.sh”.
But, as mentioned above, the error occurs when I execute the “kaltura-config-all.sh” without manually variable setting.

Best regards