hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 梁景明 <futur...@gmail.com>
Subject Re: Fail to connect a remote hbase server with java api
Date Sat, 24 Oct 2009 10:06:37 GMT
yes ,i try again , and i found out this error in regionserver logs,
it will be the problem ,how can i open all ports for an ip ,i only know
open some port.thanks.


2009-10-25 01:39:57,351 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 8 on 60020, call null([B@1b67d6a) from 222.73.236.160:42277: error:
java.io.IOException: java.lang.NullPointerException
java.io.IOException: java.lang.NullPointerException
2009-10-25 01:42:52,322 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 9 on 60020, call null([B@3c35fd) from 222.73.236.160:33527: error:
java.io.IOException: java.lang.NullPointerException
java.io.IOException: java.lang.NullPointerException
2009-10-25 01:43:55,431 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 2 on 60020, call null([B@16fdcc1) from 222.73.236.160:33532: error:
java.io.IOException: java.lang.NullPointerException


2009/10/24 梁景明 <futureha@gmail.com>

> hi ,i open it on 60000 port ,and it still fail
> as u say ,i type it
>
>
> HBase tree in ZooKeeper is rooted at /hbase
>   Cluster up? true
>   In safe mode? false
>   Master address: 222.73.236.160:60000
>   Region server holding ROOT: 222.73.236.160:60020
>   Region servers:
>     - 222.73.236.160:60020
>
> and i try a small java test in remote hbase server ,it also fails. if it 's
> the port problem ,
> to connect by itself maybe not refused.
>
>         HBaseConfiguration conf = new HBaseConfiguration();
>         HTable table = new HTable(conf, "blog".getBytes());
>         Get g = new Get("1".getBytes());
>         Result r = table.get(g);
>         System.out.println(r);
>
> and finally i look in the logs, only find something maybe wrong ,but i dont
> know how to deal with it. but i dont
> understand ,why does hbase shell work well.
>
> 2009-10-25 01:17:51,971 INFO org.apache.zookeeper.server.NIOServerCnxn:
> Connected to /222.73.236.160:38186 lastZxid 0
> 2009-10-25 01:17:51,971 INFO org.apache.zookeeper.server.NIOServerCnxn:
> Creating new session 0x124878c214b0003
> 2009-10-25 01:17:51,972 INFO org.apache.zookeeper.server.NIOServerCnxn:
> Finished init of 0x124878c214b0003 valid:true
> 2009-10-25 01:17:52,437 WARN
> org.apache.zookeeper.server.PrepRequestProcessor: Got exception when
> processing sessionid:0x124878c214b0003 type:create cxid:0x2
> zxid:0xfffffffffffffffe txntype:unknown n/a
> org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode =
> NodeExists
>     at
> org.apache.zookeeper.server.PrepRequestProcessor.pRequest(PrepRequestProcessor.java:245)
>     at
> org.apache.zookeeper.server.PrepRequestProcessor.run(PrepRequestProcessor.java:114)
>
>
>
>
> 2009/10/24 Tatsuya Kawano <tatsuyaml@snowcocoa.info>
>
>  Hello,
>>
>> On Sat, Oct 24, 2009 at 12:56 PM, 梁景明 wrote:
>> > i open the 2181 and 2888 ,3888,60010,60030 ,and hadoop server port
>>
>> You also need to open port 60000 and 60020. 60000 is used by HBase
>> master, and 60020 is used by HBase region servers. 60010 and 60030 are
>> not necessary for client to server or server to server communication;
>> they are for web-based console to monitor HBase status via a web
>> browser.
>>
>> Take a look at conf/hbase-defaul.xml. It has all HBase settings with
>> their default values and descriptions. Those descriptions will help
>> you to understand what ports HBase uses and what customizations can be
>> done via hbase-site.xml.
>>
>>
>> > java.lang.reflect.UndeclaredThrowableException
>> >    at $Proxy11.getRegionInfo(Unknown Source)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRootRegion(HConnectionManager.java:931)
>>
>> > Caused by: org.apache.hadoop.ipc.RemoteException: java.io.IOException:
>> > java.lang.NullPointerException
>>
>> There is something wrong with locating the region server who is
>> holding the ROOT region. Can you type "zk_dump" in hbase shell, and
>> let us know the result?
>>
>> It will look like some thing like this:
>>
>> hbase(main):007:0> zk_dump
>>
>> HBase tree in ZooKeeper is rooted at /hbase
>>  Cluster up? true
>>  In safe mode? false
>>  Master address: 172.16.80.26:60000
>>  Region server holding ROOT: 172.16.80.27:60020
>>  Region servers:
>>    - 172.16.80.27:60020
>>    - 172.16.80.29:60020
>>    - 172.16.80.28:60020
>>
>>
>>
>> Thanks,
>>
>> --
>> Tatsuya Kawano (Mr.)
>> Tokyo, Japan
>>
>>
>>
>> On Sat, Oct 24, 2009 at 12:56 PM, 梁景明 wrote:
>> > hi, i failed to connect a remote hbase server with java api , i added
>> the
>> > conf from hbase and hadoop to HbaseConfiguration.
>> > hbase shell can work no problem in remote server.
>> > when i use java api to connect the remote hbase,get this error
>> > at first i think if the centos system closes some ports should be open?
>> > and i open the 2181 and 2888 ,3888,60010,60030 ,and hadoop server port
>> ,but
>> > it still get this error
>> > or something else i didnt notice. thanks for any help.
>> >
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> > environment:zookeeper.version=3.2.0--1, built on 05/15/2009 06:05 GMT
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client environment:
>> host.name
>> > =ubuntu1
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> > environment:java.version=1.6.0_16
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> > environment:java.vendor=Sun Microsystems Inc.
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> > environment:java.home=/usr/lib/jvm/java-6-sun-1.6.0.16/jre
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> >
>> environment:java.class.path=/home/futureha/download/apache-tomcat-6.0.20/bin/bootstrap.jar:/usr/lib/jvm/java-6-sun-1.6.0.16/lib/tools.jar
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> >
>> environment:java.library.path=/usr/lib/jvm/java-6-sun-1.6.0.16/bin:/home/futureha/download/apache-tomcat-6.0.20/bin
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> >
>> environment:java.io.tmpdir=/home/futureha/download/apache-tomcat-6.0.20/temp
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> > environment:java.compiler=<NA>
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client environment:os.name
>> =Linux
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> environment:os.arch=i386
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> > environment:os.version=2.6.28-15-generic
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client environment:
>> user.name
>> > =futureha
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> > environment:user.home=/home/futureha
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Client
>> > environment:user.dir=/home/futureha/download/apache-tomcat-6.0.20/bin
>> > 09/10/24 11:33:36 INFO zookeeper.ZooKeeper: Initiating client
>> connection,
>> > host=222.73.x.x:2181 sessionTimeout=60000
>> >
>> watcher=org.apache.hadoop.hbase.client.HConnectionManager$ClientZKWatcher@1fecaeb
>> > 09/10/24 11:33:36 INFO zookeeper.ClientCnxn:
>> zookeeper.disableAutoWatchReset
>> > is false
>> > 09/10/24 11:33:36 INFO zookeeper.ClientCnxn: Attempting connection to
>> server
>> > /222.73.x.x:2181
>> > 09/10/24 11:33:36 INFO zookeeper.ClientCnxn: Priming connection to
>> > java.nio.channels.SocketChannel[connected
>> > local=/192.168.1.103:52693remote=/222.73.x.x:2181]
>> > 09/10/24 11:33:36 INFO zookeeper.ClientCnxn: Server connection
>> successful
>> > java.lang.reflect.UndeclaredThrowableException
>> >    at $Proxy11.getRegionInfo(Unknown Source)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRootRegion(HConnectionManager.java:931)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:573)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:549)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:623)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:582)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:549)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegionInMeta(HConnectionManager.java:623)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:586)
>> >    at
>> >
>> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.locateRegion(HConnectionManager.java:549)
>> >    at org.apache.hadoop.hbase.client.HTable.<init>(HTable.java:125)
>> >    at com.soko.hbase.tool.HbaseUtil.hasThisRow(HbaseUtil.java:528)
>> >    at com.soko.manage.v4.UserManV4.hasThisUser(UserManV4.java:27)
>> >    at
>> com.soko.blog.action.login.UserManager.register(UserManager.java:77)
>> >    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >    at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> >    at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >    at java.lang.reflect.Method.invoke(Method.java:597)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)
>> >    at
>> >
>> org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
>> >    at
>> >
>> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
>> >    at
>> >
>> org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>> >    at
>> >
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
>> >    at
>> >
>> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
>> >    at
>> >
>> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)
>> >    at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>> >    at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>> >    at
>> >
>> filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
>> >    at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>> >    at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>> >    at
>> >
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>> >    at
>> >
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>> >    at
>> >
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>> >    at
>> >
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>> >    at
>> >
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> >    at
>> >
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>> >    at
>> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
>> >    at
>> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
>> >    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
>> >    at
>> >
>> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
>> >    at
>> >
>> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
>> >    at
>> >
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
>> >    at java.lang.Thread.run(Thread.java:619)
>> > Caused by: org.apache.hadoop.ipc.RemoteException: java.io.IOException:
>> > java.lang.NullPointerException
>> >
>> >    at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:723)
>> >    at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:328)
>> >    ... 85 more
>> >
>>
>
>

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