Created on 11-01-2017 09:06 AM - edited 08-18-2019 02:17 AM
we try to start the hive server on master01 machine as the following:
[root@master01 hive]# su hive
[hive@master01 hive]$ /usr/bin/hive --service hiveserver2
but hive command not print anything and hive server still stop
what are the option to check why hive not start?
Created 11-01-2017 10:14 AM
Please try the following command to start hiveserver2 (looks like above doc link has some issues)
# su hive -l -c 'HIVE_CONF_DIR=/etc/hive/conf.server /usr/hdp/current/hive-server2/bin/hiveserver2 -hiveconf hive.metastore.uris=" " -hiveconf hive.log.dir=/var/log/hive -hiveconf hive.log.file=hiveserver2.log 1>/var/log/hive/hiveserver2.log 2>/var/log/hive/hiveserver2.log &'
.
Created 11-01-2017 09:21 AM
May be you can try something like mentioned in the link: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_reference/content/starting_hdp_services....
Start HiveServer2. On the Hive Server2 host machine, execute the following commands:
su $HIVE_USER nohup /usr/hdp/current/hive-server2/bin/hiveserver2 -hiveconf hive.metastore.uris=/tmp/hiveserver2HD.out 2 /tmp/hiveserver2HD.log
.
Also better to remove the PID file from before starting the process.
# ls -l /var/run/hive/hive-server.pid
.
Created 11-01-2017 09:49 AM
I run the command but it stuck for along time , regarding the hive-server.pid we have only the file - ls /var/run/hive/ hive.pid , bytheway hive server is running on master03 machine , but not on master01
Created 11-01-2017 10:14 AM
Please try the following command to start hiveserver2 (looks like above doc link has some issues)
# su hive -l -c 'HIVE_CONF_DIR=/etc/hive/conf.server /usr/hdp/current/hive-server2/bin/hiveserver2 -hiveconf hive.metastore.uris=" " -hiveconf hive.log.dir=/var/log/hive -hiveconf hive.log.file=hiveserver2.log 1>/var/log/hive/hiveserver2.log 2>/var/log/hive/hiveserver2.log &'
.
Created 11-01-2017 10:15 AM
Additionally please also refer to :
Created 11-01-2017 10:40 AM
we get many error like EmulatedXAResource@64deb58f, error code TMNOFLAGS and transaction: [DataNucleus Transaction, ID=Xid=#, enlisted resources=[]] 2017-11-01 10:35:20,363 DEBUG [main]: DataNucleus.Transaction (Log4JLogger.java:debug(58)) - Running enlist operation on resource: org.datanucleus.store.rdbms.ConnectionFactoryImpl$EmulatedXAResource@64deb58f, error code TMNOFLAGS and transaction: [DataNucleus Transaction, ID=Xid=#, enlisted resources=[]] javax.jdo.JDODataStoreException: Error executing SQL query "select "DB_ID" from "DBS"". java.sql.SQLSyntaxErrorException: Table/View 'DBS' does not exist. Caused by: ERROR 42X05: Table/View 'DBS' does not exist.
java.lang.RuntimeException: Error applying authorization policy on hive configuration: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient