--help me!---




Hi Hive users! Please help me, I can’t start Hive Metastore!



I have started Hive Metastore and using Kerberos for authentication.



In Kerberos, I created a principal:    bss_ra/mas...@example.com



[bss_ra@master sbin]$ sudo kadmin.local

Authenticating as principal root/ad...@example.com with password.

kadmin.local:  addprinc -randkey bss_ra/mas...@example.com

WARNING: no policy specified for bss_ra/mas...@example.com; defaulting to
no policy

Principal "bss_ra/mas...@example.com" created



And keytab file for principal above:   bss_ra.service.keytab



kadmin.local:  xst -norandkey -k bss_ra.service.keytab bss_ra/
mas...@example.com

Entry for principal bss_ra/mas...@example.com with kvno 1, encryption type
aes256-cts-hmac-sha1-96 added to keytab WRFILE:bss_ra.service.keytab.

Entry for principal bss_ra/mas...@example.com with kvno 1, encryption type
aes128-cts-hmac-sha1-96 added to keytab WRFILE:bss_ra.service.keytab.

Entry for principal bss_ra/mas...@example.com with kvno 1, encryption type
des3-cbc-sha1 added to keytab WRFILE:bss_ra.service.keytab.

Entry for principal bss_ra/mas...@example.com with kvno 1, encryption type
arcfour-hmac added to keytab WRFILE:bss_ra.service.keytab.

Entry for principal bss_ra/mas...@example.com with kvno 1, encryption type
des-hmac-sha1 added to keytab WRFILE:bss_ra.service.keytab.

Entry for principal bss_ra/mas...@example.com with kvno 1, encryption type
des-cbc-md5 added to keytab WRFILE:bss_ra.service.keytab.



And in my hive-site.xml configuration, I configured:



<configuration>

        <property>

                <name>fs.default.name</name>

                <value>hdfs://master:54310</ value>

        </property>

        <property>

                <name>mapred.job.tracker</
name>

                <value>master:9311</value>

        </property>

        <property>

                <name>hive.metastore.warehouse.dir</name>

                <value>hdfs://master:54310/user/hive/warehouse</value>

        </property>

        <property>

                <name>hive.metastore.local</name>

                <value>true</value>

        </property>

        <property>

                <name>javax.jdo.option.ConnectionURL</name>


<value>jdbc:mysql://master:3306/hive?createDatabaseIfNotExist=true</value>

        </property>

        <property>

                <name>javax.jdo.option.ConnectionDriverName</name>

                <value>com.mysql.jdbc.Driver</value>

        </property>

        <property>

                <name>javax.jdo.option.ConnectionUserName</name>

                <value>duytx</value>

        </property>

        <property>

                <name>javax.jdo.option.ConnectionPassword</name>

                <value>duytxt</value>

        </property>



        <property>

                <name>hive.exec.parallel</name>

                <value>true</value>

        </property>





        <property>

                <name>hive.metastore.sasl.enabled</name>

                <value>true</value>

        </property>



        <property>

          <name>hive.metastore.kerberos.keytab.file</name>

          <value>/u01/APP/bss_ra/bss_ra.service.keytab</value>

        </property>



        <property>

          <name>hive.metastore.kerberos.principal</name>

          <value>bss_ra/mas...@example.com</value>

          <description>The service principal for the metastore thrift
server. The special string _HOST will be replaced automatically with the
correct host name.</description>

        </property>

</configuration>



And these are logs when I start hive metastore:



[bss_ra@master bin]$ ./hive --service metastore

Starting Hive Metastore Server

WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please
use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties
files.

org.apache.thrift.transport.TTransportException: Kerberos principal should
have 3 parts: bss_ra

        at
org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server.createTransportFactory(HadoopThriftAuthBridge20S.java:268)

        at
org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:3780)

        at
org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:3729)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)

Exception in thread "main" org.apache.thrift.transport.TTransportException:
Kerberos principal should have 3 parts: bss_ra

        at
org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge20S$Server.createTransportFactory(HadoopThriftAuthBridge20S.java:268)

        at
org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:3780)

        at
org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:3729)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)





Please tell me where I wrong, or there is any configuration had I missed?



Thank you very much!!


-- 

Nguyễn Văn Chung
Mobile: +84989746579

Reply via email to