curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McKenzie <>
Subject Re: NodeExistsException with Shared Value recipe in Curator
Date Mon, 31 Aug 2015 21:46:01 GMT
I'll let the other devs weigh in also, but I would prefer not to put in a
checkExists() call. While it minimises the likelihood of a
NodeExistsException occurring, it's not a guarantee. Ultimately, I think
that this should be fixed in Zookeeper itself.

Have you tried just changing the log4j configuration on the ZK server to
change the logging level for the particular appender that's logging the
INFO message? You shouldn't need to go down the path of logging to one file
and then filtering that to another file.

On Tue, Sep 1, 2015 at 7:39 AM, Daniel Kashtan <> wrote:

> I believe that is my only other option. I think I will try to route the
> full logs to a separate file with the word verbose in it and filter out the
> PrepRequestProcessor class on the ZKServer in my zookeeper.log file.
> Would it be possible in the future to have Curator have the option to run
> a checkExists() before the .start() call on a recipe like Shared-Value? Is
> the extra overhead not worth the trouble?
> On Mon, Aug 31, 2015 at 5:28 PM, Cameron McKenzie <>
> wrote:
>> hey Daniel,
>> I don't think that Curator can help in this regard. As you have
>> suggested, the logs are generated on the server side by Zookeeper itself.
>> Not sure if you could do something with the logging on the server. Maybe
>> set that particular log4j appender to only log WARN and above?
>> On Tue, Sep 1, 2015 at 5:43 AM, Daniel Kashtan <>
>> wrote:
>>> I am running with the debugger in eclipse and I see the try/catch block,
>>> but it does not stop zookeeper from printing in the logs that there was a
>>> NodeExistsException. I believe that the NodeExistsException is being
>>> printed by the Zookeeper Server? I have all my logs routed to one file.
>>> The message looks like this:
>>> 2015-08-31 15:27:46,740 [myid:] - INFO [ProcessThread(sid:0
>>> cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException
>>> when processing sessionid:0x14f84fd269c0003 type:create cxid:0xa4
>>> zxid:0x62d txntype:-1 reqpath:n/a Error
>>> Path:/results/response-5932e7bc-2fe6-4745-8e36-6ed49d6f31a3
>>> Error:KeeperErrorCode = NodeExists for
>>> /results/response-5932e7bc-2fe6-4745-8e36-6ed49d6f31a3
>>> I had the same issue earlier with two different parts of my code and I
>>> could not solve this issue with try/catch blocks. I had to do a
>>> checkExists() before creating a new node.
>>> BTW I am using Curator 2.8.0
>>> On Mon, Aug 31, 2015 at 3:08 PM, Jordan Zimmerman <
>>>> wrote:
>>>> Can you write a test that shows this? It doesn’t seem possible given
>>>> your description. Have a look at SharedValue.start(). Note that it catches
>>>> NodeExistsException.
>>>> -JZ
>>>> On August 31, 2015 at 12:06:30 PM, Daniel Kashtan (
>>>> wrote:
>>>> I inherited some Curator code that creates a Shared Value recipe in two
>>>> different parts of my code, using the same path. Once the second Shared
>>>> Value has .start() called, the NodeExistsException from the Zookeeper
>>>> server is created in the logs.
>>>> I am not sure how to handle this issue. Can I retrieve the Shared Value
>>>> instance from Curator instead of trying to create a second new instance of
>>>> the Shared Value on the same path?
>>>> --
>>>> -Daniel
>>> --
>>> -Daniel
> --
> -Daniel

View raw message