Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-53

PersistentEphemeralNode does not work when ZK server are not available when the node is started

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0-incubating, 2.3.0
    • 2.4.0
    • Recipes
    • None
    • Windows, Java 1.7, Zookeeper 3.4.5, Curator 2.1.0

    Description

      This sequence is not working:

      // ZK servers are not started here
      ExponentialBackoffRetry retryPolicy = new ExponentialBackoffRetry(1000, 1, 2000);
      CuratorFramework zkClient = CuratorFrameworkFactory.newClient("127.0.0.1:30101",

      4500,
      4500,
      retryPolicy);
      zkClient.start();
      Thread.sleep(2000);

      PersistentEphemeralNode pen = new PersistentEphemeralNode(zkClient, Mode.EPHEMERAL, "/abc/pen", "hello".getBytes());
      Thread.sleep(2000);

      // Start ZK servers here
      Thread.sleep(2000);
      // "/abc/pen" ephemeral node is not created

      It is expected that once the CuratorFrameowrk is connected the ephemeral node is created

      I attach a program that shows the failure

      Attachments

        1. FailurePenStart.java
          1 kB
          Chevaris
        2. FailurePenStart2.java
          2 kB
          Chevaris
        3. test.java
          2 kB
          Jordan Zimmerman

        Activity

          People

            randgalt Jordan Zimmerman
            evaristojosec@yahoo.es Chevaris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: