we have multiple hive versions installed on the same machine and we use export HIVE_HOME via CLI which I think it is why we run into that issue. As suggested, we use the complete execution CLI path and it looks good.
Thanks and closing this issue. regards, Q On Thu, Jul 14, 2016 at 12:27 PM, Mich Talebzadeh <mich.talebza...@gmail.com > wrote: > Hi qiuzhuang > > hive is a bash file. > > try running it with > > sh -x $HIVE_HOME/bin/hive --service metastore > > > To see where it is failing. > > In general I source the environment file before running the query. I am on > Hive 2 and it works. Have not tried Hive 2.1 > > #!/bin/ksh > ENVFILE=/home/hduser/dba/bin/environment.ksh > if [[ -f $ENVFILE ]] > then > . $ENVFILE > else > echo "Abort: $0 failed. No environment file ( $ENVFILE ) found" > exit 1 > fi > FILE_NAME=`basename $0 .ksh` > LOG_FILE=${LOGDIR}/${FILE_NAME}.log > [ -f ${LOG_FILE} ] && rm -f ${LOG_FILE} > echo `date` " ""======= Starting hiveserver metastore =======" >> > ${LOG_FILE} > $HIVE_HOME/bin/hive --service metastore & > netstat -alnp|egrep 'Local|9083' > echo `date` " ""======= Started hiveserver2 metastore =======" >> > ${LOG_FILE} > exit > > HTH > > > > Dr Mich Talebzadeh > > > > LinkedIn * > https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw > <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>* > > > > http://talebzadehmich.wordpress.com > > > *Disclaimer:* Use it at your own risk. Any and all responsibility for any > loss, damage or destruction of data or any other property which may arise > from relying on this email's technical content is explicitly disclaimed. > The author will in no case be liable for any monetary damages arising from > such loss, damage or destruction. > > > > On 14 July 2016 at 03:01, Qiuzhuang Lian <qiuzhuang.l...@gmail.com> wrote: > >> Hi Mich, >> >> >> I have to use this command: >> >> bin/hive --service metastore >> >> then it works. >> >> While setting HIVE_HOME and add hive bin path, then issue command as >> follows, >> >> hive --service metastore >> >> it would breaks. >> >> I think shell under bin should be improved to address this? >> >> Regards, >> qiuzhuang >> >> >> >> On Thu, Jul 14, 2016 at 12:39 AM, Mich Talebzadeh < >> mich.talebza...@gmail.com> wrote: >> >>> Can hardly read the image :) >>> >>> Did you start the metastore before? >>> >>> $HIVE_HOME/bin/hive --service metastore & >>> >>> Assuming it is running on default port 9083 do you see the process >>> >>> netstat -alnp|egrep 'Local|9083' >>> >>> >>> and then the same for Hive thrift server >>> >>> $HIVE_HOME/bin/hiveserver2 & >>> >>> By default that runs on port 10000 >>> >>> >>> HTH >>> >>> Dr Mich Talebzadeh >>> >>> >>> >>> LinkedIn * >>> https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw >>> <https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>* >>> >>> >>> >>> http://talebzadehmich.wordpress.com >>> >>> >>> *Disclaimer:* Use it at your own risk. Any and all responsibility for >>> any loss, damage or destruction of data or any other property which may >>> arise from relying on this email's technical content is explicitly >>> disclaimed. The author will in no case be liable for any monetary damages >>> arising from such loss, damage or destruction. >>> >>> >>> >>> On 13 July 2016 at 17:33, Qiuzhuang Lian <qiuzhuang.l...@gmail.com> >>> wrote: >>> >>>> We download hive 2.1 and run into errors when starting to >>>> metastore/hiveserver2 services, here is the errors, >>>> >>>> Any clues? >>>> >>>> Regards, >>>> Qiuzhuang >>>> >>>> [image: Inline image 1] >>>> >>>> >>>> >>> >> >