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

EMBEDDED模式下,开启tsdb,配置数据库url的地方有并发问题 #4018

Closed
2 tasks
kongzeng opened this issue Jan 13, 2022 · 1 comment
Closed
2 tasks
Assignees
Labels
Milestone

Comments

@kongzeng
Copy link

kongzeng commented Jan 13, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

environment

  • canal 1.1.4
  • mysql version

Issue Description

otter中,同时开启多个canal实例,类CanalInstanceWithManager ,截图部分代码感觉有并发问题,会出现数据库连接url为空的情况
image

If there is an exception, please attach the exception trace:

pid:153 nid:83 exception:canal:test:com.alibaba.otter.canal.parse.exception.CanalParseException: apply failed caused by : Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 10000, active 0, maxActive 30, creating 0
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 10000, active 0, maxActive 30, creating 0
    at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:198)
    at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:271)
    at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.dao.MetaSnapshotDAO.findByTimestamp(MetaSnapshotDAO.java:29)
    at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.buildMemFromSnapshot(DatabaseTableMeta.java:403)
    at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:174)
    at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:137)
    at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:200)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 10000, active 0, maxActive 30, creating 0
    at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java:1508)
    at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:1253)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1233)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1223)
    at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:90)
    at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
    at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:184)
    ... 7 more
Caused by: java.sql.SQLException: connect error, url , driverClass com.mysql.jdbc.Driver
    at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1582)
    at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2466)
@kongzeng kongzeng reopened this Jan 13, 2022
@agapple agapple closed this as completed May 16, 2022
@agapple agapple added the bug label May 16, 2022
@agapple agapple self-assigned this May 16, 2022
@agapple agapple added this to the v1.1.6 milestone May 16, 2022
@qq592304796
Copy link

v1.1.7也会有相同问题

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

No branches or pull requests

3 participants