|
matan
2012-11-26, 15:06
Nicolas Liochon
2012-11-26, 15:28
Mohammad Tariq
2012-11-26, 17:38
Stack
2012-11-26, 17:38
Nicolas Liochon
2012-11-26, 17:42
Stack
2012-11-26, 17:49
Mohammad Tariq
2012-11-26, 18:16
Nicolas Liochon
2012-11-26, 18:47
Mohammad Tariq
2012-11-26, 20:14
rajivtyagi711
2013-02-06, 09:44
|
-
Re: Connecting to standalone HBase from a remote clientmatan 2012-11-26, 15:06
Thanks, but hard-coding the master's IP in my client code doesn't work - I
also don't really understand why it has to be set in the client, as according to the flow you describe, the client is getting all it needs to know from zookeeper (?). Doing some digging on the HBase server side, I found that conf/regionservers has a single line containing the name 'localhost'. I changed it to the IP of the server, and restarted hbase. However my hbase client still thinks it should contact localhost after successfully connecting to zookeeper.... My hbase-site.xml only contains what http://hbase.apache.org/book.html#quickstart asked for, as seen right below. Perhaps that's not enough? <configuration> <property> <name>hbase.rootdir</name> <value>file:/usr/local/hbase/hbase-0.94.2/data/hbase</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/usr/local/hbase/hbase-0.94.2/data/zookeeper</value> </property> </configuration> Kind of hoping there's a straightforward way to configure a solution. Must be something that's always being configured when clustering, otherwise the same problems would arise in a clustered environment, yet in my case I'm still running a standalone instance... On Sun, Nov 25, 2012 at 10:48 PM, Tariq [via Apache HBase] < ml-node+[EMAIL PROTECTED]> wrote: > Also, add the IP and hostname of the machine running Hbase in your > /etc/hosts file. > > Regards, > Mohammad Tariq > > > > On Mon, Nov 26, 2012 at 2:15 AM, Mohammad Tariq <[hidden email]<http://user/SendEmail.jtp?type=node&node=4034365&i=0>> > wrote: > > > Sent from handheld, don't mind typos. :) > > > > Regards, > > Mohammad Tariq > > > > > > > > On Mon, Nov 26, 2012 at 2:14 AM, Mohammad Tariq <[hidden email]<http://user/SendEmail.jtp?type=node&node=4034365&i=1>>wrote: > > > > >> Hello Matan, > >> > >> The client first contact the zookeeper to get the region that holds > >> the ROOt table. From ROOt, client gets the server that holds META and > from > >> there it gets the info about the server which actually holds the key of > the > >> table of interest. Your client seems to get wrong info. Please add > these > >> props in your client code and see it works : > >> hbaseConfiguration.set("hbase.zookeeper.quorum", > >> "192.168.2.121"); > >> hbaseConfiguration.set("hbase.zookeeper.property.clientPort","2181"); > >> hbaseConfiguration.set("hbase.master", "192.168.2.121:60000"); > >> > >> Change the ports and addresses as per your config. > >> > >> HTH > >> > >> Regards, > >> Mohammad Tariq > >> > >> > >> > >> On Mon, Nov 26, 2012 at 2:07 AM, matan <[hidden email]<http://user/SendEmail.jtp?type=node&node=4034365&i=2>> > wrote: > >> > >>> Hi, > >>> > >>> With gracious help on this forum (from ramkrishna vasudevan) I've > >>> managed to > >>> setup HBase 0.94.2 in standalone mode on Ubuntu, and proceeded to > >>> writing a > >>> small client. I am trying to run the client from a remote server, not > the > >>> one where HBase is running on. It seems pretty obvious looking at both > >>> server and client side logs, that my client successfully connects to > >>> zookeeper, but then tries to perform the actual interaction against > the > >>> wrong network address. It looks like it is wrongfully trying to > address > >>> localhost on the HBase client side rather than addressing the server > >>> where > >>> HBase is installed. > >>> > >>> In terms of flow, I guess that zookeeper provides my client with how > to > >>> interact with HBase, and that it informs my client to that end that > the > >>> name > >>> of the server to contact is 'localhost'. I can guess this may be > changed, > >>> presumably by configuring HBase on the server side. Assuming that the > >>> correct flow should be that my client would get informed of the real > >>> name of > >>> the HBase server, by zookeeper. However I failed managing to configure > >>> just > >>> that. I tried the hbase.master property, but it had no effect. View this message in context: http://apache-hbase.679495.n3.nabble.com/Connecting-to-standalone-HBase-from-a-remote-client-tp4034362p4034395.html Sent from the HBase User mailing list archive at Nabble.com. +
matan 2012-11-26, 15:06
-
Re: Connecting to standalone HBase from a remote clientNicolas Liochon 2012-11-26, 15:28
Yes, it's not useful to set the master address in the client. I suppose it
was different a long time ago, hence there are some traces on different documentation. The master references itself in ZooKeeper. So if the master finds itself to be "locahost", ZooKeeper will contain "locahost", and the clients on another computer won't be able to connect. The issue lies on the master host, not the client. On Mon, Nov 26, 2012 at 4:06 PM, matan <[EMAIL PROTECTED]> wrote: > also don't really understand why it has to be set in the client, as > according to the flow you describe, the client is getting all it needs to > know from zookeeper (?). > +
Nicolas Liochon 2012-11-26, 15:28
-
Re: Connecting to standalone HBase from a remote clientMohammad Tariq 2012-11-26, 17:38
Hello Matan,
Did it work?If not, add these properties in your hbase-site.xml file and see if it works for you. <property> <name>hbase.zookeeper.quorum</name> <value>ZH-HOST_MACHINE</value> </property> <property> <name>hbase.zookeeper.property.clientPort</name> <value>2181</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>path_to_your_datadir</value> </property> HTH Regards, Mohammad Tariq On Mon, Nov 26, 2012 at 8:58 PM, Nicolas Liochon <[EMAIL PROTECTED]> wrote: > Yes, it's not useful to set the master address in the client. I suppose it > was different a long time ago, hence there are some traces on different > documentation. > The master references itself in ZooKeeper. So if the master finds itself to > be "locahost", ZooKeeper will contain "locahost", and the clients on > another computer won't be able to connect. The issue lies on the master > host, not the client. > > On Mon, Nov 26, 2012 at 4:06 PM, matan <[EMAIL PROTECTED]> wrote: > > > also don't really understand why it has to be set in the client, as > > according to the flow you describe, the client is getting all it needs to > > know from zookeeper (?). > > > +
Mohammad Tariq 2012-11-26, 17:38
-
Re: Connecting to standalone HBase from a remote clientStack 2012-11-26, 17:38
On Mon, Nov 26, 2012 at 7:28 AM, Nicolas Liochon <[EMAIL PROTECTED]> wrote:
> Yes, it's not useful to set the master address in the client. I suppose it > was different a long time ago, hence there are some traces on different > documentation. > The master references itself in ZooKeeper. So if the master finds itself to > be "locahost", ZooKeeper will contain "locahost", and the clients on > another computer won't be able to connect. The issue lies on the master > host, not the client. > Sounds like something to fix. If distributed, write other than localhost to zk? St.Ack +
Stack 2012-11-26, 17:38
-
Re: Connecting to standalone HBase from a remote clientNicolas Liochon 2012-11-26, 17:42
We would detect it and stop properly. It's true even in standalone mode:
one may want to launch a standalone cluster and connects remotely to it. On Mon, Nov 26, 2012 at 6:38 PM, Stack <[EMAIL PROTECTED]> wrote: > distributed, write other than localhost to zk? > St.Ack > +
Nicolas Liochon 2012-11-26, 17:42
-
Re: Connecting to standalone HBase from a remote clientStack 2012-11-26, 17:49
On Mon, Nov 26, 2012 at 9:42 AM, Nicolas Liochon <[EMAIL PROTECTED]> wrote:
> We would detect it and stop properly. It's true even in standalone mode: > one may want to launch a standalone cluster and connects remotely to it. > I made https://issues.apache.org/jira/browse/HBASE-7219 for now. St.Ack +
Stack 2012-11-26, 17:49
-
Re: Connecting to standalone HBase from a remote clientMohammad Tariq 2012-11-26, 18:16
I was facing the same issue few months ago, but adding the above
specified three properties in my client and IP+Hostname of the machines in my /etc/hosts worked for me. Is is OK? Another question, if HBase is running in pseudo mode, then what's the harm in using localhost in /conf/regionservers?Apologies for my ignorance. Regards, Mohammad Tariq On Mon, Nov 26, 2012 at 11:19 PM, Stack <[EMAIL PROTECTED]> wrote: > On Mon, Nov 26, 2012 at 9:42 AM, Nicolas Liochon <[EMAIL PROTECTED]> > wrote: > > We would detect it and stop properly. It's true even in standalone mode: > > one may want to launch a standalone cluster and connects remotely to it. > > > > I made https://issues.apache.org/jira/browse/HBASE-7219 for now. > St.Ack > +
Mohammad Tariq 2012-11-26, 18:16
-
Re: Connecting to standalone HBase from a remote clientNicolas Liochon 2012-11-26, 18:47
Hi Mohammad,
Your answer was right, just that specifying the master address is not necessary (anymore I think). But it does no harm. Changing the /etc/hosts (as you did) is right too. Lastly, if the cluster is standalone and accessed locally, having localhost in ZK will not be an issue. However, it's perfectly possible to have a standalone cluster accessed remotely, so you don't want to have the master to write "I'm on the server named localhost" in this case. I expect it won't be an issue for communications between the region servers or hdfs as they would be all on the same "localhost"... Cheers, Nicolas On Mon, Nov 26, 2012 at 7:16 PM, Mohammad Tariq <[EMAIL PROTECTED]> wrote: > what +
Nicolas Liochon 2012-11-26, 18:47
-
Re: Connecting to standalone HBase from a remote clientMohammad Tariq 2012-11-26, 20:14
Hello Nicolas,
You are right. It has been deprecated. Thank you for updating my knowledge base..:) Regards, Mohammad Tariq On Tue, Nov 27, 2012 at 12:17 AM, Nicolas Liochon <[EMAIL PROTECTED]> wrote: > Hi Mohammad, > > Your answer was right, just that specifying the master address is not > necessary (anymore I think). But it does no harm. > Changing the /etc/hosts (as you did) is right too. > Lastly, if the cluster is standalone and accessed locally, having localhost > in ZK will not be an issue. However, it's perfectly possible to have a > standalone cluster accessed remotely, so you don't want to have the master > to write "I'm on the server named localhost" in this case. I expect it > won't be an issue for communications between the region servers or hdfs as > they would be all on the same "localhost"... > > Cheers, > > Nicolas > > On Mon, Nov 26, 2012 at 7:16 PM, Mohammad Tariq <[EMAIL PROTECTED]> > wrote: > > > what > +
Mohammad Tariq 2012-11-26, 20:14
-
Re: Connecting to standalone HBase from a remote clientrajivtyagi711 2013-02-06, 09:44
Hello,
I am new to HBase and have a background in C. Please help as I am facing this problem from last one day. I have installed HBase on Linux Machine(192.168.113.27). I have created the "users" table on HBase. Then I have wriiten the code in Eclipse IDE on my Local Machine to communicate with HBase to store some data in HBase. Code witten is Configuration conf = HBaseConfiguration.create(); conf.set("hbase.zookeeper.quorum", "192.168.113.27"); conf.set("hbase.zookeeper.property.clientPort","2181"); HTableInterface usersTable = new HTable(conf, "users"); As per my recent knowledge which I have gained till now for last 4 days is the sample Application communicates with Zookeeper. The connection will be perfectly fine with zookeeper but after that I have getting "org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to find region for users,,99999999999999 after 10 tries. after that. I have also removed the localhost from the regionservers file and put 192.168.113.27 in that file. Logs are shown below: . 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:host.name=DWUS1B045.hsc.com 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_39 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:java.vendor=Sun Microsystems Inc. 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:java.home=C:\Program Files\Java\jre6 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:java.class.path=C:\Documents and Settings\ggne0509\workspace1\Hbase\bin;C:\HBase\hbase-0.94.4\lib\asm-3.1.jar;C:\HBase\hbase-0.94.4\lib\avro-1.5.3.jar;C:\HBase\hbase-0.94.4\lib\avro-ipc-1.5.3.jar;C:\HBase\hbase-0.94.4\lib\commons-beanutils-1.7.0.jar;C:\HBase\hbase-0.94.4\lib\commons-beanutils-core-1.8.0.jar;C:\HBase\hbase-0.94.4\lib\commons-cli-1.2.jar;C:\HBase\hbase-0.94.4\lib\commons-codec-1.4.jar;C:\HBase\hbase-0.94.4\lib\commons-collections-3.2.1.jar;C:\HBase\hbase-0.94.4\lib\commons-configuration-1.6.jar;C:\HBase\hbase-0.94.4\lib\commons-digester-1.8.jar;C:\HBase\hbase-0.94.4\lib\commons-el-1.0.jar;C:\HBase\hbase-0.94.4\lib\commons-httpclient-3.1.jar;C:\HBase\hbase-0.94.4\lib\commons-io-2.1.jar;C:\HBase\hbase-0.94.4\lib\commons-lang-2.5.jar;C:\HBase\hbase-0.94.4\lib\commons-logging-1.1.1.jar;C:\HBase\hbase-0.94.4\lib\commons-math-2.1.jar;C:\HBase\hbase-0.94.4\lib\commons-net-1.4.1.jar;C:\HBase\hbase-0.94.4\lib\core-3.1.1.jar;C:\HBase\hbase-0.94.4\lib\guava-11.0.2.jar;C:\HBase\hbase-0.94.4\lib\hadoop-core-1.0.4.jar;C:\HBase\hbase-0.94.4\lib\high-scale-lib-1.1.1.jar;C:\HBase\hbase-0.94.4\lib\httpclient-4.1.2.jar;C:\HBase\hbase-0.94.4\lib\httpcore-4.1.3.jar;C:\HBase\hbase-0.94.4\lib\jackson-core-asl-1.8.8.jar;C:\HBase\hbase-0.94.4\lib\jackson-jaxrs-1.8.8.jar;C:\HBase\hbase-0.94.4\lib\jackson-mapper-asl-1.8.8.jar;C:\HBase\hbase-0.94.4\lib\jackson-xc-1.8.8.jar;C:\HBase\hbase-0.94.4\lib\jamon-runtime-2.3.1.jar;C:\HBase\hbase-0.94.4\lib\jasper-compiler-5.5.23.jar;C:\HBase\hbase-0.94.4\lib\jasper-runtime-5.5.23.jar;C:\HBase\hbase-0.94.4\lib\jaxb-api-2.1.jar;C:\HBase\hbase-0.94.4\lib\jaxb-impl-2.2.3-1.jar;C:\HBase\hbase-0.94.4\lib\jersey-core-1.8.jar;C:\HBase\hbase-0.94.4\lib\jersey-json-1.8.jar;C:\HBase\hbase-0.94.4\lib\jersey-server-1.8.jar;C:\HBase\hbase-0.94.4\lib\jettison-1.1.jar;C:\HBase\hbase-0.94.4\lib\jetty-6.1.26.jar;C:\HBase\hbase-0.94.4\lib\jetty-util-6.1.26.jar;C:\HBase\hbase-0.94.4\lib\jruby-complete-1.6.5.jar;C:\HBase\hbase-0.94.4\lib\jsp-2.1-6.1.14.jar;C:\HBase\hbase-0.94.4\lib\jsp-api-2.1-6.1.14.jar;C:\HBase\hbase-0.94.4\lib\jsr305-1.3.9.jar;C:\HBase\hbase-0.94.4\lib\junit-4.10-HBASE-1.jar;C:\HBase\hbase-0.94.4\lib\libthrift-0.8.0.jar;C:\HBase\hbase-0.94.4\lib\log4j-1.2.16.jar;C:\HBase\hbase-0.94.4\lib\metrics-core-2.1.2.jar;C:\HBase\hbase-0.94.4\lib\netty-3.2.4.Final.jar;C:\HBase\hbase-0.94.4\lib\protobuf-java-2.4.0a.jar;C:\HBase\hbase-0.94.4\lib\servlet-api-2.5-6.1.14.jar;C:\HBase\hbase-0.94.4\lib\slf4j-api-1.4.3.jar;C:\HBase\hbase-0.94.4\lib\slf4j-log4j12-1.4.3.jar;C:\HBase\hbase-0.94.4\lib\snappy-java-1.0.3.2.jar;C:\HBase\hbase-0.94.4\lib\stax-api-1.0.1.jar;C:\HBase\hbase-0.94.4\lib\velocity-1.7.jar;C:\HBase\hbase-0.94.4\lib\xmlenc-0.52.jar;C:\HBase\hbase-0.94.4\lib\zookeeper-3.4.5.jar;C:\Documents and Settings\ggne0509\workspace1\Hbase\lib\hbase-0.94.4.jar 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:java.library.path=C:\Program Files\Java\jre6\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jre6\bin\client;C:\Program Files\Java\jre6\bin;C:\TimesTen\TT1121~1\bin;C:\TimesTen\TT1121~1\ttoracle_home\instantclient_11_1;C:\XEClient\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\TortoiseSVN\bin;C:\jacorb-2.3.1\bin;C:\Program Files\Rational\common;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\Java\jdk1.6.0_01\bin;C:\Ant\apache-ant-1.7.1\bin;C:\apache-maven-2.2.1\bin;C:\jacorb-2.3.1\binbin;. 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=C:\DOCUME~1\ggne0509\LOCALS~1\Temp\ 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA> 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:os.name=Windows XP 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:os.arch=x86 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:os.version=5.1 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:user.name=ggne0509 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:user.home=C:\Documents and Settings\ggne0509 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Client environment:user.dir=C:\Documents and Settings\ggne0509\workspace1\Hbase 13/02/06 14:37:39 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.113.27:2181 sessionTimeout=180000 watcher=hconnection 13/02/06 14:37:39 INFO zookeeper.Recover +
rajivtyagi711 2013-02-06, 09:44
|