Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C14C1D153 for ; Wed, 3 Oct 2012 09:47:35 +0000 (UTC) Received: (qmail 50023 invoked by uid 500); 3 Oct 2012 09:47:34 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 48208 invoked by uid 500); 3 Oct 2012 09:47:26 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 48170 invoked by uid 99); 3 Oct 2012 09:47:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 09:47:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mlanciau@gmail.com designates 209.85.212.41 as permitted sender) Received: from [209.85.212.41] (HELO mail-vb0-f41.google.com) (209.85.212.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Oct 2012 09:47:20 +0000 Received: by vbkv13 with SMTP id v13so9532666vbk.14 for ; Wed, 03 Oct 2012 02:46:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=FMyfaA5xZlhV7Nlb0yprCsPj9hW/cFepzrHvrBWszS4=; b=sBYzpS/EHpXTwdrbItcPiq4bwgmf9Vr2Lh1XLKb3XnTPZcPVlICebrLfsNnZpZVzj/ Sg2eWHig61oi6KnD5I0g9wirJhiRfMH+hM5797BbsEqyrE/Y18Dn8tMlNInnaseDkTFb CqqiCDnBPg35VLWo9amEwYZP0B5WQ4M+TqmpAjkr7o9l+4RnAtKbQm+V2ZqfrZW7Tdzf BL0hh2M+oRQePioLkjf7c/8gn/cBo5qBnhmc9CMYXXl2rWQSMNGWb9RuqqU0NSdBtjKL Bge2C9XAsDgKwXrHXxGGCHi0iM1y/76EAs8Gvh9Z4jnXEWQD4EPWJbwHEPVdWsBwggRf puBg== Received: by 10.220.150.145 with SMTP id y17mr840962vcv.11.1349257619722; Wed, 03 Oct 2012 02:46:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.203.137 with HTTP; Wed, 3 Oct 2012 02:46:39 -0700 (PDT) In-Reply-To: <907489AD-0A39-452E-8A93-49C832B72003@gmail.com> References: <5FD7CD8C-032D-46DC-88CE-9CEDD3FE7159@gmail.com> <907489AD-0A39-452E-8A93-49C832B72003@gmail.com> From: mlanciau Date: Wed, 3 Oct 2012 11:46:39 +0200 Message-ID: Subject: Re: Failure connecting to Hbase remotely from Tomcat 6 Servlet To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=f46d043d67e92253b604cb24850e X-Virus-Checked: Checked by ClamAV on apache.org --f46d043d67e92253b604cb24850e Content-Type: text/plain; charset=UTF-8 Hello Mouradk I think if the jar works well, there is no problem with HBase so be free to reply directly on my email : mlanciau [at] gmail. The hbase-site.xml must not be in the lib folder, but rather in a folder in your build path. If you don't have log, perhaps you can send me some code ! Regards 2012/10/1 Mouradk > Hi, > > Thanks for you reply. I am trying to connect to Hbase running on a remote > ec2 instance from a web app in tomcat running in a different ec2 instance. > My Hbase handler lives in a jar of a another project (foundation) in it's > src folder. While debugging, the HBaseConfiguration picks up the properties > from that base-site.xml file. This "foundation" project is bundled in the > lib folder of the web application and referenced to it. > > Initially, I added the hbase-site.xml in the lib folder of the web app > (WEB-INF/lib) but it' not being used there. I have just added the > hbase-site.xml in tomcat conf folder along side context.xml and server.xml > files (this is the place?) > > I restarted tomcat but this did not solve the problem. What I can't figure > out is not getting anything in the logs, I can't trace an error or > exception, to put me in the right direction. Is there something in the > policy files that need to be set as well? > > is running a web app with ServletContextListener needs some permissions? > > Many thanks for your help, > > Mouradk > > On 1 Oct 2012, at 16:06, mlanciau wrote: > > > 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 > > > >> 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 (..) - java.io.IOException: > >> config() > >> at > org.apache.hadoop.conf.Configuration.(Configuration.java:211) > >> at > org.apache.hadoop.conf.Configuration.(Configuration.java:198) > >> at > >> > org.apache.hadoop.hbase.HBaseConfiguration.(HBaseConfiguration.java:33) > >> at > >> > com.myApp.foundation.access.HBaseHandler.initialise(HBaseHandler.java:507) > >> at > >> com.myApp.foundation.access.HBaseHandler.(HBaseHandler.java:53) > >> at > >> > com.myApp.foundation.access.HBaseHandler.getInstance(HBaseHandler.java:500) > >> at > com.myApp.foundation.hbase.StorableRow.(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/ > > -- Maxime LANCIAUX http://maximelanciauxbi.blogspot.fr/ --f46d043d67e92253b604cb24850e--