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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-incubating, 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: Recipes
    • Labels:
      None
    • Environment:
      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. test.java
          2 kB
          Jordan Zimmerman
        2. FailurePenStart2.java
          2 kB
          Evaristo
        3. FailurePenStart.java
          1 kB
          Evaristo

          Activity

            People

            • Assignee:
              randgalt Jordan Zimmerman
              Reporter:
              evaristojosec@yahoo.es Evaristo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: