kaltura / platform-install-packages

Official deployment packages to install the Kaltura platform on a server or cluster environments using native OS package managers
GNU Affero General Public License v3.0
521 stars 242 forks source link

getting kaltura-db error on installation #602

Closed mborhade closed 7 years ago

mborhade commented 7 years ago

I have follow doc - https://github.com/kaltura/platform-install-packages/blob/Mercury-13.1.0/doc/install-kaltura-deb-based.md but each time getting /system.ini not found, kaltura-db error This time I also get one more error The following partially installed packages will be configured: kaltura-batch No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 35 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Setting up kaltura-batch (13.0.0-1) ... ERROR:could not find /opt/kaltura/bin/kaltura-functions.rc so, exiting..dpkg: error processing package kaltura-batch (--configure): subprocess installed post-installation script returned error exit status 3 E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover:

I have also tried `remove kaltura

/opt/kaltura/bin/kaltura-drop-db.sh

aptitude purge "~Nkaltura"

rm -rf /opt/kaltura

rm -rf /etc/kaltura.d`

then `aptitude purge kaltura-db

dpkg-reconfigure kaltura-db

aptitude install kaltura-db` but no success , getting same error

also getting error while removing The following partially installed packages will be configured: kaltura-batch No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 35 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Setting up kaltura-batch (13.0.0-1) ... ERROR:could not find /opt/kaltura/bin/kaltura-functions.rc so, exiting..dpkg: error processing package kaltura-batch (--configure): subprocess installed post-installation script returned error exit status 3 E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover:

jessp01 commented 7 years ago

Hi @mborhade,

/opt/kaltura/bin/kaltura-functions.rc belongs to the kaltura-postinst package. What happens when you try to install this manually with: # apt-get install kaltura-postinst ?

Also, which distribution are you using?

mborhade commented 7 years ago

Hi @jessp01 ,

Thanks for reply :) got below for # apt-get install kaltura-postinst root@mborhade:~# apt-get install kaltura-postinst Reading package lists... Done Building dependency tree Reading state information... Done kaltura-postinst is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 47 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] Y Setting up kaltura-batch (13.0.0-1) ... ERROR:could not find /opt/kaltura/bin/kaltura-functions.rc so, exiting..dpkg: error processing package kaltura-batch (--configure): subprocess installed post-installation script returned error exit status 3 Errors were encountered while processing: kaltura-batch E: Sub-process /usr/bin/dpkg returned an error code (1) You have new mail in /var/mail/root root@mborhade:~#

Also, which distribution are you using? latest

Thanks, Mangesh

jessp01 commented 7 years ago

Hi @mborhade,

Run:

# aptitude purge "~Nkaltura"
# aptitude update
# aptitude install kaltura-postinst

and paste the output.

As for the distro - latest of what? Debian, Ubuntu? what version?

mborhade commented 7 years ago

Hi @jessp01 ,

Below the details -

root@mborhade:~# aptitude purge "~Nkaltura" The following partially installed packages will be configured: kaltura-batch No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 47 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Setting up kaltura-batch (13.0.0-1) ... ERROR:could not find /opt/kaltura/bin/kaltura-functions.rc so, exiting..dpkg: error processing package kaltura-batch (--configure): subprocess installed post-installation script returned error exit status 3 Errors were encountered while processing: kaltura-batch E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover:

root@mborhade:~#aptitude update

Fetched 15.9 kB in 9s (1,722 B/s) W: Failed to fetch http://installrepo.kaltura.org/repo/apt/debian/dists/mercury/main/binary-amd64/Packages: Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead. E: Couldn't rebuild package cache

root@mborhade:~#

root@mborhade:~# aptitude install kaltura-postinst The following partially installed packages will be configured: kaltura-batch No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 47 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Setting up kaltura-batch (13.0.0-1) ... ERROR:could not find /opt/kaltura/bin/kaltura-functions.rc so, exiting..dpkg: error processing package kaltura-batch (--configure): subprocess installed post-installation script returned error exit status 3 E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover:

