Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring boot中使用FdfsConnectionPool报错 #8

Closed
liuhui168168 opened this issue Nov 4, 2016 · 8 comments
Closed

spring boot中使用FdfsConnectionPool报错 #8

liuhui168168 opened this issue Nov 4, 2016 · 8 comments

Comments

@liuhui168168
Copy link

liuhui168168 commented Nov 4, 2016

在spring boot 1.4中,内嵌tomcat,项目启动时报错,错误信息如下:WARN o.a.c.loader.WebappClassLoaderBase -The web application [api#v1] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
2016-11-04 11:26:59.373 [main] INFO o.s.b.a.l.AutoConfigurationReportLoggingInitializer -

Error starting ApplicationContext. To display the auto-configuration report enable debug logging (start with --debug)

2016-11-04 11:26:59.389 [main] ERROR o.s.boot.SpringApplication -Application startup failed
org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.github.tobato.fastdfs.conn.FdfsConnectionPool@574413bd] with key 'tobaotoFdfsConnectionPool'; nested exception is javax.management.InstanceAlreadyExistsException: MXBean already registered with name org.apache.commons.pool2:type=GenericKeyedObjectPool,name=pool

@liuhui168168 liuhui168168 changed the title spring boot中使用FdfsConnectionPool注册bean名冲突 spring boot中使用FdfsConnectionPool报错 Nov 4, 2016
@liuhui168168 liuhui168168 reopened this Nov 4, 2016
@tobato
Copy link
Owner

tobato commented Nov 7, 2016

如果不用jmx设置参数
spring.jmx.enabled=false

@njkfei
Copy link

njkfei commented Nov 11, 2016

我也遇到了这样的情况。
如果不用jmx设置参数
spring.jmx.enabled=false
后不再报这个错误。
赞。

@liushunshun
Copy link

liushunshun commented Dec 15, 2016

我也遇到了,好像是和redis连接池jmx名字冲突了

@crazyweeds
Copy link

同样遇到,加入spring.jmx.enabled=false后搞定,感谢。

@yjhkhnuje
Copy link

我也遇到了这个,但是果禁用jmx,会不会对监控造成影响?

tobato added a commit that referenced this issue Jun 14, 2017
fix jmx already registered with name.
add doc to project

Closes #18,#8
@tobato tobato closed this as completed in b105db9 Jun 14, 2017
@zhubc1993
Copy link

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2021-03-05 10:39:22.513 [main] ERROR org.springframework.boot.SpringApplication - Application startup failed
org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [com.github.tobato.fastdfs.conn.FdfsConnectionPool@550b7a92] with key 'fdfsConnectionPool'; nested exception is javax.management.InstanceAlreadyExistsException: MXBean already registered with name org.apache.commons.pool2:type=GenericKeyedObjectPool,name=pool

配置了下面三个配置都不行,大佬求救啊
spring.jmx.enabled=false
spring.datasource.jmx-enabled=false
spring.datasource.tomcat.jmx-enabled=false

@tobato
Copy link
Owner

tobato commented Mar 5, 2021

image

@zhubc1993
Copy link

特别感谢,问题解决了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants