{"action":"created","issue":{"url":"https://api.github.com/repos/Netflix/eureka/issues/638","labels_url":"https://api.github.com/repos/Netflix/eureka/issues/638/labels{/name}","comments_url":"https://api.github.com/repos/Netflix/eureka/issues/638/comments","events_url":"https://api.github.com/repos/Netflix/eureka/issues/638/events","html_url":"https://github.com/Netflix/eureka/issues/638","id":106442061,"number":638,"title":"EurekaMonitors fail to unregister servo monitors from JmxMonitorRegistry","user":{"login":"brenuart","id":3028601,"avatar_url":"https://avatars.githubusercontent.com/u/3028601?v=3","gravatar_id":"","url":"https://api.github.com/users/brenuart","html_url":"https://github.com/brenuart","followers_url":"https://api.github.com/users/brenuart/followers","following_url":"https://api.github.com/users/brenuart/following{/other_user}","gists_url":"https://api.github.com/users/brenuart/gists{/gist_id}","starred_url":"https://api.github.com/users/brenuart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brenuart/subscriptions","organizations_url":"https://api.github.com/users/brenuart/orgs","repos_url":"https://api.github.com/users/brenuart/repos","events_url":"https://api.github.com/users/brenuart/events{/privacy}","received_events_url":"https://api.github.com/users/brenuart/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-14T22:36:58Z","updated_at":"2015-09-14T22:40:06Z","closed_at":null,"body":"`EurekaMonitors.shutdown()` fails to properly unregister servo monitors from `JmxMonitorRegistry`. The following exception is thrown:\r\n````\r\n2015-09-14 20:28:59,904  WARN 44684 [       Thread-2]  --- com.netflix.servo.jmx.JmxMonitorRegistry           : Unable to un-register Monitor:MonitorConfig{name=RATE_LIMITED_FULL_FETCH_CANDIDATES, tags=class=EurekaMonitors, policy=DefaultPublishingPolicy}\r\n\r\njavax.management.InstanceNotFoundException: com.netflix.servo:name=count,class=EurekaMonitors,id=RATE_LIMITED_FULL_FETCH_CANDIDATES,level=INFO,type=COUNTER\r\n\tat com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)\r\n\tat com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)\r\n\tat com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)\r\n\tat com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546)\r\n\tat com.netflix.servo.jmx.JmxMonitorRegistry.unregister(JmxMonitorRegistry.java:125)\r\n\tat com.netflix.servo.DefaultMonitorRegistry.unregister(DefaultMonitorRegistry.java:143)\r\n\tat com.netflix.eureka.util.EurekaMonitors.shutdown(EurekaMonitors.java:184)\r\n````\r\n\r\nThe `EurekaMonitors` class holds an enum for every monitor used by the Eureka sub-system. Problem is:\r\n- registration is done with `enum.getName()` as name\r\n- unregister is done with `enum.name()` as name (_not the same_)\r\n"},"comment":{"url":"https://api.github.com/repos/Netflix/eureka/issues/comments/140225696","html_url":"https://github.com/Netflix/eureka/issues/638#issuecomment-140225696","issue_url":"https://api.github.com/repos/Netflix/eureka/issues/638","id":140225696,"user":{"login":"brenuart","id":3028601,"avatar_url":"https://avatars.githubusercontent.com/u/3028601?v=3","gravatar_id":"","url":"https://api.github.com/users/brenuart","html_url":"https://github.com/brenuart","followers_url":"https://api.github.com/users/brenuart/followers","following_url":"https://api.github.com/users/brenuart/following{/other_user}","gists_url":"https://api.github.com/users/brenuart/gists{/gist_id}","starred_url":"https://api.github.com/users/brenuart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brenuart/subscriptions","organizations_url":"https://api.github.com/users/brenuart/orgs","repos_url":"https://api.github.com/users/brenuart/repos","events_url":"https://api.github.com/users/brenuart/events{/privacy}","received_events_url":"https://api.github.com/users/brenuart/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T22:40:06Z","updated_at":"2015-09-14T22:40:06Z","body":"want a PR?"}}