2014년 12월 13일 토요일

Re: Unable to register MBean org.mongodb.driver

i just check the jdk installed on Centos:
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (rhel-5.1.13.3.el6_5-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

i am not sure OpenJDK is the problem.




Looks like you are hitting https://jira.mongodb.org/browse/JAVA-1122, which has been fixed in the 3.0.x branch.  

janwen lou wrote:
i just check the jdk installed on Centos:
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (rhel-5.1.13.3.el6_5-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)

i am not sure OpenJDK is the problem.

 janwen lou wrote:
From mongodb jira,get this issue:
but it seems that did not fix the issue?

 janwen lou wrote:

My deploy environment:tomcat6+centos+java driver 2.12.1
there are 2 war files under tomcat/webapps,and two application connect mongodb,but on tomcat7 it's fine.google a lot,but not get some useful results,any idea? thanks
when i start tomcat,get errors from log:

Oct 30, 2014 10:30:19 PM com.mongodb.util.management.jmx.JMXMBeanServer unregisterMBean
WARNING: Unable to register MBean org.mongodb.driver:type=ConnectionPool,clusterId=1,host=192.168.99.110,port=27017
javax.management.InstanceNotFoundException: org.mongodb.driver:type=ConnectionPool,clusterId=1,host=192.168.99.110,port=27017
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)
at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546)
at com.mongodb.util.management.jmx.JMXMBeanServer.unregisterMBean(JMXMBeanServer.java:52)
at com.mongodb.JMXConnectionPoolListener.connectionPoolClosed(JMXConnectionPoolListener.java:68)
at com.mongodb.PooledConnectionProvider.close(PooledConnectionProvider.java:107)
at com.mongodb.DefaultServer.close(DefaultServer.java:99)
at com.mongodb.SingleServerCluster.close(SingleServerCluster.java:90)
at com.mongodb.DBTCPConnector.close(DBTCPConnector.java:603)
at com.mongodb.Mongo.close(Mongo.java:507)
at org.springframework.data.mongodb.core.MongoFactoryBean.destroy(MongoFactoryBean.java:190)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:238)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:740)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:521)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:740)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1090)
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1064)
at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:559)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4249)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4890)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1319)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1290)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:323)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
at org.apache.catalina.core.StandardService.stop(StandardService.java:584)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:643)
at org.apache.catalina.startup.Catalina.start(Catalina.java:618)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)



i did not use cluster,just one mongod instance.



In this usage "cluster" just refers to a MongoClient instance.  It could be a standalone, replica set, or sharded cluster.



but i can not see the same issue on my QA server,just get the issue at out customer server,I guess the tomcat,jdk version(customer using centos integrate tomcat & open jdk),but just guess,not sure.
It seems that the issue happend when stop tomcat service.
i will follow up the issue,and share more details here.


댓글 없음:

댓글 쓰기