hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anil gupta <anilgupt...@gmail.com>
Subject Re: Configuration for hbase client to connect to secure cluster
Date Thu, 26 Jun 2014 06:17:49 GMT
ohk..Rather than doing kinit and then running your java client. Can you try
running your java client by making conf like this:

Configuration conf = HBaseConfiguration.create();
        // security stuff
        if (keytab != null && principal != null){
            keytab = keytab.trim();
            principal = principal.trim();
            if(!keytab.isEmpty() && !principal.isEmpty()){
            conf.set("hbase.myclient.keytab", keytab);
            conf.set("hbase.myclient.principal", principal);
            UserGroupInformation.setConfiguration(conf);
            User.login(conf, "hbase.myclient.keytab",
"hbase.myclient.principal", null);
            }
        }


On Wed, Jun 25, 2014 at 11:00 PM, kulkarni.swarnim@gmail.com <
kulkarni.swarnim@gmail.com> wrote:

> Thanks for reply Anil. I am on CDH4.4. And I verified that I have only the
> config for the secure cluster is the only one on the path. Interstingly my
> hbase shell works just fine with kinit but my custom client fails.
>
>
> On Thu, Jun 26, 2014 at 12:16 AM, anil gupta <anilgupta84@gmail.com>
> wrote:
>
> > Hi Swarnim,
> >
> > It seems like you have a mismatch between client and server hbase
> > configuration. Do you have the configuration of both secure and
> non-secure
> > cluster in classpath of your application? If yes, please make sure that
> at
> > a given point of time only one set of configuration files are present in
> > classpath.
> > Also, it's considered a good practice to specify HBase/Hadoop version in
> > your post.
> >
> >
> > ~Anil Gupta
> >
> >
> > On Wed, Jun 25, 2014 at 3:14 PM, kulkarni.swarnim@gmail.com <
> > kulkarni.swarnim@gmail.com> wrote:
> >
> > > Hello,
> > >
> > > I was wondering if there is a defined client configuration for hbase
> > client
> > > for connecting to a secure hbase cluster? With my client attempting to
> > talk
> > > to a secure cluster, I keep getting the following in my master logs:
> > >
> > > "WARN org.apache.hadoop.hbase.ipc.SecureServer: Incorrect header or
> > version
> > > mismatch from XX:XX:XX:XX:42760 got version 3 expected version 4"
> > >
> > > and the following on my client:
> > >
> > > INFO client.HConnectionManager$HConnectionImplementation: getMaster
> > attempt
> > > 1 of 10 failed; retrying after sleep of 1008
> > > java.io.IOException: Call to XX failed on local exception:
> > > java.io.EOFException
> > >
> > > The version warning first made me think that there was probably some
> > > version mismatch with my jars. But I was able to connect to a
> non-secure
> > > cluster perfectly fine. Any posible config that I might be missing? I
> > made
> > > sure that I do a kinit and obtain a valid kerberos ticket before
> running
> > my
> > > client.
> > >
> > > Thanks for the help,
> > >
> > > --
> > > Swarnim
> > >
> >
> >
> >
> > --
> > Thanks & Regards,
> > Anil Gupta
> >
>
>
>
> --
> Swarnim
>



-- 
Thanks & Regards,
Anil Gupta

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