It's done. Because hadoop client which hive use didn't integrated with Kerberos. thanks for your suggestion.
2016-10-19 11:03 GMT+08:00 Vivek Shrivastava <vivshrivast...@gmail.com>: > How are you starting the service? Do you have Hadoop setup done and > integrated with Kerberos? > > On Tue, Oct 18, 2016 at 10:33 PM, Micro dong <microle.d...@gmail.com> > wrote: > > > It seems to me it's trying to login into HiveServer with unix username > > instead of Kerberos keytab > > > > 2016-10-19 10:30 GMT+08:00 Micro dong <microle.d...@gmail.com>: > > > > > it also meet the same error too. > > > > > > *2016-10-19 10:28:07,300 FATAL [Thread-9]: thrift.ThriftCLIService > > > (ThriftBinaryCLIService.java:run(101)) - Error starting HiveServer2: > > could > > > not start ThriftBinaryCLIService* > > > *javax.security.auth.login.LoginException: Kerberos principal should > > have > > > 3 parts: work* > > > * at > > > org.apache.hive.service.auth.HiveAuthFactory.getAuthTransFactory( > > HiveAuthFactory.java:147)* > > > * at > > > org.apache.hive.service.cli.thrift.ThriftBinaryCLIService. > > run(ThriftBinaryCLIService.java:58)* > > > * at java.lang.Thread.run(Thread.java:722)* > > > > > > 2016-10-19 10:22 GMT+08:00 Vivek Shrivastava <vivshrivast...@gmail.com > >: > > > > > >> This looks good. Please run this one and then try starting the > service. > > >> > > >> kinit -kt /home/work/software/hive/conf/hive.keytab hive2/ > > >> temp...@hadoop.com > > >> > > >> > > >> On Tue, Oct 18, 2016 at 10:16 PM, Micro dong <microle.d...@gmail.com> > > >> wrote: > > >> > > >> > [work@tempt48 ~]$ klist -ket /home/work/software/hive/conf/ > > hive.keytab > > >> > Keytab name: FILE:/home/work/software/hive/conf/hive.keytab > > >> > KVNO Timestamp Principal > > >> > ---- ----------------- > > >> > -------------------------------------------------------- > > >> > 2 10/12/16 15:31:57 hive2/temp...@hadoop.com > > >> (aes128-cts-hmac-sha1-96) > > >> > 2 10/12/16 15:31:57 hive2/temp...@hadoop.com (des3-cbc-sha1) > > >> > 2 10/12/16 15:31:57 hive2/temp...@hadoop.com (arcfour-hmac) > > >> > 2 10/12/16 15:31:57 hive2/temp...@hadoop.com (des-hmac-sha1) > > >> > 2 10/12/16 15:31:57 hive2/temp...@hadoop.com (des-cbc-md5) > > >> > [work@tempt48 ~]$ hostname > > >> > tempt48 > > >> > [work@tempt48 ~]$ hostname -f > > >> > tempt48 > > >> > > > >> > > > >> > 2016-10-18 17:48 GMT+08:00 Vivek Shrivastava < > > vivshrivast...@gmail.com > > >> >: > > >> > > > >> > > What is the output of > > >> > > klist -ket /home/work/software/hive/conf/hive.keytab > > >> > > and > > >> > > hostname > > >> > > and > > >> > > hostname -f > > >> > > > > >> > > On Tue, Oct 18, 2016 at 4:18 AM, Micro dong < > microle.d...@gmail.com > > > > > >> > > wrote: > > >> > > > > >> > > > tempt48 <tempt48.hadoop....@hadoop.com> is the local machine's > > >> > hostname > > >> > > > which is configured in /etc/hosts. > > >> > > > > > >> > > > 2016-10-18 15:33 GMT+08:00 Chen, Junjie J < > > junjie.j.c...@intel.com > > >> >: > > >> > > > > > >> > > > > Please try to use full qualified name of host, such as hive2/ > > >> > > > > tempt48.hadoop....@hadoop.com > > >> > > > > > > >> > > > > -----Original Message----- > > >> > > > > From: Micro dong [mailto:microle.d...@gmail.com] > > >> > > > > Sent: Tuesday, October 18, 2016 2:37 PM > > >> > > > > To: dev@hive.apache.org > > >> > > > > Subject: Re: Start HiveServer2 with Kerberos meet FATAL error > > >> > > > > > > >> > > > > I follow your suggestion and it also meet the same error too. > > >> > > > > > > >> > > > > *start hiveservice* > > >> > > > > /home/work/software/hive/bin/hive --service hiveserver2 > > >> > > > > > > >> > > > > > > >> > > > > *klist output* > > >> > > > > Ticket cache: FILE:/tmp/krb5cc_31100 > > >> > > > > Default principal: hive2/temp...@hadoop.com > > >> > > > > > > >> > > > > Valid starting Expires Service principal > > >> > > > > 10/18/16 14:23:04 10/19/16 14:23:04 krbtgt/ > > >> hadoop....@hadoop.com > > >> > > renew > > >> > > > > until 10/28/16 14:23:04 > > >> > > > > > > >> > > > > 2016-10-18 12:07 GMT+08:00 Vivek Shrivastava < > > >> > vivshrivast...@gmail.com > > >> > > >: > > >> > > > > > > >> > > > > > can you please change this line > > >> > > > > > > > >> > > > > > <value>hive2/_h...@hadoop.com <h...@hadoop.com></value>* > with > > >> > > > > > <value>hive2/_h...@hadoop.com</value>* > > >> > > > > > > > >> > > > > > How are you starting the service, What is the klist output? > > >> > > > > > > > >> > > > > > > > >> > > > > > On Mon, Oct 17, 2016 at 11:09 PM, Micro dong < > > >> > microle.d...@gmail.com > > >> > > > > > >> > > > > > wrote: > > >> > > > > > > > >> > > > > > > I'm trying to configure HiveServer2(hive-1.2.1) With > > >> > Kerberos。Here > > >> > > > > > > is my Hive's configuration file。 > > >> > > > > > > *<property>* > > >> > > > > > > * <name>hive.server2.authentication</name>* > > >> > > > > > > * <value>KERBEROS</value>* > > >> > > > > > > * </property>* > > >> > > > > > > * <property>* > > >> > > > > > > * <name>hive.server2.authentication.kerberos. > > >> > principal</name>* > > >> > > > > > > * <value>hive2/_h...@hadoop.com <h...@hadoop.com > > ></value>* > > >> > > > > > > * </property>* > > >> > > > > > > * <property>* > > >> > > > > > > * <name>hive.server2.authenticat > > >> ion.kerberos.keytab</name>* > > >> > > > > > > * <value>/home/work/software/hiv > > >> e/conf/hive.keytab</value>* > > >> > > > > > > * </property>* > > >> > > > > > > > > >> > > > > > > the keytab file is in its location, its owner is work. But > > >> when I > > >> > > > > > > try to start the HiveServer2, I see this message on the > log: > > >> > > > > > > > > >> > > > > > > *2016-10-18 10:20:24,867 FATAL [Thread-9]: > > >> > thrift.ThriftCLIService > > >> > > > > > > (ThriftBinaryCLIService.java:run(101)) - Error starting > > >> > > HiveServer2: > > >> > > > > > could > > >> > > > > > > not start ThriftBinaryCLIService* > > >> > > > > > > *javax.security.auth.login.LoginException: Kerberos > > principal > > >> > > should > > >> > > > > > have > > >> > > > > > > 3 > > >> > > > > > > parts: work** at * > > >> > > > > > > *org.apache.hive.service.auth.HiveAuthFactory. > > >> > getAuthTransFactory( > > >> > > > > > > HiveAuthFactory.java:147)* > > >> > > > > > > *atorg.apache.hive.service.cli.thrift. > > >> > ThriftBinaryCLIService.run( > > >> > > > > > > ThriftBinaryCLIService.java:58)* > > >> > > > > > > *at java.lang.Thread.run(Thread.java:722)* > > >> > > > > > > > > >> > > > > > > Here *work* is my unix login name. Any help would be > highly > > >> > > > > appreciated. > > >> > > > > > > Best regards > > >> > > > > > > > > >> > > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > -- > > >> > > > > 英者自知,雄者自胜。 > > >> > > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > -- > > >> > > > 英者自知,雄者自胜。 > > >> > > > > > >> > > > > >> > > > >> > > > >> > > > >> > -- > > >> > 英者自知,雄者自胜。 > > >> > > > >> > > > > > > > > > > > > -- > > > 英者自知,雄者自胜。 > > > > > > > > > > > -- > > 英者自知,雄者自胜。 > > > -- 英者自知,雄者自胜。