You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by "kulkarni.swarnim@gmail.com" <ku...@gmail.com> on 2014/06/26 00:14:04 UTC

Configuration for hbase client to connect to secure cluster

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

Re: Configuration for hbase client to connect to secure cluster

Posted by anil gupta <an...@gmail.com>.
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 <an...@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

Re: Configuration for hbase client to connect to secure cluster

Posted by "kulkarni.swarnim@gmail.com" <ku...@gmail.com>.
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 <an...@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

Re: Configuration for hbase client to connect to secure cluster

Posted by anil gupta <an...@gmail.com>.
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