root@mborhade:~#

As for the distro - latest of what? Debian, Ubuntu? what version? => Ubuntu 14.04

Thanks, Mangesh

jessp01 commented 7 years ago

You have several different issues here. Start with removing the kaltura-batch package which dpkg keeps trying to reconfigure and is failing to do so because /opt/kaltura/bin/kaltura-functions.rc does not exist. First, remove the package's pre and post-install scripts with: # /var/lib/dpkg/info/kaltura-batch.p* Then:

# aptitude install -f
# aptitude purge kaltura-batch

make sure it was removed and check if you have other leftovers too, with: # dpkg -l "kaltura"

If you don't understand the output, you can paste it here.

Next up there is this error you have when running aptitude update, which you should also look into. http://installrepo.kaltura.org is a CDN endpoint. It's possible the edge you are hitting is not fully up to date, you can edit /etc/apt/sources.list.d/kaltura.list and change 'http://installrepo.kaltura.org' to read 'http://installrepo.origin.kaltura.org'. Then make sure aptitude update passes with no errors or warnings.

Finally, again, try: # aptitude install kaltura-postinst To understand why this is failing.

Also, as a side note: Ubuntu 14.04 is hardly the latest version of Ubuntu, it's not even the latest LTS. Kaltura CE works perfectly well with it, that's not a problem but you should be aware that it is NOT the latest.

mborhade commented 7 years ago

Hi @jessp01 ,

Thanks for above info , I have removed kaltura-batch files from dpkg successfully ,

then after i run the below commands

root@mborhade:~#aptitude update

Fetched 15.9 kB in 9s (1,722 B/s) W: Failed to fetch http://installrepo.kaltura.org/repo/apt/debian/dists/mercury/main/binary-amd64/Packages: Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead. E: Couldn't rebuild package cache


root@mborhade:~# aptitude install kaltura-postinst No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 46 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used.

should I need to run ./install_kaltura_all_in_1.sh ?

Thanks, Mangesh

mborhade commented 7 years ago

Hi @jessp01 ,

Thank you very much , I have changed file as per instructions - and got below -

Fetched 5,712 kB in 20s (284 kB/s)

Current status: 47 updates [+1]. root@mborhade:~# aptitude install kaltura-postinst The following packages will be upgraded: kaltura-postinst 1 packages upgraded, 0 newly installed, 0 to remove and 46 not upgraded. Need to get 77.9 kB of archives. After unpacking 6,144 B will be used. Do you want to continue? [Y/n/?] Y Get: 1 http://installrepo.origin.kaltura.org/repo/apt/debian/ mercury/main kaltura-postinst all 1.0.33-3+b1 [77.9 kB] Fetched 77.9 kB in 1s (77.2 kB/s) (Reading database ... 195536 files and directories currently installed.) Preparing to unpack .../kaltura-postinst_1.0.33-3+b1_all.deb ... Unpacking kaltura-postinst (1.0.33-3+b1) over (1.0.33-3) ... Setting up kaltura-postinst (1.0.33-3+b1) ...

Current status: 46 updates [-1]. root@mborhade:~#

I am going to run ./install_kaltura_all_in_1.sh , will update you shortly once done...

Thanks, Mangesh

mborhade commented 7 years ago

Hi @jessp01 ,

Thank you very much for your help , got below result for ./install_kaltura_all_in_1.sh

The following NEW packages will be installed: kaltura-db 0 packages upgraded, 1 newly installed, 0 to remove and 30 not upgraded. Need to get 0 B/4,444 B of archives. After unpacking 8,192 B will be used. Preconfiguring packages ... Selecting previously unselected package kaltura-db. (Reading database ... 210767 files and directories currently installed.) Preparing to unpack .../kaltura-db_12.15.0-1+b4_all.deb ... Unpacking kaltura-db (12.15.0-1+b4) ... Setting up kaltura-db (12.15.0-1+b4) ...

Checking MySQL version..

CREATE USER kaltura; ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'kaltura'@'%'

kaltura-db.postinst FAILED with: 6474 on line 175

Archving logs to /opt/kaltura/log/log_16_08_17_19_40.tar.gz...

dpkg: error processing package kaltura-db (--configure): subprocess installed post-installation script returned error exit status 11 Errors were encountered while processing: kaltura-db E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up kaltura-db (12.15.0-1+b4) ...

Checking MySQL version..

CREATE USER kaltura; ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for 'kaltura'@'%'

kaltura-db.postinst FAILED with: 6701 on line 175

Archving logs to /opt/kaltura/log/log_16_08_17_19_41.tar.gz...

dpkg: error processing package kaltura-db (--configure): subprocess installed post-installation script returned error exit status 11 Errors were encountered while processing: kaltura-db

You have new mail in /var/mail/root root@mborhade:~#

It prompts me for db host , db port, super user, super user password ,

i have entered all info there localhost, 3306, root, root.123

then got above errors :(

Thanks, Mangesh

jessp01 commented 7 years ago

What's the output for: mysql> select host,user,password from mysql.user; ? And be sure to mask the actual passwd hashes when you reply.

mborhade commented 7 years ago

Hi @jessp01 ,

below the details are -

mysql> select host,user,password from mysql.user; +-----------+------------------+-------------------------------------------+ | host | user | password | +-----------+------------------+-------------------------------------------+ | localhost | root | ######################################### | | 127.0.0.1 | etl | #########################################| | 127.0.0.1 | root | ######################################### | | ::1 | root | ######################################### | | localhost | debian-sys-maint | ######################################### | | localhost | adsuser | ######################################### | | 127.0.0.1 | adsuser | ######################################### | | 127.0.0.1 | kaltura_read | ######################################### |

after the above error I have removed the kaltura and etl user and after that i fired command

aptitude install kaltura-db (because dpkg-reconfigure kaltura-db also giving error)

then got below log

root@mborhade:~# aptitude install kaltura-db The following partially installed packages will be configured: kaltura-db No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 30 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used. Setting up kaltura-db (12.15.0-1+b4) ...

Checking MySQL version..

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; ERROR 1007 (HY000) at line 1: Can't create database 'kalturalog'; database exists

kaltura-db.postinst FAILED with: 8539 on line 186

Archving logs to /opt/kaltura/log/log_16_08_17_20_21.tar.gz...

dpkg: error processing package kaltura-db (--configure): subprocess installed post-installation script returned error exit status 11 Errors were encountered while processing: kaltura-db E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: Setting up kaltura-db (12.15.0-1+b4) ...

Checking MySQL version..

This will drop the following DBs: kaltura kaltura_sphinx_log kalturadw kalturadw_ds kalturadw_bisources kalturalog and remove users: kaltura etl on localhost

Removing kaltura..Removing kaltura_sphinx_log..Removing kalturadw..Removing kalturadw_ds..Removing kalturadw_bisources..Removing kalturalog.. Successfully dropped kaltura databases and users 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:) ERROR: Couldn't make an API request to http://kaltura.local1/api_v3/index.php?service=system&action=ping. This will drop the following DBs: kaltura kaltura_sphinx_log kalturadw kalturadw_ds kalturadw_bisources kalturalog and remove users: kaltura etl on localhost

Removing kaltura..Removing kaltura_sphinx_log..Removing kalturadw..Removing kalturadw_ds..Removing kalturadw_bisources..Removing kalturalog.. Successfully dropped kaltura databases and users dpkg: error processing package kaltura-db (--configure): subprocess installed post-installation script returned error exit status 6 Errors were encountered while processing: kaltura-db

Thanks, Mangesh

mborhade commented 7 years ago

Hi @jessp01 ,

I have sorted out above issue and then when I am going to run the # ./install_kaltura_all_in_1.sh command I got no error there , and at last I got below log -

Removing libjpeg62:amd64 (6b1-4ubuntu1) ... Removing mediainfo (0.7.67-1) ... Removing libmediainfo0:amd64 (0.7.67-2ubuntu1) ... Removing libmms0:amd64 (0.6.2-3ubuntu2.1) ... Removing libtinyxml2-0.0.0:amd64 (0~git20120518.1.a2ae54e-1) ... Removing libzen0:amd64 (0.4.29-1) ... Removing php5-gmp (5.5.9+dfsg-1ubuntu4.22) ... php5_invoke prerm: Disable module gmp for cli SAPI php5_invoke prerm: Disable module gmp for apache2 SAPI Removing php5-xsl (5.5.9+dfsg-1ubuntu4.22) ... php5_invoke prerm: Disable module xsl for cli SAPI php5_invoke prerm: Disable module xsl for apache2 SAPI Removing sshpass (1.05-1) ... Processing triggers for doc-base (0.10.5) ... Processing 1 removed doc-base file... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for libc-bin (2.19-0ubuntu6.13) ... Processing triggers for libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.22) ...

No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 30 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used.

Starting nginx: nginx.

thats it , how do I know that installation is complete or not ? I have accessed url of kaltura but got 404 there.

Thanks, Mangesh

jessp01 commented 7 years ago

Hi @mborhade,

You didn't mention what you changed to fix the issues raised during the postinst phase of kaltura-db but in any case, whatever you input for the Kaltura service URL/endpoint, has to be accessible from both the server running Kaltura and from any client you wish to use for accessing the Kaltura web interfaces [Admin Console/KMC] and also from wherever you intend to play videos.

Your output shows you inputted http://kaltura.local1, is that accessible?

I recommend you remove and redeploy everything to be on the safe side rather the reconfigure all the existing packages. It will be faster.

mborhade commented 7 years ago

Hi @jessp01 ,

For kaltura-db error I have removed kaltura user from myql.user and also removed databases related to kaltura, after that I got success for kaltura-db with no error, http://kaltura.local1 is the url that I have used in last katura installation , now this time I have used http://kaltura.local.dev , now I facing one error - after I run command # /opt/kaltura/bin/kaltura-sanity.sh get below some errors there - .... [Check kaltura-batch daemon status] [FAILED, RC: 1] - [.030496016] .... [Check kaltura-batch daemon is started by Monit] [FAILED, RC: 1] - [123.814295681] .... [check daemon memcached init status] [PASSED, RC: 0] - [.090358603] [check_start_page] [PASSED, RC: 0] - [.183650907] curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information [check_testme_page] [FAILED, RC: 1] - [.025233321] [check_kmc_index_page] [PASSED, RC: 0] - [.154986704] [check_admin_console_index_page] [FAILED, RC: 1] - [.068892738] basename: missing operand Try 'basename --help' for more information. [check_studio_index_page] [FAILED, RC: 1] - [.118712990] [check_clipapp_index_page] [PASSED, RC: 0] - [.102306013] [Create Partner] [FAILED, RC: 255] - [.078990776] Partner creation failed. I will skip all tests that require it. [Red5 file upload] [SKIPPED as OflaDemo isn't configured] see: https://github.com/kaltura/platform-install-packages/blob/master/doc/install-kaltura-redhat-based.md#configure-red5-server

after that I have checked for kaltura-batch and got below result root@mborhade:~# /etc/init.d/kaltura-batch status Service Batch Manager isn't running [ FAILED ] root@mborhade:~# /etc/init.d/kaltura-batch start Starting Batch Manager.... Batch Manager started with PID [ OK ] root@mborhade:~# /etc/init.d/kaltura-batch status Service Batch Manager isn't running [ FAILED ] root@mborhade:~#

Thanks, Mangesh

jessp01 commented 7 years ago

According to this output, the Kaltura service URL/endpoint you provided is not accessible. Please see my last comment: https://github.com/kaltura/platform-install-packages/issues/602#issuecomment-323098289

I am closing this issue because we'd rather use the repo's issues section for general bug reports and not for specific deployment issues such as the ones you had. Please deploy from scratch bearing in mind my previous comments and if, after doing so, you have issues, post on forum.kaltura.org providing all the relevant output. Thanks,