Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef dwh recipe bash code exits 1 on succesful? #356

Closed
ghost opened this issue Mar 12, 2015 · 8 comments
Closed

Chef dwh recipe bash code exits 1 on succesful? #356

ghost opened this issue Mar 12, 2015 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 12, 2015

is there some secret to get this recipe that i am missing somehow ?
https://github.com/kaltura/platform-install-packages/blob/Jupiter-10.6.0/chef-repo/cookbooks/kaltura/recipes/dwh.rb

bash "setup DWH " do
user "root"
code <<-EOH
echo "NO" | #{node[:kaltura][:BASE_DIR]}/bin/kaltura-base-config.sh /root/kaltura.ans
#{node[:kaltura][:BASE_DIR]}/bin/kaltura-dwh-config.sh /root/kaltura.ans
EOH
end

when that runs the bash command runs and it exits 1 without any errors (even claiming it was successful)

the entire code failure is here:

        * bash[setup DWH ] action run

           ================================================================================
           Error executing action `run` on resource 'bash[setup DWH ]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '1'
           ---- Begin output of "bash"  "/tmp/chef-script20150312-27902-1qleb25" ----
           STDOUT: kaltura-base-10.6.0-2.noarch
           Welcome to Kaltura Server 10.6.0 post install setup.

       ========================================================================================================================
           Kaltura install answer file written to /tmp/kaltura_12_03_18_10.ans  -  Please save it!
           This answers file can be used to silently-install re-install this machine or deploy other hosts in your cluster.
           ========================================================================================================================

           Configuration of 10.6.0 finished successfully!
           kaltura-dwh-9.4.0-2.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

           STDERR:
           ---- End output of "bash"  "/tmp/chef-script20150312-27902-1qleb25" ----
           Ran "bash"  "/tmp/chef-script20150312-27902-1qleb25" returned 1

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/kaltura/recipes/dwh.rb

            25: bash "setup DWH " do
            26:      user "root"
            27:      code <<-EOH
            28:     echo "NO" | #{node[:kaltura][:BASE_DIR]}/bin/kaltura-base-config.sh /root/kaltura.ans
            29:     #{node[:kaltura][:BASE_DIR]}/bin/kaltura-dwh-config.sh /root/kaltura.ans
            30:      EOH
            31: end

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/kaltura/recipes/dwh.rb:25:in `from_file'

           bash("setup DWH ") do
             action "run"
             retries 0
             retry_delay 2
             default_guard_interpreter :default
             command "setup DWH "
             backup 5
             returns 0
             user "root"
             code "\techo \"NO\" | /opt/kaltura/bin/kaltura-base-config.sh /root/kaltura.ans\n\t/opt/kaltura/bin/kaltura-dwh-config.sh /root/kaltura.ans\n"
             interpreter "bash"
             declared_type :bash
             cookbook_name "kaltura"
             recipe_name "dwh"
           end

       [2015-03-12T18:10:24+00:00] ERROR: Converge failed with error message bash[setup DWH ] (kaltura::dwh line 25) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
       ---- Begin output of "bash"  "/tmp/chef-script20150312-27902-1qleb25" ----
       STDOUT: kaltura-base-10.6.0-2.noarch
       Welcome to Kaltura Server 10.6.0 post install setup.

       ========================================================================================================================
       Kaltura install answer file written to /tmp/kaltura_12_03_18_10.ans  -  Please save it!
       This answers file can be used to silently-install re-install this machine or deploy other hosts in your cluster.
       ========================================================================================================================

       Configuration of 10.6.0 finished successfully!
       kaltura-dwh-9.4.0-2.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

       STDERR:
       ---- End output of "bash"  "/tmp/chef-script20150312-27902-1qleb25" ----
       Ran "bash"  "/tmp/chef-script20150312-27902-1qleb25" returned 1

just to prove the point more directly too... when ran via command line

i remove the lock

# rm /opt/kaltura/app/base-config.lock
rm: remove regular empty file `/opt/kaltura/app/base-config.lock'? y

then i run the base config

#  echo "NO" | /opt/kaltura/bin/kaltura-base-config.sh
kaltura-base-10.6.0-2.noarch
Welcome to Kaltura Server 10.6.0 post install setup.

