tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pid *" <>
Subject Re: Failure connecting to Hbase remotely from Tomcat 6 Servlet
Date Tue, 02 Oct 2012 07:28:50 GMT
On 1 Oct 2012, at 14:59, Mouradk <> wrote:

> 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  initialise(..)
- Initialisation HbaseHandler configuration ...
> 2012-10-01 11:11:40,763 [Timer-4] DEBUG org.apache.hadoop.conf.Configuration  <init>(..)
- config()
>    at org.apache.hadoop.conf.Configuration.<init>(
>    at org.apache.hadoop.conf.Configuration.<init>(
>    at org.apache.hadoop.hbase.HBaseConfiguration.<init>(
>    at
>    at<init>(
>    at
>    at<clinit>(
>    at
>    at com.myApp.task.impl.HBaseArticlePersisterTask.process(
>    at
>    at com.myApp.runner.impl.HBasePersisterRunner$
>    at java.util.TimerThread.mainLoop(
>    at

I don't know HBase, but I'd read this stack as being caused by a config error.

> 2012-10-01 11:11:40,803 [Timer-4] INFO  initialise(..)
- Config resource zookeeper.quorum:
> 2012-10-01 11:11:40,803 [Timer-4] INFO  initialise(..)
- Config resource zookeeper.clientPort: 2181
> 2012-10-01 11:11:40,804 [Timer-4] INFO  initialise(..)
- Config resource 60010
> 2012-10-01 11:11:40,804 [Timer-4] INFO  initialise(..)
- Config resource

> 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.

What's in the config before those details?

> Something is telling me tomcat6 policy configuration is to blame.

If you have the Security Manager turned on, turn it off - then you'll
know pretty quickly if the policy is a) effective and b) wrong.

> 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?
> Has someone experienced the same problem?

Doesn't look like a Tomcat problem. Either a HBase or OS config issue.
Have you opened the necessary firewall ports, for example?


> Many thanks in advance.
> Mourad

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message