Hi Jess,
I tried to upgrade Kaltura again from 11.2 to 12.15 by running a yum command for each RPM that had to be updated or installed. Here are the commands I ran:
yum clean all
yum -y install php-pecl-memcache
yum -y update libzen
yum -y update kaltura-html5-studio
yum -y update kaltura-postinst
yum -y install kaltura-libmediainfo
yum -y install kaltura-mediainfo
yum -y update kaltura-sphinx
yum -y install php-process
yum -y install x265-libs
yum -y update kaltura-ffmpeg
yum -y update kaltura-nginx
yum -y update kaltura-monit
Instead of running “yum -y update kaltura-base”, I ran the following commands so that kaltura-base RPM would be updated but the post scripts would not run:
yum -y update kaltura-base --downloadonly --downloaddir=/tmp
rpm -Uv --nopost /tmp/kaltura-base-12.15.0-17.noarch.rpm
rpm -qp --scripts /tmp/kaltura-base-12.15.0-17.noarch.rpm
I then put the post scripts into post.sh and then ran “sh -vx post.sh”. Here is the contents of post.sh
if [ -r "/opt/kaltura/app/configurations/local.ini" -a -r "/opt/kaltura/app/configurations/base.ini" ];then
sed -i "s@^\(kaltura_version\).*@\1 = 12.15.0@g" /opt/kaltura/app/configurations/local.ini
echo "Regenarating client libs.. this will take up to 2 minutes to complete."
if service httpd status;then
service httpd stop
fi
# this is read by kaltura-sphinx-schema-update.sh to determine rather or not to run
touch /opt/kaltura/app/configurations/sphinx_schema_update
find /opt/kaltura/app/cache/ -type f -exec rm {} \;
rm -f /opt/kaltura/app/base-config-generator.lock
php /opt/kaltura/app/generator/generate.php
php /opt/kaltura/app/deployment/base/scripts/installPlugins.php
php /opt/kaltura/app/deployment/base/scripts/populateSphinxMetadata.php
find /opt/kaltura/app/cache/ /opt/kaltura/log /opt/kaltura/var/run -type d -exec chmod 775 {} \;
find /opt/kaltura/log -type f -exec chmod 664 {} \;
chown -R kaltura.apache /opt/kaltura/app/cache/ /opt/kaltura/log /opt/kaltura/var/run
chmod 775 /opt/kaltura/web/content
service kaltura-monit start
if rpm -q httpd >> /dev/null;then
if ! service httpd status;then
service httpd start
fi
fi
# we now need CREATE and DROP priv for 'kaltura' on kaltura.*
if [ -r /etc/kaltura.d/system.ini ];then
. /etc/kaltura.d/system.ini
# disbale Default_Akamai_HLS_direct since we want the nginx vod-module profile to be used [ID 1001, system_name: Kaltura HLS segmentation]
echo "update delivery_profile set is_default=0 where id=1 and system_name='Default_Akamai_HLS_direct';"|mysql -h$DB1_HOST -u $DB1_USER -p$DB1_PASS -P$DB1_PORT $DB1_NAME
echo "GRANT INSERT,UPDATE,DELETE,SELECT,ALTER,DROP,CREATE ON kaltura.* TO '$DB_USER'@'%';FLUSH PRIVILEGES;"|mysql -h$DB1_HOST -u $SUPER_USER -p$SUPER_USER_PASSWD -P$DB1_PORT
fi
php /opt/kaltura/app/deployment/updates/update.php -i -d >> /opt/kaltura/log/kalt_up.log 2>&1
php /opt/kaltura/app/deployment/updates/update.php -i -s >> /opt/kaltura/log/kalt_up.log 2>&1
php /opt/kaltura/app/deployment/base/scripts/installPlugins.php >> /opt/kaltura/log/kalt_up.log 2>&1
fi
post.sh ran file and a PHP error did not occur!
I then reverted the RHEL6.8 VM back to its original state using a VM snapshot and ran the above commands again but this time allowed yum to run the post script. The post script failed with the PHP error as it did when I had run “yum update ‘kaltura’”.
I then reverted the VM and re-ran the commands but used “rpm -U -vv /tmp/kaltura-base-12.15.0-17.noarch.rpm”. The post script failed.
I then reverted the VM and re-ran the first set of commands where I manually ran the post commands and they ran fine.
This does not make sense. When the kaltura-base post script commands are run by either yum update or by rpm -U, a PHP failure is logged but when rpm is used to install kaltura-base without running the post script commands and then I run them manually, a PHP failure does not occur.
I also discovered that when “yum update ‘kaltura’” is run and the PHP failure occurs, if yum reinstall kaltura-base is run, the PHP failure does not occur.
Since I wanted to see whether a clean upgrade would fix the problem, I ran the first series of commands where the kaltura-base post script was run by hand and then I ran “yum update ‘kaltura’” so that yum would install the rest of the RPMs in the correct sequence.
After looking at the console output, the only failure I could see was the following:
Cleanup : kaltura-nginx-1.8.0-9.x86_64 35/37
warning: /etc/nginx/nginx.conf saved as /etc/nginx/nginx.conf.rpmsave
Binary upgrade failed, please check nginx’s error.log
Cleanup : libzen-0.4.33-1.el6.x86_64
I ran the following:
/etc/init.d/kaltura-nginx upgrade
nginx: [emerg] open() “/etc/nginx/nginx.conf” failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
Perhaps the “Binary upgrade failed” message is expected because kaltura-config-all.sh has not yet been run?
I then ran kaltura-config-all.sh with an answer file. The only errors were:
Some warning messages were logged - see below:
Running base config…
kaltura-base-12.15.0-17.noarch
Welcome to Kaltura Server 12.15.0 post install setup.
Checking MySQL version…
Ver 5.1.73 found compatible
========================================================================================================================
Kaltura install answer file written to /tmp/kaltura_30_05_14_14.ans - Please save it!
This answers file can be used to silently-install re-install this machine or deploy other hosts in your cluster.
Generating client libs…
This can take a few minutes to complete, see log at /opt/kaltura/log/generate.php.log.
Configuration of 12.15.0 finished successfully!
Running FrontEnd config…
base-config completed successfully, if you ever want to re-configure your system (e.g. change DB hostname) run the following script:
rm /opt/kaltura/app/base-config.lock
/opt/kaltura/bin/kaltura-base-config.sh
kaltura-front-12.15.0-1.noarch
Enabling Apache config - apps.conf
Enabling Apache config - var.conf
Enabling Apache config - admin.conf
========================================================================================================================
Kaltura install answer file written to /tmp/kaltura_30_05_14_15.ans - Please save it!
This answers file can be used to silently-install re-install this machine or deploy other hosts in your cluster.
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Stopping memcached: [ OK ]
Starting memcached: [ OK ]
Shutting down monit: [ OK ]
Starting monit: Starting Monit 5.21.0 daemon with http interface at [*]:2812
[ OK ]
Running Sphinx config…
kaltura-sphinx-2.2.1-20.x86_64
base-config completed successfully, if you ever want to re-configure your system (e.g. change DB hostname) run the following script:
rm /opt/kaltura/app/base-config.lock
/opt/kaltura/bin/kaltura-base-config.sh
searchd (pid 16091 16090) is running…
Stopping searchd: Sphinx 2.2.1-id64-dev (r4097)
Copyright © 2001-2013, Andrew Aksyonoff
Copyright © 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file ‘/opt/kaltura/app/configurations/sphinx/kaltura.conf’…
stop: successfully sent SIGTERM to pid 16091
Backing up files to /opt/kaltura/sphinx.bck.1496117730. Once the upgrade is done and tested, please remove this directory to save space
Starting searchd: Sphinx 2.2.1-id64-dev (r4097)
Copyright © 2001-2013, Andrew Aksyonoff
Copyright © 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file ‘/opt/kaltura/app/configurations/sphinx/kaltura.conf’…
listening on all interfaces, port=9312
WARNING: index ‘kaltura_base’: no fields configured (use rt_field directive) - NOT SERVING
WARNING: index ‘kaltura_base_gt_in_charset’: no fields configured (use rt_field directive) - NOT SERVING
precaching index 'kaltura_entry’
precaching index 'kaltura_category’
precaching index 'kaltura_kuser’
precaching index 'kaltura_category_kuser’
precaching index 'kaltura_cue_point’
precaching index 'kaltura_entry_distribution’
precaching index 'kaltura_caption_item’
precaching index 'kaltura_tag’
precaching index 'kaltura_metadata’
precaching index 'kaltura_schedule_event’
precached 10 indexes in 0.025 sec
Stopping searchd: Sphinx 2.2.1-id64-dev (r4097)
Copyright © 2001-2013, Andrew Aksyonoff
Copyright © 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file ‘/opt/kaltura/app/configurations/sphinx/kaltura.conf’…
stop: successfully sent SIGTERM to pid 21917
Starting searchd: Sphinx 2.2.1-id64-dev (r4097)
Copyright © 2001-2013, Andrew Aksyonoff
Copyright © 2008-2013, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file ‘/opt/kaltura/app/configurations/sphinx/kaltura.conf’…
listening on all interfaces, port=9312
WARNING: index ‘kaltura_base’: no fields configured (use rt_field directive) - NOT SERVING
WARNING: index ‘kaltura_base_gt_in_charset’: no fields configured (use rt_field directive) - NOT SERVING
precaching index 'kaltura_entry’
precaching index 'kaltura_category’
precaching index 'kaltura_kuser’
precaching index 'kaltura_category_kuser’
precaching index 'kaltura_cue_point’
precaching index 'kaltura_entry_distribution’
precaching index 'kaltura_caption_item’
precaching index 'kaltura_tag’
precaching index 'kaltura_metadata’
precaching index 'kaltura_schedule_event’
precached 10 indexes in 0.024 sec
Running Batch config…
kaltura-batch-12.15.0-1.noarch
base-config completed successfully, if you ever want to re-configure your system (e.g. change DB hostname) run the following script:
rm /opt/kaltura/app/base-config.lock
/opt/kaltura/bin/kaltura-base-config.sh
Reloading httpd:
Stopping memcached: [ OK ]
Starting memcached: [ OK ]
Starting monit: Starting Monit 5.21.0 daemon with http interface at [*]:2812
[ OK ]
kaltura-nginx-1.12.0-3.x86_64
Reloading nginx: [ OK ]
Running DWH config…
kaltura-dwh-12.14.0-1.noarch
base-config completed successfully, if you ever want to re-configure your system (e.g. change DB hostname) run the following script:
rm /opt/kaltura/app/base-config.lock
/opt/kaltura/bin/kaltura-base-config.sh
The Kaltura DWH DB seems to already be installed.
DB creation will be skipped.
DWH configured.
====================================================================================================================
Setup completed successfully!
To access your Kaltura tools visit:
http://klomeo.austrac.gov.au
To verify the integrity of your deployment and that all components are fully configured and installed,
you can run the sanity tests using the following command:
/opt/kaltura/bin/kaltura-sanity.sh
To begin, access the Admin Console using the Admin email and password you’ve entered while installing.
When logged in to the KAC, create a new publisher account to being using Kaltura.
Visit http://www.kaltura.org to join the community and get help!
Visit https://forum.kaltura.org to post issues and help others with theirs.
Visit https://surveys.kaltura.org/index.php/877436 to submit our community survey.
Visit https://knowledge.kaltura.com to read documentation and learn more.
Thank you for running Kaltura! To keep Kaltura viable, stable and tested, please join the community and help by contributing sanity tests that verify overall platform stability: http://bit.ly/kaltura-ci , and by contributing to the project roadmap by solving simple tasks and challenges: http://bit.ly/kaltura-tasks.
After that, the sanity check was run. The upload content failed to digest - see below:
[Space on /] [PASSED, RC: 0] - [.005106469]
[Space on /opt/kaltura/web] [PASSED, RC: 0] - [.004078938]
INFO: Downloading ready-made schema from: /data/kaltura/web/content/clientlibs/KalturaClient.xml
INFO: Generating from api version: 3.3.0, generated at: 30-05-2017
INFO: Now generating: php5full using Php5ClientGenerator
INFO: Delete old files [/data/kaltura/web/content/clientlibs/php5full, /data/kaltura/app/clients/php5]
INFO: Generate client library [php5full]
INFO: Copy sources from [/data/kaltura/clients-generator/sources/php5]
INFO: Copy tests from [/data/kaltura/clients-generator/sources/php5]
INFO: Saving client library to [/data/kaltura/web/content/clientlibs/php5full]
INFO: Trying to package
DEBUG: Changing dir to [/data/kaltura/web/content/clientlibs/php5full]
INFO: Executing: tar -czf “…/php5full_30-05-2017.tar.gz” …/php5full
tar: Removing leading `…/’ from member names
INFO: Package created successfully: …/php5full_30-05-2017.tar.gz
DEBUG: Restoring dir to [/data/kaltura/clients-generator]
INFO: php5full generated successfully
[Check httpd daemon status] [PASSED, RC: 0] - [.037684941]
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…
Napping 3 seconds to allow the daemon httpd to finish its init after monit restarted it…
Napping 4 seconds to allow the daemon httpd to finish its init after monit restarted it…
Napping 5 seconds to allow the daemon httpd to finish its init after monit restarted it…
Napping 6 seconds to allow the daemon httpd to finish its init after monit restarted it…
Napping 7 seconds to allow the daemon httpd to finish its init after monit restarted it…
Napping 8 seconds to allow the daemon httpd to finish its init after monit restarted it…
Napping 9 seconds to allow the daemon httpd to finish its init after monit restarted it…
Napping 10 seconds to allow the daemon httpd to finish its init after monit restarted it…
[Check httpd daemon is started by Monit] [PASSED, RC: 0] - [10.445763639]
[check daemon httpd init status] [PASSED, RC: 0] - [.034518892]
[Check kaltura-sphinx daemon status] [PASSED, RC: 0] - [.043540208]
[Check kaltura-sphinx daemon is started by Monit] [PASSED, RC: 0] - [10.563596529]
[check daemon kaltura-sphinx init status] [PASSED, RC: 0] - [.004749978]
[Check kaltura-batch daemon status] [PASSED, RC: 0] - [.024983703]
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…
[Check kaltura-batch daemon is started by Monit] [PASSED, RC: 0] - [10.328074876]
[check daemon kaltura-batch init status] [PASSED, RC: 0] - [.004509558]
[Check kaltura-monit daemon status] [PASSED, RC: 0] - [.020262914]
[check daemon kaltura-monit init status] [PASSED, RC: 0] - [.004018090]
[Check memcached daemon status] [PASSED, RC: 0] - [.025015370]
Napping 1 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 2 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 3 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 4 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 5 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 6 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 7 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 8 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 9 seconds to allow the daemon memcached to finish its init after monit restarted it…
Napping 10 seconds to allow the daemon memcached to finish its init after monit restarted it…
[Check memcached daemon is started by Monit] [PASSED, RC: 0] - [10.349627946]
[check daemon memcached init status] [PASSED, RC: 0] - [.004566884]
[kaltura-html5lib ver in KMC config.ini] [PASSED, RC: 0] - [.060610742]
[kaltura-kdp3 ver in KDP3 config.ini] [PASSED, RC: 0] - [.031845157]
[kaltura-kmc ver in KMC config.ini] [PASSED, RC: 0] - [.037226683]
[Get KMC SWFs] [PASSED, RC: 0] - [1.377584603]
[check_start_page] [PASSED, RC: 0] - [.038044794]
[check_testme_page] [PASSED, RC: 0] - [.009773557]
[check_kmc_index_page] [PASSED, RC: 0] - [.037369337]
[check_admin_console_index_page] [PASSED, RC: 0] - [.668384513]
[check_studio_index_page] [PASSED, RC: 0] - [.018343897]
[check_clipapp_index_page] [PASSED, RC: 0] - [.568013981]
[Create Partner] [PASSED, RC: 0] - [1.750939502]
[Local dropfolder creation] [PASSED, RC: 0] - [.557556230]
[Create flavor param] [PASSED, RC: 0] - [.490043604]
[Delete flavor param] [PASSED, RC: 0] - [.222607854]
[HTTP notification: ID: 29, URL: http://localhost/1.php] [PASSED, RC: 0] - [.490043604]
[Mail notification: ID: 30, Subject: Your video is ready to be played!, Mail body: Hello world:)] [PASSED, RC: 0] - [.490043604]
[Upload content kaltura_logo_animated_blue.flv] [PASSED, RC: 0] - [.862898361]
Napping 10 seconds to allow entry 0_8gdao93s to digest…
Napping 10 seconds to allow entry 0_8gdao93s to digest…
Napping 10 seconds to allow entry 0_8gdao93s to digest…
Napping 10 seconds to allow entry 0_8gdao93s to digest…
Napping 10 seconds to allow entry 0_8gdao93s to digest…
Napping 10 seconds to allow entry 0_8gdao93s to digest…
Napping 10 seconds to allow entry 0_8gdao93s to digest…
Napping 10 seconds to allow entry 0_8gdao93s to digest…
Napping 10 seconds to allow entry 0_8gdao93s to digest…
[kaltura_logo_animated_blue.flv - 0_8gdao93s status] [FAILED, RC: 1] - [-.513004702]
Sounds like there are more problems to investigate. What should we do next?
Thanks