hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Spaggiari <jean-m...@spaggiari.org>
Subject Re: Failure connecting to Hbase remotely from Tomcat 6 Servlet
Date Mon, 01 Oct 2012 15:09:40 GMT
Same here.

Working with Tomcat and HBase with no issue.

Have you tried to connect to HBase from the server with a standalone
application?

JM

2012/10/1, mlanciau <mlanciau@gmail.com>:
> Hello Mouradk,
>
> I use tomcat + HBase and I have no problem. (And it's really cool !)
> I do not change any tomcat policy, just add the lib in WEB-INF/lib/ and the
> hbase-site.xml in a conf folder (in the tomcat build path).
>
> How do you add the hbase-site.xml ?
>
> Regards.
>
> 2012/10/1 Mouradk <mouradk78@googlemail.com>
>
>> Hello,
>>
>> This is my first post so apologies if I am breaking some etiquette.
>>
>> I am not an expert on Hbase and have been flaying through threads of
>> Hbase
>> remote connection but with no luck solving my problem.
>>
>> I am running a Hbase/Hadoop single cluster on an EC2 instance (Ubuntu
>> 10.4). I am also running a servlet on a tomcat6 server in another ec2
>> instance. The plan is for the servlet to write and read to the remote
>> Hbase
>> instance. The servlet is running a context listener with some java
>> routines
>> (ServletContextListener).
>>
>> Now if I run the java project as a runnable jar instead of a servlet all
>> is fine. It connects to Hbase and writes/reads from table. But on tomcat6
>> it just freezes when attempting to connect to the Hbase instance.
>>
>> 2012-10-01 11:11:40,751 [Timer-4] INFO
>>  com.myApp.foundation.access.HBaseHandler  initialise(..) -
>> Initialisation
>> HbaseHandler configuration ...
>> 2012-10-01 11:11:40,763 [Timer-4] DEBUG
>> org.apache.hadoop.conf.Configuration  <init>(..) - java.io.IOException:
>> config()
>>     at
>> org.apache.hadoop.conf.Configuration.<init>(Configuration.java:211)
>>     at
>> org.apache.hadoop.conf.Configuration.<init>(Configuration.java:198)
>>     at
>> org.apache.hadoop.hbase.HBaseConfiguration.<init>(HBaseConfiguration.java:33)
>>     at
>> com.myApp.foundation.access.HBaseHandler.initialise(HBaseHandler.java:507)
>>     at
>> com.myApp.foundation.access.HBaseHandler.<init>(HBaseHandler.java:53)
>>     at
>> com.myApp.foundation.access.HBaseHandler.getInstance(HBaseHandler.java:500)
>>     at
>> com.myApp.foundation.hbase.StorableRow.<clinit>(StorableRow.java:40)
>>     at
>> com.myApp.foundation.entities.Article.storeToHbase(Article.java:257)
>>     at
>> com.myApp.task.impl.HBaseArticlePersisterTask.process(HBaseArticlePersisterTask.java:101)
>>     at
>> com.myApp.foundation.task.QueueTask.performTask(QueueTask.java:101)
>>     at
>> com.myApp.runner.impl.HBasePersisterRunner$1.run(HBasePersisterRunner.java:46)
>>     at java.util.TimerThread.mainLoop(Timer.java:512)
>>     at java.util.TimerThread.run(Timer.java:462)
>>
>> 2012-10-01 11:11:40,803 [Timer-4] INFO
>>  com.myApp.foundation.access.HBaseHandler  initialise(..) - Config
>> resource
>> zookeeper.quorum: ip-10-10-10-10.eu-west-1.compute.internal
>>
>> 2012-10-01 11:11:40,803 [Timer-4] INFO
>>  com.myApp.foundation.access.HBaseHandler  initialise(..) - Config
>> resource
>> zookeeper.clientPort: 2181
>>
>> 2012-10-01 11:11:40,804 [Timer-4] INFO
>>  com.myApp.foundation.access.HBaseHandler  initialise(..) - Config
>> resource
>> hbase.master.info.port: 60010
>>
>> 2012-10-01 11:11:40,804 [Timer-4] INFO
>>  com.myApp.foundation.access.HBaseHandler  initialise(..) - Config
>> resource
>> hbase.master.info.bindAddress: ip-10-10-10-10.eu-west-1.compute.internal
>> I can telnet the HBase instance. In the servlet I included the
>> hbase-site.xml. But as you can see from the log, the zookkeeper.quorum is
>> getting picked up as well as the port number. All necessary ports are
>> open
>> on the Hbase instance.
>>
>> Something is telling me tomcat6 policy configuration is to blame. But I
>> don't see anything in the catalina logs. Are there any other logs I am
>> missing or could guide me to the right logs? Anywhere I can track if
>> Zookeeper is receiving any requests?
>>
>> Has someone experienced the same problem?
>>
>> Many thanks in advance.
>>
>> Mourad
>
>
>
>
> --
> Maxime LANCIAUX
> http://maximelanciauxbi.blogspot.fr/
>

Mime
View raw message