hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vivek Shrivastava <vivshrivast...@gmail.com>
Subject Re: Start HiveServer2 with Kerberos meet FATAL error
Date Thu, 20 Oct 2016 12:40:32 GMT
make sense.. glad to know that it has resolved your problem.

On Thu, Oct 20, 2016 at 12:11 AM, Micro dong <microle.dong@gmail.com> wrote:

> 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 <vivshrivastava@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.dong@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.dong@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 <
> vivshrivastava@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/
> > > >> tempt48@HADOOP.COM
> > > >>
> > > >>
> > > >> On Tue, Oct 18, 2016 at 10:16 PM, Micro dong <
> microle.dong@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/tempt48@HADOOP.COM
> > > >> (aes128-cts-hmac-sha1-96)
> > > >> >    2 10/12/16 15:31:57 hive2/tempt48@HADOOP.COM (des3-cbc-sha1)
> > > >> >    2 10/12/16 15:31:57 hive2/tempt48@HADOOP.COM (arcfour-hmac)
> > > >> >    2 10/12/16 15:31:57 hive2/tempt48@HADOOP.COM (des-hmac-sha1)
> > > >> >    2 10/12/16 15:31:57 hive2/tempt48@HADOOP.COM (des-cbc-md5)
> > > >> > [work@tempt48 ~]$ hostname
> > > >> > tempt48
> > > >> > [work@tempt48 ~]$ hostname -f
> > > >> > tempt48
> > > >> >
> > > >> >
> > > >> > 2016-10-18 17:48 GMT+08:00 Vivek Shrivastava <
> > > vivshrivastava@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.dong@gmail.com
> > > >
> > > >> > > wrote:
> > > >> > >
> > > >> > > > tempt48 <tempt48.hadoop.com@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.chen@intel.com
> > > >> >:
> > > >> > > >
> > > >> > > > > Please try to use full qualified name of host,
 such as
> hive2/
> > > >> > > > > tempt48.hadoop.com@HADOOP.COM
> > > >> > > > >
> > > >> > > > > -----Original Message-----
> > > >> > > > > From: Micro dong [mailto:microle.dong@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/tempt48@HADOOP.COM
> > > >> > > > >
> > > >> > > > > Valid starting     Expires            Service
principal
> > > >> > > > > 10/18/16 14:23:04  10/19/16 14:23:04  krbtgt/
> > > >> HADOOP.COM@HADOOP.COM
> > > >> > > renew
> > > >> > > > > until 10/28/16 14:23:04
> > > >> > > > >
> > > >> > > > > 2016-10-18 12:07 GMT+08:00 Vivek Shrivastava <
> > > >> > vivshrivastava@gmail.com
> > > >> > > >:
> > > >> > > > >
> > > >> > > > > > can you please change this line
> > > >> > > > > >
> > > >> > > > > > <value>hive2/_HOST@HADOOP.COM <HOST@HADOOP.COM></value>*
> > with
> > > >> > > > > > <value>hive2/_HOST@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.dong@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/_HOST@HADOOP.COM
<HOST@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
> > > >> > > > > > >
> > > >> > > > > >
> > > >> > > > >
> > > >> > > > >
> > > >> > > > >
> > > >> > > > > --
> > > >> > > > > 英者自知,雄者自胜。
> > > >> > > > >
> > > >> > > >
> > > >> > > >
> > > >> > > >
> > > >> > > > --
> > > >> > > > 英者自知,雄者自胜。
> > > >> > > >
> > > >> > >
> > > >> >
> > > >> >
> > > >> >
> > > >> > --
> > > >> > 英者自知,雄者自胜。
> > > >> >
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > 英者自知,雄者自胜。
> > > >
> > >
> > >
> > >
> > > --
> > > 英者自知,雄者自胜。
> > >
> >
>
>
>
> --
> 英者自知,雄者自胜。
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message