Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> Help me!


Hi
  I have tried Sasl from a java client and it works

Here is the properties you have to set in the client

 System.setProperty("zookeeper.authProvider.1","org.apache.zookeeper.server.auth.SASLAuthenticationProvider");

System.setProperty("java.security.auth.login.config","/pathto/conf/jaas.conf");
    System.setProperty(ZooKeeperSaslClient.LOGIN_CONTEXT_NAME_KEY,
"Client");
..
...
zk.create(path, "I am a node".getBytes(), Ids.CREATOR_ALL_ACL,
CreateMode.PERSISTENT);

Let me know if this helps

Regards
Hari
On Mon, Jan 21, 2013 at 10:09 PM, 张晋 <[EMAIL PROTECTED]> wrote:

> I tried 3.4.5,the same exception。
> Thx all the same^_^
>
> On Monday, January 21, 2013, Apostolis Xekoukoulotakis wrote:
>
> > Most probably you are using 3.4.4 version. You need to update.
> >
> > 2013/1/21 Bill Zhang <[EMAIL PROTECTED] <javascript:;>>
> >
> > > [Class]ZooKeeperSaslClient, Could not retrieve login configuration:
> > > java.lang.SecurityException: Unable to locate a login configuration
> > >
> > > I used zk in a java web app.What's the reason for the exception above?
> > >
> > > Could someone help?
> > >
> > > Bill
> >
> >
> >
> >
> > --
> >
> >
> > Sincerely yours,
> >
> >      Apostolis Xekoukoulotakis
> >
>
>
> --
> Sent from Gmail Mobile
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB