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

ServiceProvider thread is not closed during ServiceDiscovery close

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: None
    • Labels:
      None

      Description

      I'm using 2.0.1-incubating, using the following to build a ServiceProvider:

      serviceProvider = serviceDiscovery.serviceProviderBuilder()
      .serviceName(name)
      .providerStrategy(new RoundRobinStrategy<DiscoverableService>())
      .build();
      serviceProvider.start();

      I have a name => ServiceProvider map that stores all my service providers. During shutdown, I call:

      for (ServiceProvider serviceProvider : serviceProviderMap.values())

      { serviceProvider.close(); }

      serviceDiscovery.close();

      Which is redundant, it seems, because serviceDiscovery itself appears to shutdown the providers. However, I still end up with a dangling "ServiceProvider-0" thread that keeps Tomcat open.

      If I start the container up, without making a service call (so I don't allocate any ServiceProviders), Tomcat shuts down cleanly. As soon as a ServiceProvider is allocated (by making a service call) Tomcat hangs during shutdown, and informs me of the remaining thread. I will try to provide more information as it becomes available to me.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iocanel Ioannis Canellos
                Reporter:
                cmorelli Colin Morelli
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: