You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Jeff Zhang <zj...@gmail.com> on 2009/11/11 10:34:10 UTC
Exception : From an unknown user
Hi all,
I meet a problem that I can not connect the HBase using Java API.
The is my simple Java code:
HBaseConfiguration conf=new HBaseConfiguration();
HBaseAdmin admin=new HBaseAdmin(conf);
HTableDescriptor[] tables=admin.listTables();
for (HTableDescriptor table:tables){
System.out.println(Bytes.toString(table.getName()));
}
And I put the hbase-site in classpath. Here is the message:
Exception in thread "IPC Client (47) connection to /10.148.224.11:60020 from
an unknown user" java.lang.NullPointerException
at
org.apache.hadoop.hbase.ipc.HBaseClient$Connection.receiveResponse(HBaseClient.java:518)
at
org.apache.hadoop.hbase.ipc.HBaseClient$Connection.run(HBaseClient.java:448)
But I debug the program and found the exception is happend at line 518 of
file HBaseClient (the bold line):
boolean isError = in.readBoolean(); // read if error
if (isError) {
call.setException(new RemoteException(
WritableUtils.readString(in),
WritableUtils.readString(in)));
} else {
Writable value = ReflectionUtils.newInstance(valueClass, conf);
value.readFields(in); // read value
* call.setValue(value);*
}
Is this a bug or does it need any extra configuration to tell the hbase
cluster who is the client ?
Jeff Zhang
Re: Exception : From an unknown user
Posted by Jeff Zhang <zj...@gmail.com>.
Hi Lars,
I found the problem. Because I install the HBase using hbase 0.20.2, while
in my client side I use HBase_trunk.
It seems a compatible problem.
Jeff Zhang
On Wed, Nov 11, 2009 at 6:23 PM, Lars George <la...@worldlingo.com> wrote:
> Hi Jeff,
>
> No, this message is always printed, i.e. "connection from and unkown user".
> It's a bit worrying but nevertheless what you will always see. What is not
> right of course is the NPE you get. I have never seen the client throwing an
> exception at that point. The code does not reveal much, seems like the
> "call" object is null - but why I do not know.
>
> Could you enable DEBUG level logging and try again? Maybe it is collateral
> damage?
>
> Lars
>
> Jeff Zhang schrieb:
>
> Hi all,
>>
>> I meet a problem that I can not connect the HBase using Java API.
>>
>> The is my simple Java code:
>>
>> HBaseConfiguration conf=new HBaseConfiguration();
>> HBaseAdmin admin=new HBaseAdmin(conf);
>>
>> HTableDescriptor[] tables=admin.listTables();
>> for (HTableDescriptor table:tables){
>> System.out.println(Bytes.toString(table.getName()));
>> }
>>
>>
>> And I put the hbase-site in classpath. Here is the message:
>>
>> Exception in thread "IPC Client (47) connection to /10.148.224.11:60020from
>> an unknown user" java.lang.NullPointerException
>> at
>>
>> org.apache.hadoop.hbase.ipc.HBaseClient$Connection.receiveResponse(HBaseClient.java:518)
>> at
>>
>> org.apache.hadoop.hbase.ipc.HBaseClient$Connection.run(HBaseClient.java:448)
>>
>>
>> But I debug the program and found the exception is happend at line 518 of
>> file HBaseClient (the bold line):
>>
>> boolean isError = in.readBoolean(); // read if error
>> if (isError) {
>> call.setException(new RemoteException(
>> WritableUtils.readString(in),
>> WritableUtils.readString(in)));
>> } else {
>> Writable value = ReflectionUtils.newInstance(valueClass, conf);
>> value.readFields(in); // read value
>> * call.setValue(value);*
>> }
>>
>> Is this a bug or does it need any extra configuration to tell the hbase
>> cluster who is the client ?
>>
>>
>> Jeff Zhang
>>
>>
>>
>
Re: Exception : From an unknown user
Posted by Lars George <la...@worldlingo.com>.
Hi Jeff,
No, this message is always printed, i.e. "connection from and unkown
user". It's a bit worrying but nevertheless what you will always see.
What is not right of course is the NPE you get. I have never seen the
client throwing an exception at that point. The code does not reveal
much, seems like the "call" object is null - but why I do not know.
Could you enable DEBUG level logging and try again? Maybe it is
collateral damage?
Lars
Jeff Zhang schrieb:
> Hi all,
>
> I meet a problem that I can not connect the HBase using Java API.
>
> The is my simple Java code:
>
> HBaseConfiguration conf=new HBaseConfiguration();
> HBaseAdmin admin=new HBaseAdmin(conf);
>
> HTableDescriptor[] tables=admin.listTables();
> for (HTableDescriptor table:tables){
> System.out.println(Bytes.toString(table.getName()));
> }
>
>
> And I put the hbase-site in classpath. Here is the message:
>
> Exception in thread "IPC Client (47) connection to /10.148.224.11:60020 from
> an unknown user" java.lang.NullPointerException
> at
> org.apache.hadoop.hbase.ipc.HBaseClient$Connection.receiveResponse(HBaseClient.java:518)
> at
> org.apache.hadoop.hbase.ipc.HBaseClient$Connection.run(HBaseClient.java:448)
>
>
> But I debug the program and found the exception is happend at line 518 of
> file HBaseClient (the bold line):
>
> boolean isError = in.readBoolean(); // read if error
> if (isError) {
> call.setException(new RemoteException(
> WritableUtils.readString(in),
> WritableUtils.readString(in)));
> } else {
> Writable value = ReflectionUtils.newInstance(valueClass, conf);
> value.readFields(in); // read value
> * call.setValue(value);*
> }
>
> Is this a bug or does it need any extra configuration to tell the hbase
> cluster who is the client ?
>
>
> Jeff Zhang
>
>