You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Tianying Chang <ti...@ebaysf.com> on 2012/11/27 20:05:35 UTC
KeeperErrorCode=InvalideACL while trying to create a znode
Hi,
I am trying to implement a global lock with zookeeper. However, it throws an exception of InvalidACLException while I am trying to create an ephermal/sequential znode. I create the node with ACL of ZooDefs.Ids.CREATOR_ALL_ACL, which should give all the permission.
Anyone knows why I am getting this Exception? BTW, since I am working with hbase, I am using the zookeeper client library provided by hbase when needed, don't know if that could cause some complication here.
Thanks
Tian-Ying
RE: KeeperErrorCode=InvalideACL while trying to create a znode
Posted by Tianying Chang <ti...@ebaysf.com>.
Michi,
Thanks for the helpful suggestion! You are right! I did not call addAuthInfo(). And after further thinking, I feel my case does not need that tight security at this stage, instead, I just create the ACL of new ACL(ZooDefs.Perms.READ, Ids.ANYONE_ID_UNSAFE). That way, I can create the znode without calling addAuthInfo(). I will explore the authentication a little later.
Thanks a lot
Tian-Ying
________________________________________
From: mutsuzaki@gmail.com [mutsuzaki@gmail.com] on behalf of Michi Mutsuzaki [michi@cs.stanford.edu]
Sent: Tuesday, November 27, 2012 1:32 PM
To: user@zookeeper.apache.org
Subject: Re: KeeperErrorCode=InvalideACL while trying to create a znode
Hi Tian-Ying,
Did you call ZooKeeper.addAuthInfo()? The client session needs to be
authenticated before you can use ZooDefs.Ids.CREATOR_ALL_ACL.
--Michi
On Tue, Nov 27, 2012 at 11:05 AM, Tianying Chang <ti...@ebaysf.com> wrote:
> Hi,
>
> I am trying to implement a global lock with zookeeper. However, it throws an exception of InvalidACLException while I am trying to create an ephermal/sequential znode. I create the node with ACL of ZooDefs.Ids.CREATOR_ALL_ACL, which should give all the permission.
>
> Anyone knows why I am getting this Exception? BTW, since I am working with hbase, I am using the zookeeper client library provided by hbase when needed, don't know if that could cause some complication here.
>
> Thanks
> Tian-Ying
Re: KeeperErrorCode=InvalideACL while trying to create a znode
Posted by Michi Mutsuzaki <mi...@cs.stanford.edu>.
Hi Tian-Ying,
Did you call ZooKeeper.addAuthInfo()? The client session needs to be
authenticated before you can use ZooDefs.Ids.CREATOR_ALL_ACL.
--Michi
On Tue, Nov 27, 2012 at 11:05 AM, Tianying Chang <ti...@ebaysf.com> wrote:
> Hi,
>
> I am trying to implement a global lock with zookeeper. However, it throws an exception of InvalidACLException while I am trying to create an ephermal/sequential znode. I create the node with ACL of ZooDefs.Ids.CREATOR_ALL_ACL, which should give all the permission.
>
> Anyone knows why I am getting this Exception? BTW, since I am working with hbase, I am using the zookeeper client library provided by hbase when needed, don't know if that could cause some complication here.
>
> Thanks
> Tian-Ying