python-zk / kazoo

Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.
https://kazoo.readthedocs.io
Apache License 2.0
1.3k stars 387 forks source link

Kazoo python client Unable to create node after ACL is passed while creating client #596

Open anish97IND opened 4 years ago

anish97IND commented 4 years ago

I am facing issue with kazoo while implementing lock with default_acl. When I initialize client and try to create node, it shows, NoAuthError. I m sharing the code below.

credentials=make_digest_acl_credential('distribution','password') zk= KazooClient(hosts='192xxxx:2181,192.xxxxx:2181,192xxxxx:2181', default_acl=(make_acl('digest', credentials, all=True),)) zk.start() zk.add_auth('digest',credentials) zk.create("/testNode/locking",makepath=True) # i get error here while creating

As lock function of Kazoo client also creates an ephemeral node, hence, that also doesn't work...

Please help me out in this ....thanks in advance :)