I'll create a JIRA ticket for this.  Until it is fixed I think you can avoid this problem by setting the log-level to warning.  The code throwing an NPE is just trying to log something

      if (LOGGER.infoEnabled()) {
        LOGGER.info(
            resourceBundle.getString("LOG_MSG_REMOVE_THREAD") + " : " + clusterKey.toString());
      }


Le 3/27/2017 à 8:32 PM, Dharam Thacker a écrit :
Hi Bruce,

Thank you for the reply! I have attached thread dump for the same here.

Exception trace in locator logs:

[warning 2017/03/28 08:56:25.493 IST locator1 <Thread-22> tid=0x4a] Failed to stop the HTTP service because: null
java.lang.NullPointerException
    at org.apache.geode.tools.pulse.internal.data.Repository.removeAllClusters(Repository.java:225)
    at org.apache.geode.tools.pulse.internal.PulseAppListener.contextDestroyed(PulseAppListener.java:84)
    at org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:843)
    at org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:543)
    at org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:824)
    at org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:353)
    at org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1385)
    at org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1349)
    at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:872)
    at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:269)
    at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:541)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:143)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:161)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:73)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:143)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:161)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:73)
    at org.eclipse.jetty.server.Server.doStop(Server.java:476)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
    at org.apache.geode.management.internal.ManagementAgent.stopHttpService(ManagementAgent.java:328)
    at org.apache.geode.management.internal.ManagementAgent.stopAgent(ManagementAgent.java:156)
    at org.apache.geode.management.internal.SystemManagementService.close(SystemManagementService.java:265)
    at org.apache.geode.management.internal.beans.ManagementAdapter.handleCacheRemoval(ManagementAdapter.java:735)
    at org.apache.geode.management.internal.beans.ManagementListener.handleEvent(ManagementListener.java:117)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.notifyResourceEventListeners(InternalDistributedSystem.java:2146)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.handleResourceEvent(InternalDistributedSystem.java:536)
    at org.apache.geode.internal.cache.GemFireCacheImpl.close(GemFireCacheImpl.java:2149)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:1314)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:964)
    at org.apache.geode.management.internal.beans.MemberMBeanBridge$1.run(MemberMBeanBridge.java:1000)
    at java.lang.Thread.run(Thread.java:745)

[error 2017/03/28 08:56:25.494 IST locator1 <Thread-22> tid=0x4a] Failed to properly release resources held by the HTTP service: !STOPPED
java.lang.IllegalStateException: !STOPPED
    at org.eclipse.jetty.server.handler.HandlerWrapper.destroy(HandlerWrapper.java:134)
    at org.apache.geode.management.internal.ManagementAgent.stopHttpService(ManagementAgent.java:333)
    at org.apache.geode.management.internal.ManagementAgent.stopAgent(ManagementAgent.java:156)
    at org.apache.geode.management.internal.SystemManagementService.close(SystemManagementService.java:265)
    at org.apache.geode.management.internal.beans.ManagementAdapter.handleCacheRemoval(ManagementAdapter.java:735)
    at org.apache.geode.management.internal.beans.ManagementListener.handleEvent(ManagementListener.java:117)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.notifyResourceEventListeners(InternalDistributedSystem.java:2146)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.handleResourceEvent(InternalDistributedSystem.java:536)
    at org.apache.geode.internal.cache.GemFireCacheImpl.close(GemFireCacheImpl.java:2149)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:1314)
    at org.apache.geode.distributed.internal.InternalDistributedSystem.disconnect(InternalDistributedSystem.java:964)
    at org.apache.geode.management.internal.beans.MemberMBeanBridge$1.run(MemberMBeanBridge.java:1000)
    at java.lang.Thread.run(Thread.java:745)


Regards,
Dharam

- Dharam Thacker

On Mon, Mar 27, 2017 at 9:25 PM, Bruce Schuchardt <bschuchardt@pivotal.io> wrote:
A jstack thread dump of the process would show which non-daemon threads are keeping the process alive.


Le 3/25/2017 à 2:25 AM, Dharam Thacker a écrit :
Attached are the locator logs for more reference! We observed this behavior while running system in full fledge mode with all users. I have provided simple steps below to reproduce the same issue. It may happen that pulse is still running in some clients' browser which is I guess should not be an issue.

Regards,
Dharam

- Dharam Thacker

On Sat, Mar 25, 2017 at 2:51 PM, Dharam Thacker <dharamthacker88@gmail.com> wrote:
Hi Team,

Could you help me to verify below steps? We observed that locator process is still running even though you attempt stop it.

OS : Ubntu 16.04 LTS
Java : JDK 8 (1.8.0_121)

I have attached screenshots to reproduce at your end.

Steps:
1. Start locator
2. Start pulse
3. Do some activity in pulse [some clicks -- opening random tabs] [Don't logout]
3. Stop locator
4. Locator is still running in system even after message saying it was stopped


Thanks & Regards,
- Dharam Thacker