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

Connections could not be acquired from the underlying database! #2352

Open
Gene1994 opened this issue Nov 1, 2024 · 1 comment
Open

Connections could not be acquired from the underlying database! #2352

Gene1994 opened this issue Nov 1, 2024 · 1 comment

Comments

@Gene1994
Copy link

Gene1994 commented Nov 1, 2024

报错信息:realm = plexus.core
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
Number of foreign imports: 0
(中间省略)
Caused by: org.unidal.dal.jdbc.datasource.DataSourceException: Error when connecting to JDBC data source(cat) with properties (driver=com.mysql.jdbc.Driver, url=
jdbc:mysql://10.0.4.6:3306/cat
?
useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&socketTimeout=120000
, user=root). Error message=java.sql.SQLException: Connections could not be acquired from the underlying database!
at org.unidal.dal.jdbc.datasource.JdbcDataSource.initialize(JdbcDataSource.java:99)

image

环境:腾讯云 CentOS 7.6; mysql5.7.44 ;tomcat8.5;
github下载的3.0.1war包部署启动
datasource.xml配置如图
哪位大佬能帮这个问题咋解。。?我把mysql降级到5.6版本还是报这个错。。

@Gene1994
Copy link
Author

Gene1994 commented Nov 1, 2024

realm = plexus.core
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
Number of foreign imports: 0

at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:373)
at org.codehaus.plexus.DefaultComponentRegistry.lookup(DefaultComponentRegistry.java:178)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:393)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder$RequirementRecipe.internalCreate(XBeanComponentBuilder.java:404)
... 118 more

Caused by: org.codehaus.plexus.component.repository.exception.ComponentLifecycleException: Error constructing component role: 'com.dianping.cat.analysis.MessageConsumer', implementation: 'com.dianping.cat.analysis.RealtimeConsumer', role hint: 'default'
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.createComponentInstance(XBeanComponentBuilder.java:178)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.build(XBeanComponentBuilder.java:125)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:181)
at org.codehaus.plexus.component.manager.SingletonComponentManager.getComponent(SingletonComponentManager.java:67)
at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:358)
... 121 more
Caused by: org.apache.xbean.recipe.ConstructionException: Unable to convert property value from Requirement[fieldName=null, role=com.dianping.cat.analysis.MessageAnalyzerManager] to com.dianping.cat.analysis.MessageAnalyzerManager for injection private com.dianping.cat.analysis.MessageAnalyzerManager com.dianping.cat.analysis.RealtimeConsumer.m_analyzerManager
at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:530)
at org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:385)
at org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:300)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.createComponentInstance(XBeanComponentBuilder.java:161)
... 125 more
Caused by: org.unidal.lookup.LookupException: Unable to lookup component map(com.dianping.cat.analysis.MessageAnalyzer).
at org.unidal.lookup.ContainerHolder.lookupMap(ContainerHolder.java:86)
at com.dianping.cat.analysis.DefaultMessageAnalyzerManager.initialize(DefaultMessageAnalyzerManager.java:122)
at org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase.execute(InitializePhase.java:33)
at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:96)
at org.codehaus.plexus.component.manager.AbstractComponentManager.start(AbstractComponentManager.java:167)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.startComponentLifecycle(XBeanComponentBuilder.java:285)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.build(XBeanComponentBuilder.java:131)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:181)
at org.codehaus.plexus.component.manager.SingletonComponentManager.getComponent(SingletonComponentManager.java:67)
at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:358)
at org.codehaus.plexus.DefaultComponentRegistry.lookup(DefaultComponentRegistry.java:178)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:393)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder$RequirementRecipe.internalCreate(XBeanComponentBuilder.java:404)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
at org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java:167)
at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:517)
... 131 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'com.dianping.cat.analysis.MessageAnalyzer', it could not be started.
role: com.dianping.cat.analysis.MessageAnalyzer
roleHint: state
classRealm: plexus.core

realm = plexus.core
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
Number of foreign imports: 0


at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:373)
at org.codehaus.plexus.DefaultComponentRegistry.lookupMap(DefaultComponentRegistry.java:211)
at org.codehaus.plexus.DefaultPlexusContainer.lookupMap(DefaultPlexusContainer.java:434)
at org.unidal.lookup.ContainerHolder.lookupMap(ContainerHolder.java:82)
... 146 more

Caused by: org.codehaus.plexus.component.repository.exception.ComponentLifecycleException: Error constructing component role: 'com.dianping.cat.analysis.MessageAnalyzer', implementation: 'com.dianping.cat.consumer.state.StateAnalyzer', role hint: 'state'
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.createComponentInstance(XBeanComponentBuilder.java:178)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.build(XBeanComponentBuilder.java:125)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:181)
at org.codehaus.plexus.component.manager.PerLookupComponentManager.getComponent(PerLookupComponentManager.java:51)
at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:358)
... 149 more
Caused by: org.apache.xbean.recipe.ConstructionException: Unable to convert property value from Requirement[fieldName=null, role=com.dianping.cat.service.ProjectService] to com.dianping.cat.service.ProjectService for injection private com.dianping.cat.service.ProjectService com.dianping.cat.consumer.state.StateAnalyzer.m_projectService
at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:530)
at org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:385)
at org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:300)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.createComponentInstance(XBeanComponentBuilder.java:161)
... 153 more
Caused by: org.unidal.dal.jdbc.datasource.DataSourceException: Error when connecting to JDBC data source(cat) with properties (driver=com.mysql.jdbc.Driver, url=
jdbc:mysql://127.0.0.1:3306/cat
?
useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&socketTimeout=120000
, user=root). Error message=java.sql.SQLException: Connections could not be acquired from the underlying database!
at org.unidal.dal.jdbc.datasource.JdbcDataSource.initialize(JdbcDataSource.java:99)
at org.unidal.dal.jdbc.datasource.DefaultDataSourceManager.getDataSource(DefaultDataSourceManager.java:36)
at org.unidal.dal.jdbc.transaction.DefaultTransactionManager.getConnection(DefaultTransactionManager.java:97)
at org.unidal.dal.jdbc.query.msyql.MysqlReadHandler.executeQuery(MysqlReadHandler.java:40)
at org.unidal.dal.jdbc.query.DefaultQueryExecutor.executeQuery(DefaultQueryExecutor.java:21)
at org.unidal.dal.jdbc.engine.DefaultQueryEngine.queryMultiple(DefaultQueryEngine.java:104)
at com.dianping.cat.core.dal.ProjectDao.findAll(ProjectDao.java:25)
at com.dianping.cat.service.ProjectService.refresh(ProjectService.java:202)
at com.dianping.cat.service.ProjectService.initialize(ProjectService.java:161)
at org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializePhase.execute(InitializePhase.java:33)
at org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:96)
at org.codehaus.plexus.component.manager.AbstractComponentManager.start(AbstractComponentManager.java:167)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.startComponentLifecycle(XBeanComponentBuilder.java:285)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder.build(XBeanComponentBuilder.java:131)
at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:181)
at org.codehaus.plexus.component.manager.SingletonComponentManager.getComponent(SingletonComponentManager.java:67)
at org.codehaus.plexus.DefaultComponentRegistry.getComponent(DefaultComponentRegistry.java:358)
at org.codehaus.plexus.DefaultComponentRegistry.lookup(DefaultComponentRegistry.java:178)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:393)
at org.codehaus.plexus.component.builder.XBeanComponentBuilder$RequirementRecipe.internalCreate(XBeanComponentBuilder.java:404)
at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
at org.apache.xbean.recipe.RecipeHelper.convert(RecipeHelper.java:167)
at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:517)
... 159 more
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
at org.unidal.dal.jdbc.datasource.JdbcDataSource.initialize(JdbcDataSource.java:94)
... 181 more
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1469)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)
... 183 more
[11-01 13:58:32.171] [WARN] [DefaultClientConfigManager] error when connect cat server config url http://124.222.200.193:8080/cat/s/router?domain=cat&ip=10.0.4.6&op=json
[11-01 13:58:32.172] [INFO] [ChannelManager] start connect server/124.222.200.193:2280
[11-01 13:58:32.176] [ERROR] [ChannelManager] Error when try connecting to /124.222.200.193:2280

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

1 participant