hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Futrelle <bob.futre...@gmail.com>
Subject Re: HBase 0.94 security configurations
Date Tue, 18 Dec 2012 18:15:32 GMT
Nick's suggestions appear to have helped, but we're not home yet.

Start-up, CLI:

$./bin/start-hbase.sh
starting master, logging to
/Users/robertfutrelle/Research/HBase/hbase/bin/../logs/hbase-robertfutrelle-master-Macintosh.local.out

Then I run my Java code, w.  conf.set(…)  commented out per Nick's
suggestion.
23 lines of output in Eclipse console.  Last line of the 23 is,

12/12/18 12:56:51 INFO zookeeper.ClientCnxn: Session establishment complete
on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x13baf2762e80004,
negotiated timeout = 40000


Then this exception brings things to a halt,

Exception in thread "main" java.lang.NoClassDefFoundError:
com/google/protobuf/Message

I'm a bit confused by the mixed approach in which I start HBase from the
command line and then execute Java code.  How do the two come together?

Thank you, everyone, for your continued help.

As for security, it's not even listed in the index of Lars George's HBase
book.

I'm confident that *persistence* will get things working (see my PS below).

   - Bob

PS on persistence:

Nothing in the world can take the place of Persistence. Talent will not;
nothing is more common than unsuccessful men with talent. Genius will not;
unrewarded genius is almost a proverb. Education will not; the world is
full of educated derelicts. Persistence and determination alone are
omnipotent. The slogan 'Press On' has solved and always will solve the
problems of the human race. <http://www.quotationspage.com/quote/2771.html>
[image: [info]] <http://www.quotationspage.com/quote/2771.html>[image:
[add]] <http://www.quotationspage.com/myquotations.php?add=2771>[image:
[mail]] <http://www.quotationspage.com/quote/2771.html#email>[image:
[note]]<http://www.quotationspage.com/quote/2771.html#note>
*Calvin Coolidge*


On Tue, Dec 18, 2012 at 3:19 AM, Nick Dimiduk <ndimiduk@gmail.com> wrote:

