[ 
https://issues.apache.org/jira/browse/AMBARI-23104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

yuandeqiao updated AMBARI-23104:
--------------------------------
    Description: 
 

hive cli :

i don't know why hive cli enter exception point . i want to solve ,thanks!

[root@hive ~]# sudo -u hive hive
 log4j:WARN No such property [maxFileSize] in 
org.apache.log4j.DailyRollingFileAppender.

Logging initialized using configuration in 
[file:/etc/hive/2.6.3.0-235/0/hive-log4j.properties|file://etc/hive/2.6.3.0-235/0/hive-log4j.properties]
 Exception in thread "main" java.lang.RuntimeException: 
java.lang.RuntimeException: Unable to instantiate 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
 at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:552)
 at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
 at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
 Caused by: java.lang.RuntimeException: Unable to instantiate 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
 at 
org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1566)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:138)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:110)
 at 
org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3526)
 at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3558)
 at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:533)
 ... 8 more
 Caused by: java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at 
org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1564)
 ... 14 more
 Caused by: MetaException(message:Could not connect to meta store using any of 
the URIs provided. Most recent failure: 
org.apache.thrift.transport.TTransportException: GSS initiate failed
 at 
org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
 at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:316)
 at 
org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
 at 
org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52)
 at 
org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:422)
 at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
 at 
org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49)
 at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:487)
 at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:282)
 at 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:76)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at 
org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1564)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:138)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:110)
 at 
org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3526)
 at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3558)
 at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:533)
 at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
 at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
 )
 at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:534)
 at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:282)
 at 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:76)
 ... 19 more
 [root@hive ~]#

 

got from /var/log/hive/hiveserver2.log :

2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(316)) - Client 
protocol version: HIVE_CLI_SERVICE_PROTOCOL_V8
 2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:logInfo(773)) - 1: Shutting down 
the object store...
 2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(317)) - 
ugi=hive/[email protected] ip=unknown-ip-addr cmd=Shutting down the object 
store... 
 2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:logInfo(773)) - 1: Metastore 
shutdown complete.
 2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(317)) - 
ugi=hive/[email protected] ip=unknown-ip-addr cmd=Metastore shutdown 
complete. 
 2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:init(453)) - Begin calculating 
metadata count metrics.
 2018-02-28 17:07:24,816 WARN [HiveServer2-Handler-Pool: Thread-45]: 
conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
hive.internal.ss.authz.settings.applied.marker does not exist
 2018-02-28 17:07:24,820 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:newRawStoreForConf(619)) - 1: 
Opening raw store with implementation 
class:org.apache.hadoop.hive.metastore.ObjectStore
 2018-02-28 17:07:24,852 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.ObjectStore (ObjectStore.java:initializeHelper(383)) - ObjectStore, 
initialize called
 2018-02-28 17:07:24,981 WARN [HiveServer2-Handler-Pool: Thread-45]: 
conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
hive.internal.ss.authz.settings.applied.marker does not exist
 2018-02-28 17:07:24,986 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(163)) - Using 
direct SQL, underlying DB is OTHER
 2018-02-28 17:07:24,986 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.ObjectStore (ObjectStore.java:setConf(297)) - Initialized ObjectStore
 2018-02-28 17:07:24,990 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:init(455)) - Finished metadata 
count metrics: 1 databases, 0 tables, 0 partitions.
 2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_dbs] already exists. The old gauge will be overwritten, 
but this is not recommended
 2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_tables] already exists. The old gauge will be 
overwritten, but this is not recommended
 2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_partitions] already exists. The old gauge will be 
overwritten, but this is not recommended
 2018-02-28 17:07:25,014 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.ObjectStore (ObjectStore.java:initializeHelper(383)) - ObjectStore, 
initialize called
 2018-02-28 17:07:25,171 WARN [HiveServer2-Handler-Pool: Thread-45]: 
conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
hive.internal.ss.authz.settings.applied.marker does not exist
 2018-02-28 17:07:25,181 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(163)) - Using 
direct SQL, underlying DB is OTHER
 2018-02-28 17:07:25,181 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.ObjectStore (ObjectStore.java:setConf(297)) - Initialized ObjectStore
 2018-02-28 17:07:25,182 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:init(453)) - Begin calculating 
metadata count metrics.
 2018-02-28 17:07:25,185 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:init(455)) - Finished metadata 
count metrics: 1 databases, 0 tables, 0 partitions.
 2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_dbs] already exists. The old gauge will be overwritten, 
but this is not recommended
 2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_tables] already exists. The old gauge will be 
overwritten, but this is not recommended
 2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_partitions] already exists. The old gauge will be 
overwritten, but this is not recommended
 2018-02-28 17:07:25,219 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.SessionState (SessionState.java:createPath(682)) - Created local 
directory: /tmp/7645338b-a770-4ee8-8eb4-5ffe663652e0_resources
 2018-02-28 17:07:25,259 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.SessionState (SessionState.java:createPath(682)) - Created HDFS 
directory: /tmp/hive/ambari-qa/7645338b-a770-4ee8-8eb4-5ffe663652e0
 2018-02-28 17:07:25,261 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.SessionState (SessionState.java:createPath(682)) - Created local 
directory: /tmp/hive/7645338b-a770-4ee8-8eb4-5ffe663652e0
 2018-02-28 17:07:25,284 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.SessionState (SessionState.java:createPath(682)) - Created HDFS 
directory: 
/tmp/hive/ambari-qa/7645338b-a770-4ee8-8eb4-5ffe663652e0/_tmp_space.db
 2018-02-28 17:07:25,286 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.HiveSessionImpl (HiveSessionImpl.java:setOperationLogSessionDir(274)) - 
Operation log session directory is created: 
/tmp/hive/operation_logs/7645338b-a770-4ee8-8eb4-5ffe663652e0

  was:
在启用了kerberos 之前,登陆hive root 用户下,也就mkdir /user/root/  chown  一下就行了。

但是加上kerberos 后就不一样了

hive cli 登陆返回的异常:

[root@hive ~]# sudo -u hive hive
log4j:WARN No such property [maxFileSize] in 
org.apache.log4j.DailyRollingFileAppender.

Logging initialized using configuration in 
file:/etc/hive/2.6.3.0-235/0/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: 
java.lang.RuntimeException: Unable to instantiate 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
 at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:552)
 at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
 at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
Caused by: java.lang.RuntimeException: Unable to instantiate 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
 at 
org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1566)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:138)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:110)
 at 
org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3526)
 at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3558)
 at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:533)
 ... 8 more
Caused by: java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at 
org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1564)
 ... 14 more
Caused by: MetaException(message:Could not connect to meta store using any of 
the URIs provided. Most recent failure: 
org.apache.thrift.transport.TTransportException: GSS initiate failed
 at 
org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
 at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:316)
 at 
org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
 at 
org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52)
 at 
org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49)
 at java.security.AccessController.doPrivileged(Native Method)
 at javax.security.auth.Subject.doAs(Subject.java:422)
 at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
 at 
org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49)
 at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:487)
 at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:282)
 at 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:76)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
 at 
org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1564)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:138)
 at 
org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:110)
 at 
org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3526)
 at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3558)
 at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:533)
 at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
 at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
 at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
)
 at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:534)
 at 
org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:282)
 at 
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:76)
 ... 19 more
[root@hive ~]#

 

另外检查到/var/log/hive/hiveserver2.log日志可能的一些异常如下:

2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(316)) - Client 
protocol version: HIVE_CLI_SERVICE_PROTOCOL_V8
2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:logInfo(773)) - 1: Shutting down 
the object store...
2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(317)) - 
ugi=hive/[email protected] ip=unknown-ip-addr cmd=Shutting down the object 
store... 
2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:logInfo(773)) - 1: Metastore 
shutdown complete.
2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(317)) - 
ugi=hive/[email protected] ip=unknown-ip-addr cmd=Metastore shutdown 
complete. 
2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:init(453)) - Begin calculating 
metadata count metrics.
2018-02-28 17:07:24,816 WARN [HiveServer2-Handler-Pool: Thread-45]: 
conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
hive.internal.ss.authz.settings.applied.marker does not exist
2018-02-28 17:07:24,820 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:newRawStoreForConf(619)) - 1: 
Opening raw store with implementation 
class:org.apache.hadoop.hive.metastore.ObjectStore
2018-02-28 17:07:24,852 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.ObjectStore (ObjectStore.java:initializeHelper(383)) - ObjectStore, 
initialize called
2018-02-28 17:07:24,981 WARN [HiveServer2-Handler-Pool: Thread-45]: 
conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
hive.internal.ss.authz.settings.applied.marker does not exist
2018-02-28 17:07:24,986 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(163)) - Using 
direct SQL, underlying DB is OTHER
2018-02-28 17:07:24,986 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.ObjectStore (ObjectStore.java:setConf(297)) - Initialized ObjectStore
2018-02-28 17:07:24,990 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:init(455)) - Finished metadata 
count metrics: 1 databases, 0 tables, 0 partitions.
2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_dbs] already exists. The old gauge will be overwritten, 
but this is not recommended
2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_tables] already exists. The old gauge will be 
overwritten, but this is not recommended
2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_partitions] already exists. The old gauge will be 
overwritten, but this is not recommended
2018-02-28 17:07:25,014 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.ObjectStore (ObjectStore.java:initializeHelper(383)) - ObjectStore, 
initialize called
2018-02-28 17:07:25,171 WARN [HiveServer2-Handler-Pool: Thread-45]: 
conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
hive.internal.ss.authz.settings.applied.marker does not exist
2018-02-28 17:07:25,181 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(163)) - Using 
direct SQL, underlying DB is OTHER
2018-02-28 17:07:25,181 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.ObjectStore (ObjectStore.java:setConf(297)) - Initialized ObjectStore
2018-02-28 17:07:25,182 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:init(453)) - Begin calculating 
metadata count metrics.
2018-02-28 17:07:25,185 INFO [HiveServer2-Handler-Pool: Thread-45]: 
metastore.HiveMetaStore (HiveMetaStore.java:init(455)) - Finished metadata 
count metrics: 1 databases, 0 tables, 0 partitions.
2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_dbs] already exists. The old gauge will be overwritten, 
but this is not recommended
2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_tables] already exists. The old gauge will be 
overwritten, but this is not recommended
2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
name [init_total_count_partitions] already exists. The old gauge will be 
overwritten, but this is not recommended
2018-02-28 17:07:25,219 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.SessionState (SessionState.java:createPath(682)) - Created local 
directory: /tmp/7645338b-a770-4ee8-8eb4-5ffe663652e0_resources
2018-02-28 17:07:25,259 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.SessionState (SessionState.java:createPath(682)) - Created HDFS 
directory: /tmp/hive/ambari-qa/7645338b-a770-4ee8-8eb4-5ffe663652e0
2018-02-28 17:07:25,261 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.SessionState (SessionState.java:createPath(682)) - Created local 
directory: /tmp/hive/7645338b-a770-4ee8-8eb4-5ffe663652e0
2018-02-28 17:07:25,284 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.SessionState (SessionState.java:createPath(682)) - Created HDFS 
directory: 
/tmp/hive/ambari-qa/7645338b-a770-4ee8-8eb4-5ffe663652e0/_tmp_space.db
2018-02-28 17:07:25,286 INFO [HiveServer2-Handler-Pool: Thread-45]: 
session.HiveSessionImpl (HiveSessionImpl.java:setOperationLogSessionDir(274)) - 
Operation log session directory is created: 
/tmp/hive/operation_logs/7645338b-a770-4ee8-8eb4-5ffe663652e0


> ambari-hive-kerberos-cli
> ------------------------
>
>                 Key: AMBARI-23104
>                 URL: https://issues.apache.org/jira/browse/AMBARI-23104
>             Project: Ambari
>          Issue Type: Story
>          Components: amvari-me
>         Environment: centos6.8  hdp-2.6.3.0 
>            Reporter: yuandeqiao
>            Priority: Major
>              Labels: hive, kerberos
>
>  
> hive cli :
> i don't know why hive cli enter exception point . i want to solve ,thanks!
> [root@hive ~]# sudo -u hive hive
>  log4j:WARN No such property [maxFileSize] in 
> org.apache.log4j.DailyRollingFileAppender.
> Logging initialized using configuration in 
> [file:/etc/hive/2.6.3.0-235/0/hive-log4j.properties|file://etc/hive/2.6.3.0-235/0/hive-log4j.properties]
>  Exception in thread "main" java.lang.RuntimeException: 
> java.lang.RuntimeException: Unable to instantiate 
> org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
>  at 
> org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:552)
>  at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
>  at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
>  at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
>  Caused by: java.lang.RuntimeException: Unable to instantiate 
> org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
>  at 
> org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1566)
>  at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
>  at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:138)
>  at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:110)
>  at 
> org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3526)
>  at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3558)
>  at 
> org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:533)
>  ... 8 more
>  Caused by: java.lang.reflect.InvocationTargetException
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>  at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>  at 
> org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1564)
>  ... 14 more
>  Caused by: MetaException(message:Could not connect to meta store using any 
> of the URIs provided. Most recent failure: 
> org.apache.thrift.transport.TTransportException: GSS initiate failed
>  at 
> org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232)
>  at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:316)
>  at 
> org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
>  at 
> org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52)
>  at 
> org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at javax.security.auth.Subject.doAs(Subject.java:422)
>  at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1866)
>  at 
> org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49)
>  at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:487)
>  at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:282)
>  at 
> org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:76)
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>  at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>  at 
> org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1564)
>  at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:92)
>  at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:138)
>  at 
> org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:110)
>  at 
> org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3526)
>  at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3558)
>  at 
> org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:533)
>  at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
>  at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>  at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
>  at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
>  )
>  at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:534)
>  at 
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:282)
>  at 
> org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:76)
>  ... 19 more
>  [root@hive ~]#
>  
> got from /var/log/hive/hiveserver2.log :
> 2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> thrift.ThriftCLIService (ThriftCLIService.java:OpenSession(316)) - Client 
> protocol version: HIVE_CLI_SERVICE_PROTOCOL_V8
>  2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.HiveMetaStore (HiveMetaStore.java:logInfo(773)) - 1: Shutting down 
> the object store...
>  2018-02-28 17:07:24,671 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(317)) - 
> ugi=hive/[email protected] ip=unknown-ip-addr cmd=Shutting down the 
> object store... 
>  2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.HiveMetaStore (HiveMetaStore.java:logInfo(773)) - 1: Metastore 
> shutdown complete.
>  2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> HiveMetaStore.audit (HiveMetaStore.java:logAuditEvent(317)) - 
> ugi=hive/[email protected] ip=unknown-ip-addr cmd=Metastore shutdown 
> complete. 
>  2018-02-28 17:07:24,672 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.HiveMetaStore (HiveMetaStore.java:init(453)) - Begin calculating 
> metadata count metrics.
>  2018-02-28 17:07:24,816 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
> hive.internal.ss.authz.settings.applied.marker does not exist
>  2018-02-28 17:07:24,820 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.HiveMetaStore (HiveMetaStore.java:newRawStoreForConf(619)) - 1: 
> Opening raw store with implementation 
> class:org.apache.hadoop.hive.metastore.ObjectStore
>  2018-02-28 17:07:24,852 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.ObjectStore (ObjectStore.java:initializeHelper(383)) - ObjectStore, 
> initialize called
>  2018-02-28 17:07:24,981 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
> hive.internal.ss.authz.settings.applied.marker does not exist
>  2018-02-28 17:07:24,986 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(163)) - Using 
> direct SQL, underlying DB is OTHER
>  2018-02-28 17:07:24,986 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.ObjectStore (ObjectStore.java:setConf(297)) - Initialized 
> ObjectStore
>  2018-02-28 17:07:24,990 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.HiveMetaStore (HiveMetaStore.java:init(455)) - Finished metadata 
> count metrics: 1 databases, 0 tables, 0 partitions.
>  2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
> name [init_total_count_dbs] already exists. The old gauge will be 
> overwritten, but this is not recommended
>  2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
> name [init_total_count_tables] already exists. The old gauge will be 
> overwritten, but this is not recommended
>  2018-02-28 17:07:24,991 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
> name [init_total_count_partitions] already exists. The old gauge will be 
> overwritten, but this is not recommended
>  2018-02-28 17:07:25,014 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.ObjectStore (ObjectStore.java:initializeHelper(383)) - ObjectStore, 
> initialize called
>  2018-02-28 17:07:25,171 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> conf.HiveConf (HiveConf.java:initialize(3093)) - HiveConf of name 
> hive.internal.ss.authz.settings.applied.marker does not exist
>  2018-02-28 17:07:25,181 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.MetaStoreDirectSql (MetaStoreDirectSql.java:<init>(163)) - Using 
> direct SQL, underlying DB is OTHER
>  2018-02-28 17:07:25,181 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.ObjectStore (ObjectStore.java:setConf(297)) - Initialized 
> ObjectStore
>  2018-02-28 17:07:25,182 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.HiveMetaStore (HiveMetaStore.java:init(453)) - Begin calculating 
> metadata count metrics.
>  2018-02-28 17:07:25,185 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> metastore.HiveMetaStore (HiveMetaStore.java:init(455)) - Finished metadata 
> count metrics: 1 databases, 0 tables, 0 partitions.
>  2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
> name [init_total_count_dbs] already exists. The old gauge will be 
> overwritten, but this is not recommended
>  2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
> name [init_total_count_tables] already exists. The old gauge will be 
> overwritten, but this is not recommended
>  2018-02-28 17:07:25,185 WARN [HiveServer2-Handler-Pool: Thread-45]: 
> metrics2.CodahaleMetrics (CodahaleMetrics.java:addGauge(299)) - A Gauge with 
> name [init_total_count_partitions] already exists. The old gauge will be 
> overwritten, but this is not recommended
>  2018-02-28 17:07:25,219 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> session.SessionState (SessionState.java:createPath(682)) - Created local 
> directory: /tmp/7645338b-a770-4ee8-8eb4-5ffe663652e0_resources
>  2018-02-28 17:07:25,259 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> session.SessionState (SessionState.java:createPath(682)) - Created HDFS 
> directory: /tmp/hive/ambari-qa/7645338b-a770-4ee8-8eb4-5ffe663652e0
>  2018-02-28 17:07:25,261 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> session.SessionState (SessionState.java:createPath(682)) - Created local 
> directory: /tmp/hive/7645338b-a770-4ee8-8eb4-5ffe663652e0
>  2018-02-28 17:07:25,284 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> session.SessionState (SessionState.java:createPath(682)) - Created HDFS 
> directory: 
> /tmp/hive/ambari-qa/7645338b-a770-4ee8-8eb4-5ffe663652e0/_tmp_space.db
>  2018-02-28 17:07:25,286 INFO [HiveServer2-Handler-Pool: Thread-45]: 
> session.HiveSessionImpl (HiveSessionImpl.java:setOperationLogSessionDir(274)) 
> - Operation log session directory is created: 
> /tmp/hive/operation_logs/7645338b-a770-4ee8-8eb4-5ffe663652e0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to