To keep up with the bi-weekly Kaltura releases, and stay up to date with
the latest news, security and bug updates, and connect with the global
Kaltura community - sign up for our regular Kaltura Community updates.
Please enter your email to sign up, or enter NO to pass.

[Email\NO]:
In order to finalize the system configuration, please input the following:

CDN hostname [myhostname.com]:

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

then i run the dwh configure script again via CLI

# /opt/kaltura/bin/kaltura-dwh-config.sh /root/kaltura.ans
kaltura-dwh-9.4.0-2.noarch
kaltura-base-10.6.0-2.noarch
Welcome to Kaltura Server 10.6.0 post install setup.

========================================================================================================================
Kaltura install answer file written to /tmp/kaltura_12_03_18_30.ans  -  Please save it!
This answers file can be used to silently-install re-install this machine or deploy other hosts in your cluster.
========================================================================================================================

Configuration of 10.6.0 finished successfully!

then i verify how did this script exit? it exits 1!!! instead of 0 which is why chef fails (by running $? right after bash command one can see previous commands exit code)

 # $?
-bash: 1: command not found

soo any pointers? is something going wrong and it isn't logging what went wrong?

@jessp01
Copy link
Contributor

jessp01 commented Mar 12, 2015

Hello,

What happens is when you run the kaltura-dwh-config.sh the second time, it already detects the DB has been setup and so it does nothing and exits.
I suggest you follow this to remove the current data in the Analytics databases:
PASSWD="yourmysqlrootpasswd"
for i in mysql -N -p$PASSWD kalturadw_bisources -e "show tables";do mysql -p$PASSWD kalturadw_bisources -e "drop table $i";done
for i in mysql -N -p$PASSWD kalturadw -e "show tables";do mysql -p$PASSWD kalturadw -e "drop table $i";done
for i in mysql -N -p$PASSWD kalturadw_ds -e "show tables";do mysql -p$PASSWD kalturadw_ds -e "drop table $i";done
for i in mysql -N -p$PASSWD kalturalog -e "show tables";do mysql -p$PASSWD kalturalog -e "drop table $i";done
for i in mysql -p$PASSWD -e "Show procedure status" |grep kalturadw|awk -F " " '{print $2}';do mysql kalturadw -p$PASSWD -e "drop procedure $i;";done
for i in mysql -p$PASSWD -e "Show procedure status" |grep kalturadw_ds|awk -F " " '{print $2}';do mysql kalturadw_ds -p$PASSWD -e "drop procedure $i;";done

And then re-run the kaltura-dwh-config.sh manually so we can understand what it is failing on.
I suggest you run it with bash -x so we can see which step exactly fails since unfortunately, the DWH population scripts do not current produce coherent logs.
Thanks,

@ghost
Copy link
Author

ghost commented Mar 12, 2015

Jesse,
none of those tables existed - neither did the procedures

Ive run it with bash -x

 bash -x /opt/kaltura/bin/kaltura-dwh-config.sh /root/kaltura.ans ++ dirname /opt/kaltura/bin/kaltura-dwh-config.sh
+ KALTURA_FUNCTIONS_RC=/opt/kaltura/bin/kaltura-functions.rc
+ '[' '!' -r /opt/kaltura/bin/kaltura-functions.rc ']'
+ . /opt/kaltura/bin/kaltura-functions.rc
++ RC_FILE=/etc/kaltura.d/system.ini
++ '[' -r /etc/kaltura.d/system.ini ']'
++ . /etc/kaltura.d/system.ini
+++ WEB_DIR=/opt/kaltura/web
+++ LOG_DIR=/opt/kaltura/log
+++ APP_DIR=/opt/kaltura/app
+++ BASE_DIR=/opt/kaltura
+++ PHP_BIN=/usr/bin/php
+++ OS_KALTURA_USER=kaltura
+++ MAILTO=admins@sanitized.com
+++ ADMIN_CONSOLE_ADMIN_MAIL=admins@sanitized.com
+++ DB1_HOST=192.168.33.50
+++ DB1_NAME=kaltura
+++ DB1_USER=kaltura
+++ DB1_PASS=fakepass123
+++ DWH_HOST=kitchenkal.sanitized.com
+++ DWH_PORT=3306
+++ DWH_USER=etl
+++ DWH_PASS=fakepass123
+++ SERVICE_URL=kitchenkal.sanitized.com
+++ SPHINX_HOST=kitchenkal.sanitized.com
+++ DB1_PORT=3306
+++ SUPER_USER=root
+++ SUPER_USER_PASSWD=fakepass123
+++ KALTURA_VIRTUAL_HOST_NAME=kitchenkal.sanitized.com
+++ RED5_HOST=kitchenkal.sanitized.com
+++ dirname /opt/kaltura/bin/kaltura-dwh-config.sh
++ COLORS_RC=/opt/kaltura/bin/colors.sh
++ '[' -r /opt/kaltura/bin/colors.sh ']'
++ . /opt/kaltura/bin/colors.sh
+++ DULL=0
+++ BRIGHT=1
+++ FG_BLACK=30
+++ FG_RED=31
+++ FG_GREEN=32
+++ FG_YELLOW=33
+++ FG_BLUE=34
+++ FG_VIOLET=35
+++ FG_CYAN=36
+++ FG_WHITE=37
+++ FG_NULL=00
+++ BG_BLACK=40
+++ BG_RED=41
+++ BG_GREEN=42
+++ BG_YELLOW=43
+++ BG_BLUE=44
+++ BG_VIOLET=45
+++ BG_CYAN=46
+++ BG_WHITE=47
+++ BG_NULL=00
+++ ETCOLOR_ERROR='\033[1;31m'
+++ ESC='\033'
+++ NORMAL='\033[m'
+++ RESET='\\033[0;37;00m'
+++ BLACK='\033[0;30m'
+++ RED='\033[0;31m'
+++ GREEN='\033[0;32m'
+++ YELLOW='\033[0;33m'
+++ BLUE='\033[0;34m'
+++ VIOLET='\033[0;35m'
+++ CYAN='\033[0;36m'
+++ WHITE='\033[0;37m'
+++ BRIGHT_BLACK='\033[1;30m'
+++ BRIGHT_RED='\033[1;31m'
+++ BRIGHT_GREEN='\033[1;32m'
+++ BRIGHT_YELLOW='\033[1;33m'
+++ BRIGHT_BLUE='\033[1;34m'
+++ BRIGHT_VIOLET='\\033[1;35m'
+++ BRIGHT_CYAN='\033[1;36m'
+++ BRIGHT_WHITE='\033[1;37m'
+++ REV_CYAN='\033[0;47;46m'
+++ REV_RED='\033[0;33; 41m'
+++ JESS='Jess likes this one :)'
++ '[' -r /etc/sysconfig/clock ']'
++ . /etc/sysconfig/clock
+++ ZONE=Etc/UTC
++ '[' -r /opt/kaltura/app/configurations/consent_msgs ']'
++ . /opt/kaltura/app/configurations/consent_msgs
+++ PRE_CONSENT='To improve your Kaltura experience and provide you with the best service, Kaltura would like your consent to collect necessary data and information regarding your installation and use of Kaltura and analyze it to provide an upgraded and more stable platform and services.
This information helps us understand what problems users encounter when using Kaltura, so we can improve the quality, performance, and security of the platform accordingly. To review what information is being collected, please read: http://www.kaltura.org/kaltura-qa-tracking/ .
By allowing Kaltura to collect data about your installation, we may be able provide more effective assistance in the event that you encounter an installation issue.
To allow Kaltura to track and analyze QA and support information, please enter your email. Type NO to disallow:'
+++ POST_CONSENT='Thank you for helping making Kaltura better! To review what information is being collected, please read: http://www.kaltura.org/kaltura-qa-tracking/ .'
++ CONSENT_FILE=/opt/kaltura/bin/contact.rc
++ APACHE_DAEMON=httpd
++ MYSQL_DAEMON=mysqld
++ SPHINX_DAEMON=kaltura-sphinx
++ BATCH_DAEMON=kaltura-batch
++ MEMCACHE_DAEMON=memcached
++ MONIT_DAEMON=kaltura-monit
++ ALL_DAEMONS='httpd kaltura-sphinx kaltura-batch kaltura-monit memcached'
++ POST_INST_MAIL_SUBJECT='Your new Kaltura server is up! and 6 Quick Tips For Smooth Kaltura Maintenance'
++ POST_INST_MAIL_TMPL=/opt/kaltura/app/configurations/post_inst_mail
++ ANALYTICS_SERVER_URI=http://installytics.kaltura.org/report
++ NEWSLETTER_URL=https://agentcontribs.kaltura.org/newsletter_subscribe.php
++ NEWSLETTER_MSG='
To keep up with the bi-weekly Kaltura releases, and stay up to date with
the latest news, security and bug updates, and connect with the global
Kaltura community - sign up for our regular Kaltura Community updates.
Please enter your email to sign up, or enter NO to pass.
'
+ '[' -r /opt/kaltura/bin/contact.rc ']'
+ . /opt/kaltura/bin/contact.rc
++ USER_CONSENT=0
+ . /opt/kaltura/bin/contact.rc
++ USER_CONSENT=0
+ rpm -q kaltura-dwh
kaltura-dwh-9.4.0-2.noarch
+ '[' '!' -r /opt/kaltura/app/base-config.lock ']'
+ echo -e '\033[1;34mbase-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
\033[m
'
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


+ RC_FILE=/etc/kaltura.d/system.ini
+ '[' '!' -r /etc/kaltura.d/system.ini ']'
+ . /etc/kaltura.d/system.ini
++ WEB_DIR=/opt/kaltura/web
++ LOG_DIR=/opt/kaltura/log
++ APP_DIR=/opt/kaltura/app
++ BASE_DIR=/opt/kaltura
++ PHP_BIN=/usr/bin/php
++ OS_KALTURA_USER=kaltura
++ MAILTO=admins@sanitized.com
++ ADMIN_CONSOLE_ADMIN_MAIL=admins@sanitized.com
++ DB1_HOST=192.168.33.50
++ DB1_NAME=kaltura
++ DB1_USER=kaltura
++ DB1_PASS=fakepass123
++ DWH_HOST=kitchenkal.sanitized.com
++ DWH_PORT=3306
++ DWH_USER=etl
++ DWH_PASS=fakepass123
++ SERVICE_URL=kitchenkal.sanitized.com
++ SPHINX_HOST=kitchenkal.sanitized.com
++ DB1_PORT=3306
++ SUPER_USER=root
++ SUPER_USER_PASSWD=fakepass123
++ KALTURA_VIRTUAL_HOST_NAME=kitchenkal.sanitized.com
++ RED5_HOST=kitchenkal.sanitized.com
+ trap - ERR
++ basename /opt/kaltura/bin/kaltura-dwh-config.sh
+ send_install_becon kaltura-dwh-config.sh Etc/UTC install_start 0
+ trap - ERR
+ '[' -r /opt/kaltura/bin/contact.rc ']'
+ . /opt/kaltura/bin/contact.rc
++ USER_CONSENT=0
+ '[' -z 0 -o 0 = 0 ']'
+ return 0
++ mysql -hkitchenkal.sanitized.com -uroot -pfakepass123 -P3306 kalturadw
++ echo 'show tables'
+ TABLES=
+ '[' -z '' ']'
+ echo -e '\033[0;36mDeploying analytics warehouse DB, please be patient as this may take a while...
Output is logged to /opt/kaltura/dwh/logs/dwh_setup.log.\033[m
'
Deploying analytics warehouse DB, please be patient as this may take a while...
Output is logged to /opt/kaltura/dwh/logs/dwh_setup.log.

+ trap 'my_trap_handler "${LINENO}" ${$?}' ERR
+ tee /opt/kaltura/dwh/logs/dwh_setup.log
+ /opt/kaltura/dwh/setup/dwh_setup.sh -uroot -k /opt/kaltura/pentaho/pdi/ -d/opt/kaltura/dwh -hkitchenkal.sanitized.com -P3306 -pfakepass123
1
Error - bailing out!
+ sed 's#\(@DWH_DIR@\)$#\1 -k /opt/kaltura/pentaho/pdi/kitchen.sh#g' /opt/kaltura/app/configurations/cron/dwh.template
+ sed -i -e s#@DWH_DIR@#/opt/kaltura/dwh#g -e s#@APP_DIR@#/opt/kaltura/app#g -e s#@EVENTS_FETCH_METHOD@#local#g -e s#@LOG_DIR@#/opt/kaltura/log#g /opt/kaltura/app/configurations/cron/dwh
+ ln -sf /opt/kaltura/app/configurations/cron/dwh /etc/cron.d/kaltura-dwh
++ tail -1
++ ls -d /usr/java/jre1.7.0_45
+ LATEST_JAVA=/usr/java/jre1.7.0_45
+ '[' -n /usr/java/jre1.7.0_45 ']'
+ alternatives --install /usr/bin/java java /usr/java/jre1.7.0_45/bin/java 20000
+ echo -e '\033[0;36mDWH configured.\033[m'
DWH configured.
++ basename /opt/kaltura/bin/kaltura-dwh-config.sh
+ send_install_becon kaltura-dwh-config.sh Etc/UTC install_success 0
+ trap - ERR
+ '[' -r /opt/kaltura/bin/contact.rc ']'
+ . /opt/kaltura/bin/contact.rc
++ USER_CONSENT=0
+ '[' -z 0 -o 0 = 0 ']'
+ return 0

the only real issue i see (with no great explanation is this:

/opt/kaltura/dwh/setup/dwh_setup.sh -uroot -k /opt/kaltura/pentaho/pdi/ -d/opt/kaltura/dwh -hsanitized.com -P3306 -pfakepass123
1
Error - bailing out!

@jessp01
Copy link
Contributor

jessp01 commented Mar 12, 2015

Indeed
/opt/kaltura/dwh/setup/dwh_setup.sh -uroot -k /opt/kaltura/pentaho/pdi/ -d/opt/kaltura/dwh -hsanitized.com -P3306 -pfakepass123
failing is the issue and the reason why none of these databases exist.
please try to run:

bash -x /opt/kaltura/dwh/setup/dwh_setup.sh -uroot -k

/opt/kaltura/pentaho/pdi/ -d/opt/kaltura/dwh -hsanitized.com -P3306
-pfakepass123

So we can understand exactly what SQL script if failing.
What MySQL/MariaDB ver are you using? is it possible you have strict mode
on? this might account for the reason its failing.

May the source be with you,

Jess Portnoy

On Thu, 12 Mar 2015, nukepuppy wrote:

Jesse,
none of those tables existed - neither did the procedures

Ive run it with bash -x

bash -x /opt/kaltura/bin/kaltura-dwh-config.sh /root/kaltura.ans ++ dirname /opt/kaltura/bin/kaltura-dwh-config.sh

  • KALTURA_FUNCTIONS_RC=/opt/kaltura/bin/kaltura-functions.rc

  • '[' '!' -r /opt/kaltura/bin/kaltura-functions.rc ']'

  • . /opt/kaltura/bin/kaltura-functions.rc
    ++ RC_FILE=/etc/kaltura.d/system.ini
    ++ '[' -r /etc/kaltura.d/system.ini ']'
    ++ . /etc/kaltura.d/system.ini
    +++ WEB_DIR=/opt/kaltura/web
    +++ LOG_DIR=/opt/kaltura/log
    +++ APP_DIR=/opt/kaltura/app
    +++ BASE_DIR=/opt/kaltura
    +++ PHP_BIN=/usr/bin/php
    +++ OS_KALTURA_USER=kaltura
    +++ MAILTO=admins@sanitized.com
    +++ ADMIN_CONSOLE_ADMIN_MAIL=admins@sanitized.com
    +++ DB1_HOST=192.168.33.50
    +++ DB1_NAME=kaltura
    +++ DB1_USER=kaltura
    +++ DB1_PASS=fakepass123
    +++ DWH_HOST=kitchenkal.sanitized.com
    +++ DWH_PORT=3306
    +++ DWH_USER=etl
    +++ DWH_PASS=fakepass123
    +++ SERVICE_URL=kitchenkal.sanitized.com
    +++ SPHINX_HOST=kitchenkal.sanitized.com
    +++ DB1_PORT=3306
    +++ SUPER_USER=root
    +++ SUPER_USER_PASSWD=fakepass123
    +++ KALTURA_VIRTUAL_HOST_NAME=kitchenkal.sanitized.com
    +++ RED5_HOST=kitchenkal.sanitized.com
    +++ dirname /opt/kaltura/bin/kaltura-dwh-config.sh
    ++ COLORS_RC=/opt/kaltura/bin/colors.sh
    ++ '[' -r /opt/kaltura/bin/colors.sh ']'
    ++ . /opt/kaltura/bin/colors.sh
    +++ DULL=0
    +++ BRIGHT=1
    +++ FG_BLACK=30
    +++ FG_RED=31
    +++ FG_GREEN=32
    +++ FG_YELLOW=33
    +++ FG_BLUE=34
    +++ FG_VIOLET=35
    +++ FG_CYAN=36
    +++ FG_WHITE=37
    +++ FG_NULL=00
    +++ BG_BLACK=40
    +++ BG_RED=41
    +++ BG_GREEN=42
    +++ BG_YELLOW=43
    +++ BG_BLUE=44
    +++ BG_VIOLET=45
    +++ BG_CYAN=46
    +++ BG_WHITE=47
    +++ BG_NULL=00
    +++ ETCOLOR_ERROR='\033[1;31m'
    +++ ESC='\033'
    +++ NORMAL='\033[m'
    +++ RESET='\033[0;37;00m'
    +++ BLACK='\033[0;30m'
    +++ RED='\033[0;31m'
    +++ GREEN='\033[0;32m'
    +++ YELLOW='\033[0;33m'
    +++ BLUE='\033[0;34m'
    +++ VIOLET='\033[0;35m'
    +++ CYAN='\033[0;36m'
    +++ WHITE='\033[0;37m'
    +++ BRIGHT_BLACK='\033[1;30m'
    +++ BRIGHT_RED='\033[1;31m'
    +++ BRIGHT_GREEN='\033[1;32m'
    +++ BRIGHT_YELLOW='\033[1;33m'
    +++ BRIGHT_BLUE='\033[1;34m'
    +++ BRIGHT_VIOLET='\033[1;35m'
    +++ BRIGHT_CYAN='\033[1;36m'
    +++ BRIGHT_WHITE='\033[1;37m'
    +++ REV_CYAN='\033[0;47;46m'
    +++ REV_RED='\033[0;33; 41m'
    +++ JESS='Jess likes this one :)'
    ++ '[' -r /etc/sysconfig/clock ']'
    ++ . /etc/sysconfig/clock
    +++ ZONE=Etc/UTC
    ++ '[' -r /opt/kaltura/app/configurations/consent_msgs ']'
    ++ . /opt/kaltura/app/configurations/consent_msgs
    +++ PRE_CONSENT='To improve your Kaltura experience and provide you with the best service, Kaltura would like your consent to coll
    ect necessary data and information regarding your installation and use of Kaltura and analyze it to provide an upgraded and more s
    table platform and services.
    This information helps us understand what problems users encounter when using Kaltura, so we can improve the quality, performance,
    and security of the platform accordingly. To review what information is being collected, please read: http://www.kaltura.org/kalt
    ura-qa-tracking/ .
    By allowing Kaltura to collect data about your installation, we may be able provide more effective assistance in the event that yo
    u encounter an installation issue.
    To allow Kaltura to track and analyze QA and support information, please enter your email. Type NO to disallow:'
    +++ POST_CONSENT='Thank you for helping making Kaltura better! To review what information is being collected, please read: http://
    www.kaltura.org/kaltura-qa-tracking/ .'
    ++ CONSENT_FILE=/opt/kaltura/bin/contact.rc
    ++ APACHE_DAEMON=httpd
    ++ MYSQL_DAEMON=mysqld
    ++ SPHINX_DAEMON=kaltura-sphinx
    ++ BATCH_DAEMON=kaltura-batch
    ++ MEMCACHE_DAEMON=memcached
    ++ MONIT_DAEMON=kaltura-monit
    ++ ALL_DAEMONS='httpd kaltura-sphinx kaltura-batch kaltura-monit memcached'
    ++ POST_INST_MAIL_SUBJECT='Your new Kaltura server is up! and 6 Quick Tips For Smooth Kaltura Maintenance'
    ++ POST_INST_MAIL_TMPL=/opt/kaltura/app/configurations/post_inst_mail
    ++ ANALYTICS_SERVER_URI=http://installytics.kaltura.org/report
    ++ NEWSLETTER_URL=https://agentcontribs.kaltura.org/newsletter_subscribe.php
    ++ NEWSLETTER_MSG='
    To keep up with the bi-weekly Kaltura releases, and stay up to date with
    the latest news, security and bug updates, and connect with the global
    Kaltura community - sign up for our regular Kaltura Community updates.
    Please enter your email to sign up, or enter NO to pass.
    '

  • '[' -r /opt/kaltura/bin/contact.rc ']'

  • . /opt/kaltura/bin/contact.rc
    ++ USER_CONSENT=0

  • . /opt/kaltura/bin/contact.rc
    ++ USER_CONSENT=0

  • rpm -q kaltura-dwh
    kaltura-dwh-9.4.0-2.noarch

  • '[' '!' -r /opt/kaltura/app/base-config.lock ']'

  • echo -e '\033[1;34mbase-config completed successfully, if you ever want to re-configure your system (e.g. change DB hostname) ru
    n the following script:

    rm /opt/kaltura/app/base-config.lock

    /opt/kaltura/bin/kaltura-base-config.sh

    \033[m
    '
    base-config completed successfully, if you ever want to re-configure your system (e.g. change DB hostname) run the following scrip
    t:

    rm /opt/kaltura/app/base-config.lock

    /opt/kaltura/bin/kaltura-base-config.sh

  • RC_FILE=/etc/kaltura.d/system.ini

  • '[' '!' -r /etc/kaltura.d/system.ini ']'

  • . /etc/kaltura.d/system.ini
    ++ WEB_DIR=/opt/kaltura/web
    ++ LOG_DIR=/opt/kaltura/log
    ++ APP_DIR=/opt/kaltura/app
    ++ BASE_DIR=/opt/kaltura
    ++ PHP_BIN=/usr/bin/php
    ++ OS_KALTURA_USER=kaltura
    ++ MAILTO=admins@sanitized.com
    ++ ADMIN_CONSOLE_ADMIN_MAIL=admins@sanitized.com
    ++ DB1_HOST=192.168.33.50
    ++ DB1_NAME=kaltura
    ++ DB1_USER=kaltura
    ++ DB1_PASS=fakepass123
    ++ DWH_HOST=kitchenkal.sanitized.com
    ++ DWH_PORT=3306
    ++ DWH_USER=etl
    ++ DWH_PASS=fakepass123
    ++ SERVICE_URL=kitchenkal.sanitized.com
    ++ SPHINX_HOST=kitchenkal.sanitized.com
    ++ DB1_PORT=3306
    ++ SUPER_USER=root
    ++ SUPER_USER_PASSWD=fakepass123
    ++ KALTURA_VIRTUAL_HOST_NAME=kitchenkal.sanitized.com
    ++ RED5_HOST=kitchenkal.sanitized.com

  • trap - ERR
    ++ basename /opt/kaltura/bin/kaltura-dwh-config.sh

  • send_install_becon kaltura-dwh-config.sh Etc/UTC install_start 0

  • trap - ERR

  • '[' -r /opt/kaltura/bin/contact.rc ']'

  • . /opt/kaltura/bin/contact.rc
    ++ USER_CONSENT=0

  • '[' -z 0 -o 0 = 0 ']'

  • return 0
    ++ mysql -hkitchenkal.sanitized.com -uroot -pfakepass123 -P3306 kalturadw
    ++ echo 'show tables'

  • TABLES=

  • '[' -z '' ']'

  • echo -e '\033[0;36mDeploying analytics warehouse DB, please be patient as this may take a while...
    Output is logged to /opt/kaltura/dwh/logs/dwh_setup.log.\033[m
    '
    Deploying analytics warehouse DB, please be patient as this may take a while...
    Output is logged to /opt/kaltura/dwh/logs/dwh_setup.log.

  • trap 'my_trap_handler "${LINENO}" ${$?}' ERR

  • tee /opt/kaltura/dwh/logs/dwh_setup.log

  • /opt/kaltura/dwh/setup/dwh_setup.sh -uroot -k /opt/kaltura/pentaho/pdi/ -d/opt/kaltura/dwh -hkitchenkal.sanitized.com -P3306 -pf
    akepass123
    1
    Error - bailing out!

  • sed 's#(@DWH_DIR@)$#\1 -k /opt/kaltura/pentaho/pdi/kitchen.sh#g' /opt/kaltura/app/configurations/cron/dwh.template

  • sed -i -e s#@DWH_DIR@#/opt/kaltura/dwh#g -e s#@APP_DIR@#/opt/kaltura/app#g -e s#@EVENTS_FETCH_METHOD@#local#g -e s#@LOG_DIR@#/op
    t/kaltura/log#g /opt/kaltura/app/configurations/cron/dwh

  • ln -sf /opt/kaltura/app/configurations/cron/dwh /etc/cron.d/kaltura-dwh
    ++ tail -1
    ++ ls -d /usr/java/jre1.7.0_45

  • LATEST_JAVA=/usr/java/jre1.7.0_45

  • '[' -n /usr/java/jre1.7.0_45 ']'

  • alternatives --install /usr/bin/java java /usr/java/jre1.7.0_45/bin/java 20000

  • echo -e '\033[0;36mDWH configured.\033[m'
    DWH configured.
    ++ basename /opt/kaltura/bin/kaltura-dwh-config.sh

  • send_install_becon kaltura-dwh-config.sh Etc/UTC install_success 0

  • trap - ERR

  • '[' -r /opt/kaltura/bin/contact.rc ']'

  • . /opt/kaltura/bin/contact.rc
    ++ USER_CONSENT=0

  • '[' -z 0 -o 0 = 0 ']'

  • return 0

the only real issue i see (with no great explanation is this:

/opt/kaltura/dwh/setup/dwh_setup.sh -uroot -k /opt/kaltura/pentaho/pdi/ -d/opt/kaltura/dwh -hsanitized.com -P3306 -pfakepass123
1
Error - bailing out!


Reply to this email directly or view it on GitHub.[AFBqvTR25uUmZlA43SshHzWEaQktvtzMks5n0doogaJpZM4Dt01j.gif]

@ghost
Copy link
Author

ghost commented Mar 12, 2015

ok after more review..

/opt/kaltura/dwh/setup/installation_log.log

has these values:

now executing /opt/kaltura/dwh/ddl//db_create.sql
ERROR 2003 (HY000): Can't connect to MySQL server on 'kitchenkal.sanitized.com' (111)
1

is this attribute: DWH_HOST
represent the DWH host.. or the database to use for the DWH setup?

@ghost
Copy link
Author

ghost commented Mar 12, 2015

we're using mysql (mysql cookbook recipe from chef)

@KalturaCommunity-zz
Copy link

DWH_HOST should be the DB host on which you wish to deploy the Analytics
databases [there are a few].
The kaltura-base-config script sets the values in
/opt/kaltura/dwh/.kettle/kettle.properties, /etc/kaltura.d/system.ini
And in /opt/kaltura/app/configurations/db.ini in accordance to your input.
mysql -h$DWH_HOST -uetl -p$DWH_PASS
should succeed in order for deployment to work

May the source be with you,
Jess Portnoy

On Thu, 12 Mar 2015, nukepuppy wrote:

ok after more review..

/opt/kaltura/dwh/setup/installation_log.log

has these values:

now executing /opt/kaltura/dwh/ddl//db_create.sql
ERROR 2003 (HY000): Can't connect to MySQL server on 'kitchenkal.sanitized.com' (111)
1

is this attribute: DWH_HOST
represent the DWH host.. or the database to use for the DWH setup?


Reply to this email directly or view it on GitHub.[ACH7Xi8KWXwXFnjkCiKHFFLP7LXLYaDvks5n0dsEgaJpZM4Dt01j.gif]

@ghost
Copy link
Author

ghost commented Mar 12, 2015

yeah that now makes sense....
I thought that DWH host would be just the hostname of something else but it seems that there would be multiple db possibilities..

i get this now and thanks for clarification

@ghost ghost closed this as completed Mar 12, 2015
@jessp01
Copy link
Contributor

jessp01 commented Mar 12, 2015

Sure, happy to help.
Note that you can deploy both kaltura operational DB and the DWH ones on
the same server if you wish.

May the source be with you,

Jess Portnoy

On Thu, 12 Mar 2015, nukepuppy wrote:

yeah that now makes sense....
I thought that DWH host would be just the hostname of something else but it seems that there would be multiple db possibilities..

i get this now and thanks for clarification


Reply to this email directly or view it on GitHub.[AFBqvRRXBtjr8FQCKIDYcxWFtBpoSN5Uks5n0dxMgaJpZM4Dt01j.gif]

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants