1.4K Star 7.4K Fork 4.1K

JEECG开源社区 / jeecg-boot

 / 详情

com.alibaba.druid.pool.DruidDataSource:2781 - create connection SQLException

Declined
Opened this issue  
2021-04-30 18:18
版本号:

2.4.3

问题描述:

我拉取的是最新的代码
使用docker-compose 启动后端程序时,jeecg-boot启动报错:
jeecg-boot-system | 2021-04-30 17:44:04.944 [Druid-ConnectionPool-Create-1453606810] ERROR com.alibaba.druid.pool.DruidDataSource:2781 - create connection SQLException, url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai, errorCode 0, state 08S01

问题截图:

jeecg-boot-system | 2021-04-30 17:44:07.657 [Druid-ConnectionPool-Create-1049590050] ERROR com.alibaba.druid.pool.DruidDataSource:2781 - create connection SQLException, url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai, errorCode 0, state 08S01
jeecg-boot-system | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
jeecg-boot-system |
jeecg-boot-system | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
jeecg-boot-system | at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
jeecg-boot-system | at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
jeecg-boot-system | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
jeecg-boot-system | at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:456)
jeecg-boot-system | at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
jeecg-boot-system | at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
jeecg-boot-system | at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:156)
jeecg-boot-system | at com.alibaba.druid.filter.FilterAdapter.connection_connect(FilterAdapter.java:787)
jeecg-boot-system | at com.alibaba.druid.filter.FilterEventAdapter.connection_connect(FilterEventAdapter.java:38)
jeecg-boot-system | at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
jeecg-boot-system | at com.alibaba.druid.filter.FilterAdapter.connection_connect(FilterAdapter.java:787)
jeecg-boot-system | at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
jeecg-boot-system | at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:218)
jeecg-boot-system | at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
jeecg-boot-system | at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1646)
jeecg-boot-system | at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1710)
jeecg-boot-system | at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2779)
jeecg-boot-system | Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure
jeecg-boot-system |
jeecg-boot-system | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
jeecg-boot-system | at sun.reflect.GeneratedConstructorAccessor27.newInstance(Unknown Source)
jeecg-boot-system | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
jeecg-boot-system | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
jeecg-boot-system | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
jeecg-boot-system | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
jeecg-boot-system | at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
jeecg-boot-system | at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167)
jeecg-boot-system | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:89)
jeecg-boot-system | at com.mysql.cj.NativeSession.connect(NativeSession.java:144)
jeecg-boot-system | at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:956)
jeecg-boot-system | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:826)
jeecg-boot-system | ... 14 common frames omitted
jeecg-boot-system | Caused by: java.net.ConnectException: Connection refused (Connection refused)
jeecg-boot-system | at java.net.PlainSocketImpl.socketConnect(Native Method)
jeecg-boot-system | at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
jeecg-boot-system | at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
jeecg-boot-system | at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
jeecg-boot-system | at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
jeecg-boot-system | at java.net.Socket.connect(Socket.java:589)
jeecg-boot-system | at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155)
jeecg-boot-system | at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:63)
jeecg-boot-system | ... 17 common frames omitted
jeecg-boot-system | 2021-04-30 17:44:07.660 [main] ERROR com.alibaba.druid.pool.DruidDataSource:969 - {dataSource-133} init error
jeecg-boot-system | com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
jeecg-boot-system |
jeecg-boot-system | The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
jeecg-boot-system | at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:174)
jeecg-boot-system | at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:64)
jeecg-boot-system | at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:836)
jeecg-boot-system | at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:456)
jeecg-boot-system | at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:246)
jeecg-boot-system | at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
jeecg-boot-system | at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:156)
jeecg-boot-system | at com.alibaba.druid.filter.FilterAdapter.connection_connect(FilterAdapter.java:787)
jeecg-boot-system | at com.alibaba.druid.filter.FilterEventAdapter.connection_connect(FilterEventAdapter.java:38)
jeecg-boot-system | at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
jeecg-boot-system | at com.alibaba.druid.filter.FilterAdapter.connection_connect(FilterAdapter.java:787)
jeecg-boot-system | at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
jeecg-boot-system | at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:218)
jeecg-boot-system | at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:150)
jeecg-boot-system | at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1646)
jeecg-boot-system | at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1710)
jeecg-boot-system | at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:923)
jeecg-boot-system | at com.baomidou.dynamic.datasource.creator.DruidDataSourceCreator.createDataSource(DruidDataSourceCreator.java:158)
jeecg-boot-system | at com.baomidou.dynamic.datasource.creator.DataSourceCreator.createDruidDataSource(DataSourceCreator.java:174)
jeecg-boot-system | at com.baomidou.dynamic.datasource.creator.DataSourceCreator.createDataSource(DataSourceCreator.java:92)
jeecg-boot-system | at com.baomidou.dynamic.datasource.provider.AbstractDataSourceProvider.createDataSourceMap(AbstractDataSourceProvider.java:45)
jeecg-boot-system | at com.baomidou.dynamic.datasource.provider.YmlDynamicDataSourceProvider.loadDataSources(YmlDynamicDataSourceProvider.java:43)
jeecg-boot-system | at com.baomidou.dynamic.datasource.DynamicRoutingDataSource.afterPropertiesSet(DynamicRoutingDataSource.java:229)

友情提示: 未按格式要求发帖,会直接删掉。

Comments (0)

胡大海 created任务
胡大海 set related repository to JEECG开源社区/jeecg-boot
JEECG开源社区 changed issue state from 待办的 to 已拒绝
展开全部操作日志

Sign in to comment

状态
Assignees
Milestones
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(1)
Java
1
https://gitee.com/jeecg/jeecg-boot.git
git@gitee.com:jeecg/jeecg-boot.git
jeecg
jeecg-boot
jeecg-boot

Search