You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by RajeevSharma <ra...@gmail.com> on 2009/07/07 13:17:26 UTC

Re: Set hbase configuration when client is on different machine

Hi Saha,

I read through this conversation and tried configuring my HBase. I added
following config to my hbase-site.xml

<property>
     <name>hbase.master</name>
     <value>foo.bar.com:60000</value>
     <description>The host and port that the HBase master runs at.
     A value of 'local' runs the master and a regionserver in
     a single process.
     </description>
</property> 

after adding this setting I get the following error in my log file.

2009-07-07 16:31:34,571 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode

any idea what is wrong here?

--
Rajeev


Sasha Dolgy-2 wrote:
> 
> hbase-site.xml overrides hbase-default.xml if there is a duplication
> of properties defined.  as i understand, all customizations should not
> be put in the hbase-default.xml and should be put in the
> hbase-site.xml or other related xml files.
> 
> -sd
> 
> On Mon, May 18, 2009 at 2:41 PM, monty123 <ma...@yahoo.com> wrote:
>>
>> Thanks for the quick response.
>>
>> I still have a confusion,
>> entry for hbase.master property is in my hbase-default.xml not
>> hbase-site.xml
>> whether I need to put a new entry for hbase.master in hbase-site.xml or I
>> can change hbase-default.xml 's entry to
>> "foo.bar.com:60000"
>>
>> I had also attached these two files in my previous post message.
>>
>> Thanks for the help.
>>
>>
>> Sasha Dolgy-2 wrote:
>>>
>>> right, this is because your hbase is listening to the localhost and
>>> not to the public interface of the network card.
>>>
>>> in your $HBASE_HOME/conf/hbase-site.xml validate the following
>>> configuration parameter ( i think the default is local):
>>>
>>>   <property>
>>>     <name>hbase.master</name>
>>>     <value>foo.bar.com:60000</value>
>>>     <description>The host and port that the HBase master runs at.
>>>     A value of 'local' runs the master and a regionserver in
>>>     a single process.
>>>     </description>
>>>   </property>
>>>
>>> This will mean that the service will bind to the reverse lookup of
>>> foo.bar.com on port 6000
>>> -sasha
>>>
>>> On Mon, May 18, 2009 at 12:33 PM, monty123 <ma...@yahoo.com>
>>> wrote:
>>>>
>>>> my netstat output is :
>>>>
>>>> netstat -an | grep 60000
>>>> tcp6       0      0 127.0.0.1:60000         :::*
>>>>  LISTEN
>>>> tcp6       0      0 127.0.0.1:47423         127.0.0.1:60000
>>>> ESTABLISHED
>>>> tcp6       0      0 127.0.0.1:60000         127.0.0.1:47423
>>>> ESTABLISHED
>>>>
>>>> Also, when I telnet <machine-ip/192.168...> 60000 from second machine
>>>> its
>>>> output is :
>>>> telnet : unable to connect to remote host : conncetion refused (only at
>>>> port
>>>> 60000, not on default port)
>>>>
>>>> I am confused please help.
>>>>
>>>>
>>>>
>>>>
>>>> Sasha Dolgy-2 wrote:
>>>>>
>>>>> another thing to check is that HBase is listening on a proper IP.  By
>>>>> default it binds to 127.0.0.1 ... netstat -an | grep 60000 you'll see
>>>>> what ip/interface it's listening on and be able to make the
>>>>> configuration changes necessary.
>>>>>
>>>>> On Mon, May 18, 2009 at 7:51 AM, monty123 <ma...@yahoo.com>
>>>>> wrote:
>>>>>>
>>>>>> Thanks Sasha,
>>>>>> I have changed my code and added following two lines as suggested by
>>>>>> you.
>>>>>>
>>>>>> HBaseConfiguration config = new HBaseConfiguration();
>>>>>> config.set("hbase.master", "impetus-805:60000");
>>>>>>
>>>>>> Now client class throws  "09/05/18 12:09:49 INFO ipc.HBaseClass:
>>>>>> Retrying
>>>>>> connect to server: impetus-805/192.168.102.38:60000. Already tried 0
>>>>>> time(s)......" exception.
>>>>>>
>>>>>> I have also attached my hbase-default.xml and hbase-site.xml.
>>>>>> Please help. http://www.nabble.com/file/p23592018/hbase-default.xml
>>>>>> hbase-default.xml
>>>>>>  http://www.nabble.com/file/p23592018/hbase-site.xml
>>>>>> hbase-site.xml
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sasha Dolgy-2 wrote:
>>>>>>>
>>>>>>>  HBaseConfiguration config = new HBaseConfiguration();
>>>>>>> config.set("hbase.master", "foo.bar.com:60000");
>>>>>>>
>>>>>>>
>>>>>>> On Thu, May 14, 2009 at 8:32 AM, monty123 <ma...@yahoo.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> Hi All,
>>>>>>>>
>>>>>>>> I am a newbie to hbase.
>>>>>>>> I am able to setup hbase in pseudo-distributed mode and I have also
>>>>>>>> done
>>>>>>>> with its integration from Java. ( java client class and hbase were
>>>>>>>> on
>>>>>>>> same
>>>>>>>> system )
>>>>>>>>
>>>>>>>> Now, I have no idea how to change configuration to access hbase
>>>>>>>> from
>>>>>>>> a
>>>>>>>> remote client ( like mysql jdbc conn. where se can change ip of
>>>>>>>> server
>>>>>>>> from
>>>>>>>> localhost to other )
>>>>>>>>
>>>>>>>> Please help.
>>>>>>>>
>>>>>>>> Thanks in advance.
>>>>>>>>
>>>>>>>> Following is my java client code :
>>>>>>>>
>>>>>>>> import org.apache.hadoop.hbase.client.HTable;
>>>>>>>> import org.apache.hadoop.hbase.HBaseConfiguration;
>>>>>>>> import org.apache.hadoop.hbase.io.RowResult;
>>>>>>>>
>>>>>>>> import java.util.HashMap;
>>>>>>>> import java.util.Map;
>>>>>>>> import java.io.IOException;
>>>>>>>>
>>>>>>>> public class HBaseConnector {
>>>>>>>>
>>>>>>>> public static Map retrievePost(String postId) throws IOException {
>>>>>>>> HTable table = new HTable(new HBaseConfiguration(), "blogposts");
>>>>>>>> Map post = new HashMap();
>>>>>>>>
>>>>>>>> RowResult result = table.getRow(postId);
>>>>>>>>
>>>>>>>> for (byte[] column : result.keySet()) {
>>>>>>>> post.put(new String(column), new
>>>>>>>> String(result.get(column).getValue()));
>>>>>>>> }
>>>>>>>> return post;
>>>>>>>> }
>>>>>>>>
>>>>>>>> public static void main(String[] args) throws IOException {
>>>>>>>> Map blogpost = HBaseConnector.retrievePost("post1");
>>>>>>>> System.out.println(blogpost.get("post:title"));
>>>>>>>> System.out.println(blogpost.get("post:author"));
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23535721.html
>>>>>>>> Sent from the HBase User mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Sasha Dolgy
>>>>>>> sasha.dolgy@gmail.com
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23592018.html
>>>>>> Sent from the HBase User mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sasha Dolgy
>>>>> sasha.dolgy@gmail.com
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23595650.html
>>>> Sent from the HBase User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Sasha Dolgy
>>> sasha.dolgy@gmail.com
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23595890.html
>> Sent from the HBase User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Sasha Dolgy
> sasha.dolgy@gmail.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p24371414.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: Set hbase configuration when client is on different machine

Posted by RajeevSharma <ra...@gmail.com>.
I am sorry thats an info log. I get an error in the hbase-shell. I enter the
command "list" and get a timeout after a while and I get nothing in the log
file other the Safe-Mode info log.

I am pasting the command line error and log message here.

Error on command line is this.

[rajeevks@rajeevks-dx hbase-0.19.3]$ bin/start-hbase.sh
starting master, logging to
/opt/hbase-0.19.3/bin/../logs/hbase-rajeevks-master-rajeevks-dx.bagmane.corp.yahoo.com.out
[rajeevks@rajeevks-dx hbase-0.19.3]$ bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.19.3, r776824, Wed May 20 16:53:37 PDT 2009
hbase(main):001:0> list
NativeException: org.apache.hadoop.hbase.client.RetriesExhaustedException:
Trying to contact region server null for region , row '', but failed after 5
attempts.
Exceptions:
org.apache.hadoop.hbase.client.NoServerForRegionException: Timed out trying
to locate root region
org.apache.hadoop.hbase.client.NoServerForRegionException: Timed out trying
to locate root region
org.apache.hadoop.hbase.client.NoServerForRegionException: Timed out trying
to locate root region
org.apache.hadoop.hbase.client.NoServerForRegionException: Timed out trying
to locate root region
org.apache.hadoop.hbase.client.NoServerForRegionException: Timed out trying
to locate root region

	from org/apache/hadoop/hbase/client/HConnectionManager.java:859:in
`getRegionServerWithRetries'
	from org/apache/hadoop/hbase/client/MetaScanner.java:55:in `metaScan'
	from org/apache/hadoop/hbase/client/MetaScanner.java:29:in `metaScan'
	from org/apache/hadoop/hbase/client/HConnectionManager.java:314:in
`listTables'
	from org/apache/hadoop/hbase/client/HBaseAdmin.java:120:in `listTables'
	from sun/reflect/NativeMethodAccessorImpl.java:-2:in `invoke0'
	from sun/reflect/NativeMethodAccessorImpl.java:39:in `invoke'
	from sun/reflect/DelegatingMethodAccessorImpl.java:25:in `invoke'
	from java/lang/reflect/Method.java:597:in `invoke'
	from org/jruby/javasupport/JavaMethod.java:298:in
`invokeWithExceptionHandling'
	from org/jruby/javasupport/JavaMethod.java:259:in `invoke'
	from org/jruby/java/invokers/InstanceMethodInvoker.java:36:in `call'
	from org/jruby/runtime/callsite/CachingCallSite.java:260:in `cacheAndCall'
	from org/jruby/runtime/callsite/CachingCallSite.java:75:in `call'
	from org/jruby/ast/CallNoArgNode.java:61:in `interpret'
	from org/jruby/ast/ForNode.java:101:in `interpret'
... 117 levels...
	from org/jruby/internal/runtime/methods/DynamicMethod.java:226:in `call'
	from org/jruby/internal/runtime/methods/CompiledMethod.java:216:in `call'
	from org/jruby/internal/runtime/methods/CompiledMethod.java:71:in `call'
	from org/jruby/runtime/callsite/CachingCallSite.java:260:in `cacheAndCall'
	from org/jruby/runtime/callsite/CachingCallSite.java:75:in `call'
	from opt/hbase_minus_0_dot_19_dot_3/bin/$_dot_dot_/bin/hirb.rb:441:in
`__file__'
	from opt/hbase_minus_0_dot_19_dot_3/bin/$_dot_dot_/bin/hirb.rb:-1:in
`__file__'
	from opt/hbase_minus_0_dot_19_dot_3/bin/$_dot_dot_/bin/hirb.rb:-1:in `load'
	from org/jruby/Ruby.java:564:in `runScript'
	from org/jruby/Ruby.java:467:in `runNormally'
	from org/jruby/Ruby.java:340:in `runFromMain'
	from org/jruby/Main.java:214:in `run'
	from org/jruby/Main.java:100:in `run'
	from org/jruby/Main.java:84:in `main'
	from /opt/hbase-0.19.3/bin/../bin/hirb.rb:300:in `list'
	from (hbase):2hbase(main):002:0> 

Log message:
[rajeevks@rajeevks-dx logs]$ tail -f
hbase-rajeevks-master-rajeevks-dx.bagmane.corp.yahoo.com.log 
Wed Jul  8 11:26:50 IST 2009 Starting master on
rajeevks-dx.bagmane.corp.yahoo.com
ulimit -n 1024
2009-07-08 11:26:50,962 INFO org.apache.hadoop.hbase.master.HMaster:
vmName=Java HotSpot(TM) Server VM, vmVendor=Sun Microsystems Inc.,
vmVersion=10.0-b22
2009-07-08 11:26:50,963 INFO org.apache.hadoop.hbase.master.HMaster:
vmInputArguments=[-Xmx1000m, -XX:+HeapDumpOnOutOfMemoryError,
-Dhbase.log.dir=/opt/hbase-0.19.3/bin/../logs,
-Dhbase.log.file=hbase-rajeevks-master-rajeevks-dx.bagmane.corp.yahoo.com.log,
-Dhbase.home.dir=/opt/hbase-0.19.3/bin/.., -Dhbase.id.str=rajeevks,
-Dhbase.root.logger=INFO,DRFA,
-Djava.library.path=/opt/hbase-0.19.3/bin/../lib/native/Linux-i386-32]
2009-07-08 11:26:51,265 INFO org.apache.hadoop.hbase.master.HMaster: Root
region dir:
hdfs://rajeevks-dx.bagmane.corp.yahoo.com:9000/hbase/-ROOT-/70236052
2009-07-08 11:26:51,301 INFO org.apache.hadoop.hbase.ipc.HBaseRpcMetrics:
Initializing RPC Metrics with hostName=HMaster, port=60000
2009-07-08 11:26:51,399 INFO org.apache.hadoop.hbase.master.HMaster: HMaster
initialized on 10.66.192.165:60000
2009-07-08 11:26:51,404 INFO org.apache.hadoop.metrics.jvm.JvmMetrics:
Initializing JVM Metrics with processName=Master, sessionId=HMaster
2009-07-08 11:26:51,407 INFO
org.apache.hadoop.hbase.master.metrics.MasterMetrics: Initialized
2009-07-08 11:26:51,492 INFO org.mortbay.util.Credential: Checking Resource
aliases
2009-07-08 11:26:51,497 INFO org.mortbay.http.HttpServer: Version
Jetty/5.1.4
2009-07-08 11:26:51,497 INFO org.mortbay.util.Container: Started
HttpContext[/logs,/logs]
2009-07-08 11:26:51,867 INFO org.mortbay.util.Container: Started
org.mortbay.jetty.servlet.WebApplicationHandler@16d2702
2009-07-08 11:26:51,927 INFO org.mortbay.util.Container: Started
WebApplicationContext[/static,/static]
2009-07-08 11:26:52,069 INFO org.mortbay.util.Container: Started
org.mortbay.jetty.servlet.WebApplicationHandler@164b09c
2009-07-08 11:26:52,073 INFO org.mortbay.util.Container: Started
WebApplicationContext[/,/]
2009-07-08 11:26:52,418 INFO org.mortbay.util.Container: Started
org.mortbay.jetty.servlet.WebApplicationHandler@afa68a
2009-07-08 11:26:52,419 INFO org.mortbay.util.Container: Started
WebApplicationContext[/api,rest]
2009-07-08 11:26:52,421 INFO org.mortbay.http.SocketListener: Started
SocketListener on 0.0.0.0:60010
2009-07-08 11:26:52,421 INFO org.mortbay.util.Container: Started
org.mortbay.jetty.Server@5a67c9
2009-07-08 11:26:52,421 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
Responder: starting
2009-07-08 11:26:52,421 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
listener on 60000: starting
2009-07-08 11:26:52,422 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 0 on 60000: starting
2009-07-08 11:26:52,422 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 1 on 60000: starting
2009-07-08 11:26:52,422 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 2 on 60000: starting
2009-07-08 11:26:52,422 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 3 on 60000: starting
2009-07-08 11:26:52,422 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 4 on 60000: starting
2009-07-08 11:26:52,423 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 5 on 60000: starting
2009-07-08 11:26:52,423 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 6 on 60000: starting
2009-07-08 11:26:52,423 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 7 on 60000: starting
2009-07-08 11:26:52,423 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 8 on 60000: starting
2009-07-08 11:26:52,423 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server
handler 9 on 60000: starting
2009-07-08 11:27:01,915 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:03,919 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:05,922 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:07,924 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:09,927 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:11,930 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:13,931 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:15,933 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:17,935 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:19,936 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:23,940 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:25,942 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:27,943 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:29,946 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:31,949 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:33,951 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:35,953 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:37,955 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:39,956 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:41,958 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:45,962 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:47,963 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:49,965 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:51,410 INFO org.apache.hadoop.hbase.master.BaseScanner: All
0 .META. region(s) scanned
2009-07-08 11:27:51,967 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:53,968 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:55,970 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:57,972 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:27:59,973 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:01,975 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:03,977 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:07,980 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:09,982 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:11,984 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:13,985 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:15,987 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:17,989 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:19,990 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:21,992 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:23,994 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:25,995 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:31,999 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:34,000 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:36,002 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:38,004 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:40,005 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:42,007 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:44,009 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:46,010 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:48,012 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:50,014 INFO org.apache.hadoop.hbase.master.RegionManager:
in safe mode
2009-07-08 11:28:51,410 INFO org.apache.hadoop.hbase.master.BaseScanner: All
0 .META. region(s) scanned
2009-07-08 11:29:51,412 INFO org.apache.hadoop.hbase.master.BaseScanner: All
0 .META. region(s) scanned
2009-07-08 11:30:51,414 INFO org.apache.hadoop.hbase.master.BaseScanner: All
0 .META. region(s) scanned
2009-07-08 11:31:51,416 INFO org.apache.hadoop.hbase.master.BaseScanner: All
0 .META. region(s) scanned
2009-07-08 11:32:51,418 INFO org.apache.hadoop.hbase.master.BaseScanner: All
0 .META. region(s) scanned

Here is my hbase-site.xml
<configuration>

       <property>
	         <name>hbase.master</name>
	         <value>rajeevks-dx.bagmane.corp.yahoo.com:60000</value>
	         <description>The host and port that the HBase master runs at.
			A value of 'local' runs the master and a regionserver in
			a single process.
	        </description>
	        </property>
	<property>
		<name>hbase.rootdir</name>
		<value>hdfs://rajeevks-dx.bagmane.corp.yahoo.com:9000/hbase</value>
		<description>The directory shared by region servers.</description>
	</property>

	<property>
		<name>hbase.regionserver.class</name>
		<value>org.apache.hadoop.hbase.ipc.IndexedRegionInterface</value>
	</property>

	<property>
		<name>hbase.regionserver.impl</name>
	
<value>org.apache.hadoop.hbase.regionserver.tableindexed.IndexedRegionServer</value>
	</property>
</configuration>

-- 
View this message in context: http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p24385906.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: Set hbase configuration when client is on different machine

Posted by stack <st...@duboce.net>.
Its an INFO-level log.  How do you make out its an error?

HBase, like hdfs, hangs out in sortof-limbo for a little while around
startup.  During this time it deploys the catalog tables and does other
self-checks.  It then leaves safe mode after a short time to proceed with
deploy.

St.Ack



On Tue, Jul 7, 2009 at 4:17 AM, RajeevSharma <ra...@gmail.com> wrote:

>
> Hi Saha,
>
> I read through this conversation and tried configuring my HBase. I added
> following config to my hbase-site.xml
>
> <property>
>     <name>hbase.master</name>
>     <value>foo.bar.com:60000</value>
>     <description>The host and port that the HBase master runs at.
>     A value of 'local' runs the master and a regionserver in
>     a single process.
>     </description>
> </property>
>
> after adding this setting I get the following error in my log file.
>
> 2009-07-07 16:31:34,571 INFO org.apache.hadoop.hbase.master.RegionManager:
> in safe mode
>
> any idea what is wrong here?
>
> --
> Rajeev
>
>
> Sasha Dolgy-2 wrote:
> >
> > hbase-site.xml overrides hbase-default.xml if there is a duplication
> > of properties defined.  as i understand, all customizations should not
> > be put in the hbase-default.xml and should be put in the
> > hbase-site.xml or other related xml files.
> >
> > -sd
> >
> > On Mon, May 18, 2009 at 2:41 PM, monty123 <ma...@yahoo.com>
> wrote:
> >>
> >> Thanks for the quick response.
> >>
> >> I still have a confusion,
> >> entry for hbase.master property is in my hbase-default.xml not
> >> hbase-site.xml
> >> whether I need to put a new entry for hbase.master in hbase-site.xml or
> I
> >> can change hbase-default.xml 's entry to
> >> "foo.bar.com:60000"
> >>
> >> I had also attached these two files in my previous post message.
> >>
> >> Thanks for the help.
> >>
> >>
> >> Sasha Dolgy-2 wrote:
> >>>
> >>> right, this is because your hbase is listening to the localhost and
> >>> not to the public interface of the network card.
> >>>
> >>> in your $HBASE_HOME/conf/hbase-site.xml validate the following
> >>> configuration parameter ( i think the default is local):
> >>>
> >>>   <property>
> >>>     <name>hbase.master</name>
> >>>     <value>foo.bar.com:60000</value>
> >>>     <description>The host and port that the HBase master runs at.
> >>>     A value of 'local' runs the master and a regionserver in
> >>>     a single process.
> >>>     </description>
> >>>   </property>
> >>>
> >>> This will mean that the service will bind to the reverse lookup of
> >>> foo.bar.com on port 6000
> >>> -sasha
> >>>
> >>> On Mon, May 18, 2009 at 12:33 PM, monty123 <ma...@yahoo.com>
> >>> wrote:
> >>>>
> >>>> my netstat output is :
> >>>>
> >>>> netstat -an | grep 60000
> >>>> tcp6       0      0 127.0.0.1:60000         :::*
> >>>>  LISTEN
> >>>> tcp6       0      0 127.0.0.1:47423         127.0.0.1:60000
> >>>> ESTABLISHED
> >>>> tcp6       0      0 127.0.0.1:60000         127.0.0.1:47423
> >>>> ESTABLISHED
> >>>>
> >>>> Also, when I telnet <machine-ip/192.168...> 60000 from second machine
> >>>> its
> >>>> output is :
> >>>> telnet : unable to connect to remote host : conncetion refused (only
> at
> >>>> port
> >>>> 60000, not on default port)
> >>>>
> >>>> I am confused please help.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> Sasha Dolgy-2 wrote:
> >>>>>
> >>>>> another thing to check is that HBase is listening on a proper IP.  By
> >>>>> default it binds to 127.0.0.1 ... netstat -an | grep 60000 you'll see
> >>>>> what ip/interface it's listening on and be able to make the
> >>>>> configuration changes necessary.
> >>>>>
> >>>>> On Mon, May 18, 2009 at 7:51 AM, monty123 <ma...@yahoo.com>
> >>>>> wrote:
> >>>>>>
> >>>>>> Thanks Sasha,
> >>>>>> I have changed my code and added following two lines as suggested by
> >>>>>> you.
> >>>>>>
> >>>>>> HBaseConfiguration config = new HBaseConfiguration();
> >>>>>> config.set("hbase.master", "impetus-805:60000");
> >>>>>>
> >>>>>> Now client class throws  "09/05/18 12:09:49 INFO ipc.HBaseClass:
> >>>>>> Retrying
> >>>>>> connect to server: impetus-805/192.168.102.38:60000. Already tried
> 0
> >>>>>> time(s)......" exception.
> >>>>>>
> >>>>>> I have also attached my hbase-default.xml and hbase-site.xml.
> >>>>>> Please help. http://www.nabble.com/file/p23592018/hbase-default.xml
> >>>>>> hbase-default.xml
> >>>>>>  http://www.nabble.com/file/p23592018/hbase-site.xml
> >>>>>> hbase-site.xml
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> Sasha Dolgy-2 wrote:
> >>>>>>>
> >>>>>>>  HBaseConfiguration config = new HBaseConfiguration();
> >>>>>>> config.set("hbase.master", "foo.bar.com:60000");
> >>>>>>>
> >>>>>>>
> >>>>>>> On Thu, May 14, 2009 at 8:32 AM, monty123 <ma...@yahoo.com>
> >>>>>>> wrote:
> >>>>>>>
> >>>>>>>>
> >>>>>>>> Hi All,
> >>>>>>>>
> >>>>>>>> I am a newbie to hbase.
> >>>>>>>> I am able to setup hbase in pseudo-distributed mode and I have
> also
> >>>>>>>> done
> >>>>>>>> with its integration from Java. ( java client class and hbase were
> >>>>>>>> on
> >>>>>>>> same
> >>>>>>>> system )
> >>>>>>>>
> >>>>>>>> Now, I have no idea how to change configuration to access hbase
> >>>>>>>> from
> >>>>>>>> a
> >>>>>>>> remote client ( like mysql jdbc conn. where se can change ip of
> >>>>>>>> server
> >>>>>>>> from
> >>>>>>>> localhost to other )
> >>>>>>>>
> >>>>>>>> Please help.
> >>>>>>>>
> >>>>>>>> Thanks in advance.
> >>>>>>>>
> >>>>>>>> Following is my java client code :
> >>>>>>>>
> >>>>>>>> import org.apache.hadoop.hbase.client.HTable;
> >>>>>>>> import org.apache.hadoop.hbase.HBaseConfiguration;
> >>>>>>>> import org.apache.hadoop.hbase.io.RowResult;
> >>>>>>>>
> >>>>>>>> import java.util.HashMap;
> >>>>>>>> import java.util.Map;
> >>>>>>>> import java.io.IOException;
> >>>>>>>>
> >>>>>>>> public class HBaseConnector {
> >>>>>>>>
> >>>>>>>> public static Map retrievePost(String postId) throws IOException {
> >>>>>>>> HTable table = new HTable(new HBaseConfiguration(), "blogposts");
> >>>>>>>> Map post = new HashMap();
> >>>>>>>>
> >>>>>>>> RowResult result = table.getRow(postId);
> >>>>>>>>
> >>>>>>>> for (byte[] column : result.keySet()) {
> >>>>>>>> post.put(new String(column), new
> >>>>>>>> String(result.get(column).getValue()));
> >>>>>>>> }
> >>>>>>>> return post;
> >>>>>>>> }
> >>>>>>>>
> >>>>>>>> public static void main(String[] args) throws IOException {
> >>>>>>>> Map blogpost = HBaseConnector.retrievePost("post1");
> >>>>>>>> System.out.println(blogpost.get("post:title"));
> >>>>>>>> System.out.println(blogpost.get("post:author"));
> >>>>>>>> }
> >>>>>>>> }
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> --
> >>>>>>>> View this message in context:
> >>>>>>>>
> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23535721.html
> >>>>>>>> Sent from the HBase User mailing list archive at Nabble.com.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> Sasha Dolgy
> >>>>>>> sasha.dolgy@gmail.com
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> View this message in context:
> >>>>>>
> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23592018.html
> >>>>>> Sent from the HBase User mailing list archive at Nabble.com.
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Sasha Dolgy
> >>>>> sasha.dolgy@gmail.com
> >>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>>
> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23595650.html
> >>>> Sent from the HBase User mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> Sasha Dolgy
> >>> sasha.dolgy@gmail.com
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23595890.html
> >> Sent from the HBase User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> >
> > --
> > Sasha Dolgy
> > sasha.dolgy@gmail.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p24371414.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>

Re: Set hbase configuration when client is on different machine

Posted by Jean-Daniel Cryans <jd...@apache.org>.
Rajeev,

Safe mode is on in HBase when the ROOT region is not assigned, this is
usually done very fast when HBase is started. If for you it hangs on
that, it hints on a problem on the cluster itself and you should check
the logs for any exception.

J-D

On Tue, Jul 7, 2009 at 7:17 AM, RajeevSharma<ra...@gmail.com> wrote:
>
> Hi Saha,
>
> I read through this conversation and tried configuring my HBase. I added
> following config to my hbase-site.xml
>
> <property>
>     <name>hbase.master</name>
>     <value>foo.bar.com:60000</value>
>     <description>The host and port that the HBase master runs at.
>     A value of 'local' runs the master and a regionserver in
>     a single process.
>     </description>
> </property>
>
> after adding this setting I get the following error in my log file.
>
> 2009-07-07 16:31:34,571 INFO org.apache.hadoop.hbase.master.RegionManager:
> in safe mode
>
> any idea what is wrong here?
>
> --
> Rajeev
>
>
> Sasha Dolgy-2 wrote:
>>
>> hbase-site.xml overrides hbase-default.xml if there is a duplication
>> of properties defined.  as i understand, all customizations should not
>> be put in the hbase-default.xml and should be put in the
>> hbase-site.xml or other related xml files.
>>
>> -sd
>>
>> On Mon, May 18, 2009 at 2:41 PM, monty123 <ma...@yahoo.com> wrote:
>>>
>>> Thanks for the quick response.
>>>
>>> I still have a confusion,
>>> entry for hbase.master property is in my hbase-default.xml not
>>> hbase-site.xml
>>> whether I need to put a new entry for hbase.master in hbase-site.xml or I
>>> can change hbase-default.xml 's entry to
>>> "foo.bar.com:60000"
>>>
>>> I had also attached these two files in my previous post message.
>>>
>>> Thanks for the help.
>>>
>>>
>>> Sasha Dolgy-2 wrote:
>>>>
>>>> right, this is because your hbase is listening to the localhost and
>>>> not to the public interface of the network card.
>>>>
>>>> in your $HBASE_HOME/conf/hbase-site.xml validate the following
>>>> configuration parameter ( i think the default is local):
>>>>
>>>>   <property>
>>>>     <name>hbase.master</name>
>>>>     <value>foo.bar.com:60000</value>
>>>>     <description>The host and port that the HBase master runs at.
>>>>     A value of 'local' runs the master and a regionserver in
>>>>     a single process.
>>>>     </description>
>>>>   </property>
>>>>
>>>> This will mean that the service will bind to the reverse lookup of
>>>> foo.bar.com on port 6000
>>>> -sasha
>>>>
>>>> On Mon, May 18, 2009 at 12:33 PM, monty123 <ma...@yahoo.com>
>>>> wrote:
>>>>>
>>>>> my netstat output is :
>>>>>
>>>>> netstat -an | grep 60000
>>>>> tcp6       0      0 127.0.0.1:60000         :::*
>>>>>  LISTEN
>>>>> tcp6       0      0 127.0.0.1:47423         127.0.0.1:60000
>>>>> ESTABLISHED
>>>>> tcp6       0      0 127.0.0.1:60000         127.0.0.1:47423
>>>>> ESTABLISHED
>>>>>
>>>>> Also, when I telnet <machine-ip/192.168...> 60000 from second machine
>>>>> its
>>>>> output is :
>>>>> telnet : unable to connect to remote host : conncetion refused (only at
>>>>> port
>>>>> 60000, not on default port)
>>>>>
>>>>> I am confused please help.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Sasha Dolgy-2 wrote:
>>>>>>
>>>>>> another thing to check is that HBase is listening on a proper IP.  By
>>>>>> default it binds to 127.0.0.1 ... netstat -an | grep 60000 you'll see
>>>>>> what ip/interface it's listening on and be able to make the
>>>>>> configuration changes necessary.
>>>>>>
>>>>>> On Mon, May 18, 2009 at 7:51 AM, monty123 <ma...@yahoo.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> Thanks Sasha,
>>>>>>> I have changed my code and added following two lines as suggested by
>>>>>>> you.
>>>>>>>
>>>>>>> HBaseConfiguration config = new HBaseConfiguration();
>>>>>>> config.set("hbase.master", "impetus-805:60000");
>>>>>>>
>>>>>>> Now client class throws  "09/05/18 12:09:49 INFO ipc.HBaseClass:
>>>>>>> Retrying
>>>>>>> connect to server: impetus-805/192.168.102.38:60000. Already tried 0
>>>>>>> time(s)......" exception.
>>>>>>>
>>>>>>> I have also attached my hbase-default.xml and hbase-site.xml.
>>>>>>> Please help. http://www.nabble.com/file/p23592018/hbase-default.xml
>>>>>>> hbase-default.xml
>>>>>>>  http://www.nabble.com/file/p23592018/hbase-site.xml
>>>>>>> hbase-site.xml
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Sasha Dolgy-2 wrote:
>>>>>>>>
>>>>>>>>  HBaseConfiguration config = new HBaseConfiguration();
>>>>>>>> config.set("hbase.master", "foo.bar.com:60000");
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, May 14, 2009 at 8:32 AM, monty123 <ma...@yahoo.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Hi All,
>>>>>>>>>
>>>>>>>>> I am a newbie to hbase.
>>>>>>>>> I am able to setup hbase in pseudo-distributed mode and I have also
>>>>>>>>> done
>>>>>>>>> with its integration from Java. ( java client class and hbase were
>>>>>>>>> on
>>>>>>>>> same
>>>>>>>>> system )
>>>>>>>>>
>>>>>>>>> Now, I have no idea how to change configuration to access hbase
>>>>>>>>> from
>>>>>>>>> a
>>>>>>>>> remote client ( like mysql jdbc conn. where se can change ip of
>>>>>>>>> server
>>>>>>>>> from
>>>>>>>>> localhost to other )
>>>>>>>>>
>>>>>>>>> Please help.
>>>>>>>>>
>>>>>>>>> Thanks in advance.
>>>>>>>>>
>>>>>>>>> Following is my java client code :
>>>>>>>>>
>>>>>>>>> import org.apache.hadoop.hbase.client.HTable;
>>>>>>>>> import org.apache.hadoop.hbase.HBaseConfiguration;
>>>>>>>>> import org.apache.hadoop.hbase.io.RowResult;
>>>>>>>>>
>>>>>>>>> import java.util.HashMap;
>>>>>>>>> import java.util.Map;
>>>>>>>>> import java.io.IOException;
>>>>>>>>>
>>>>>>>>> public class HBaseConnector {
>>>>>>>>>
>>>>>>>>> public static Map retrievePost(String postId) throws IOException {
>>>>>>>>> HTable table = new HTable(new HBaseConfiguration(), "blogposts");
>>>>>>>>> Map post = new HashMap();
>>>>>>>>>
>>>>>>>>> RowResult result = table.getRow(postId);
>>>>>>>>>
>>>>>>>>> for (byte[] column : result.keySet()) {
>>>>>>>>> post.put(new String(column), new
>>>>>>>>> String(result.get(column).getValue()));
>>>>>>>>> }
>>>>>>>>> return post;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> public static void main(String[] args) throws IOException {
>>>>>>>>> Map blogpost = HBaseConnector.retrievePost("post1");
>>>>>>>>> System.out.println(blogpost.get("post:title"));
>>>>>>>>> System.out.println(blogpost.get("post:author"));
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23535721.html
>>>>>>>>> Sent from the HBase User mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Sasha Dolgy
>>>>>>>> sasha.dolgy@gmail.com
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23592018.html
>>>>>>> Sent from the HBase User mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sasha Dolgy
>>>>>> sasha.dolgy@gmail.com
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23595650.html
>>>>> Sent from the HBase User mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sasha Dolgy
>>>> sasha.dolgy@gmail.com
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p23595890.html
>>> Sent from the HBase User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Sasha Dolgy
>> sasha.dolgy@gmail.com
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Set-hbase-configuration-when-client-is-on-different-machine-tp23535721p24371414.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>