> Are you using secure HBase? Don't -- it'll only get in the way for a simple
> example. Is the master running? Be sure to run ./bin/start-hbase.sh from
> the directory where you unpacked the tgz. You can omit the conf.set(...)
> business from your code. By default, the configuration will point to local
> host.
>
> Does any of that help?
>
> -n
> On Dec 17, 2012 8:47 PM, "Bob Futrelle" <bob.futrelle@gmail.com> wrote:
>
> > Thanks for your quick reply.
> >
> >
> > On Mon, Dec 17, 2012 at 11:25 PM, Jimmy Xiang <jxiang@cloudera.com>
> wrote:
> >
> > > Have you tried IPv4?
> >
> >
> > I can disable IPv6 in Mountain Lion, but all my "communication" is
> > *within*my own machine, so I don't understand why I'd be messing with
> > IP, since
> > nothing I'm doing is going through my ethernet or WiFi.  But that may be
> > the HBase view of communication, even when entirely within a machine(?)
> >  It's late - will try in the morning.
> >
> > As for the cloudera page, it seems like a huge amount of information that
> > goes way beyond the trivial setup that I'm trying to arrange for.  Maybe
> > what I need is buried in the page somewhere  (emphasis on "buried").
> >
> > As they say:  "My code is so simple, what could possibly go wrong?"  ;-)
> >
> >  - Bob
> >
> >
> > > As to secure HBase configuration, this
> > > instruction may be of some help:
> > >
> > > https://ccp.cloudera.com/display/CDH4DOC/HBase+Security+Configuration
> > >
> > > Thanks,
> > > Jimmy
> > >
> > > On Mon, Dec 17, 2012 at 8:15 PM, Bob Futrelle <bob.futrelle@gmail.com>
> > > wrote:
> > > > I have the same problem that Amit Sela had - an endlessly repeating
> > > message
> > > > in my Eclipse console:
> > > >
> > > > java.net.ConnectException
> > > > : Connection refused
> > > >
> > > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
> > > >
> > > > at
> > sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:599)
> > > >
> > > > at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(
> > > > ClientCnxnSocketNIO.java:286)
> > > >
> > > > at
> org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1035)
> > > >
> > > > 12/12/17 20:54:51 INFO zookeeper.ClientCnxn: Opening socket
> connection
> > to
> > > > server /fe80:0:0:0:0:0:0:1%1:2181
> > > >
> > > > 12/12/17 20:54:51 WARN zookeeper.RecoverableZooKeeper: Possibly
> > transient
> > > > ZooKeeper exception:
> > > > org.apache.zookeeper.KeeperException$ConnectionLossException:
> > > > KeeperErrorCode = ConnectionLoss for /hbase/master
> > > >
> > > > 12/12/17 20:54:51 INFO util.RetryCounter: Sleeping 2000ms before
> retry
> > > #1...
> > > >
> > > > 12/12/17 20:54:56 WARN client.ZooKeeperSaslClient: SecurityException:
> > > > java.lang.SecurityException: Unable to locate a login configuration
> > > > occurred when trying to find JAAS configuration.
> > > >
> > > > 12/12/17 20:54:56 INFO client.ZooKeeperSaslClient: Client will not
> > > > SASL-authenticate because the default JAAS configuration section
> > 'Client'
> > > > could not be found. If you are not using SASL, you may ignore this.
> On
> > > the
> > > > other hand, if you expected SASL to work, please fix your JAAS
> > > > configuration.
> > > >
> > > > 12/12/17 20:54:56 WARN zookeeper.ClientCnxn: Session 0x0 for server
> > null,
> > > > unexpected error, closing socket connection and attempting reconnect
> > > >
> > > >
> > > > I'm about as much of a newbie as you can imagine.
> > > >
> > > > I found a small piece of code that creates a table.
> > > > It threw endless exceptions.  I fixed each by finding the correct
> jars
> > (7
> > > > in all)
> > > > and occasionally changing a bit of the code, e.g., using, not a
> > > > constructor, but
> > > >
> > > > HBaseConfiguration.create();
> > > >
> > > >
> > > > I'm using hbase-0.94.3 and Eclipse 4.2.1 (Juno).
> > > > No apache/hbase plugins, just straight Eclipse/Java.
> > > >
> > > > The only setting I've touched is hbase-site.xml
> > > > in which I put the path to the directory that I want my DBs in.
> > > > It worked from HBase Shell.
> > > > But of course I want it to work from Java.
> > > >
> > > > I suspect that the right info in the hbase-policy.xml would fix all
> > this.
> > > > But my understanding of HBase so far is too skimpy to know what to
> put
> > > > there.
> > > >
> > > > My goal is to do all this work entirely within my own machine
> (MacBook
> > > Pro).
> > > > Single user, nothing remote, no clients/cluster.
> > > >
> > > > For total disclosure, here's the entire source - my little HBase
> Hello
> > > World
> > > > :
> > > >
> > > > package us.tsos.nlpng.hbase.test1;
> > > >
> > > >
> > > > import java.io.IOException;
> > > >
> > > >
> > > > import org.apache.hadoop.hbase.HColumnDescriptor;
> > > >
> > > > import org.apache.hadoop.hbase.HTableDescriptor;
> > > >
> > > > import org.apache.hadoop.hbase.client.HBaseAdmin;
> > > >
> > > > import org.apache.hadoop.hbase.HBaseConfiguration;
> > > >
> > > >
> > > > public class JustCreateTable {
> > > >
> > > >
> > > >  public static void main(String[] args) throws IOException {
> > > >
> > > >
> > > >  org.apache.hadoop.conf.Configuration conf =
> > HBaseConfiguration.create();
> > > >
> > > > conf.set("hbase.master","localhost:60000");
> > > >
> > > >
> > > >  HBaseAdmin hbase = new HBaseAdmin(conf);
> > > >
> > > > HTableDescriptor desc = new HTableDescriptor("TEST");
> > > >
> > > > HColumnDescriptor meta = new
> HColumnDescriptor("personal".getBytes());
> > > >
> > > > HColumnDescriptor prefix = new
> HColumnDescriptor("account".getBytes());
> > > >
> > > > desc.addFamily(meta);
> > > >
> > > > desc.addFamily(prefix);
> > > >
> > > > hbase.createTable(desc);
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > >
> > > >  -- Bob Futrelle
> > > >
> > > >
> > > >     retired CS prof.
> > > >
> > > >     working hard on an NLP system
> > > >
> > > >     HBase will really fit the ticket
> > > >
> > > >
> > > > "You never *learn* anything, you just get used to it."
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message