基础服务平台因为mysql数据库连接不上自动重启,等待mysql重启后,服务会重启成功,但是过一段时间又会自动重启。
日志如下:manager-service日志如下:(其他服务类同)
2020-11-02 07:38:23.224 WARN 7 — [ XNIO-2 task-4] o.s.b.a.jdbc.DataSourceHealthIndicator : DataSource health check failed
org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms.
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:81) ~[spring-jdbc-5.1.8.RELEASE.jar!/:5.1.8.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:323) ~[spring-jdbc-5.1.8.RELEASE.jar!/:5.1.8.RELEASE]
at org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator.getProduct(DataSourceHealthIndicator.java:119) ~[spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator.doDataSourceHealthCheck(DataSourceHealthIndicator.java:107) ~[spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator.doHealthCheck(DataSourceHealthIndicator.java:102) ~[spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:82) ~[spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.health.CompositeHealthIndicator.health(CompositeHealthIndicator.java:95) [spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.health.HealthEndpoint.health(HealthEndpoint.java:50) [spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.health.HealthEndpointWebExtension.health(HealthEndpointWebExtension.java:53) [spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at sun.reflect.GeneratedMethodAccessor168.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_242]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_242]
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) [spring-core-5.1.8.RELEASE.jar!/:5.1.8.RELEASE]
at org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(ReflectiveOperationInvoker.java:76) [spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(AbstractDiscoveredOperation.java:60) [spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$ServletWebOperationAdapter.handle(AbstractWebMvcEndpointHandlerMapping.java:278) [spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(AbstractWebMvcEndpointHandlerMapping.java:334) [spring-boot-actuator-2.1.6.RELEASE.jar!/:2.1.6.RELEASE]
at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_242]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_242]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190) [spring-web-5.1.8.RELEASE.jar!/:5.1.8.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) [spring-web-5.1.8.RELEASE.jar!/:5.1.8.RELEASE]
mysql日志如下:
2020-11-01T23:46:20.026384Z 3441 [Note] Aborted connection 3441 to db: ‘asgard_service’ user: ‘choerodon’ host: ‘192.168.2.14’ (Got an error reading communication packets)
2020-11-01T23:46:20.026614Z 3462 [Note] Aborted connection 3462 to db: ‘notify_service’ user: ‘choerodon’ host: ‘192.168.2.15’ (Got an error reading communication packets)
2020-11-01T23:46:20.026742Z 3444 [Note] Aborted connection 3444 to db: ‘test_manager_service’ user: ‘choerodon’ host: ‘192.168.2.35’ (Got an error reading communication packets)
2020-11-01T23:46:20.026806Z 3464 [Note] Aborted connection 3464 to db: ‘base_service’ user: ‘choerodon’ host: ‘192.168.2.31’ (Got an error reading communication packets)
2020-11-01T23:46:20.026943Z 3511 [Note] Aborted connection 3511 to db: ‘base_service’ user: ‘choerodon’ host: ‘192.168.0.134’ (Got an error reading communication packets)
2020-11-01T23:46:20.027151Z 3516 [Note] Aborted connection 3516 to db: ‘workflow_service’ user: ‘choerodon’ host: ‘192.168.1.58’ (Got an error reading communication packets)
2020-11-01T23:46:20.027236Z 3530 [Note] Aborted connection 3530 to db: ‘workflow_service’ user: ‘choerodon’ host: ‘192.168.1.58’ (Got an error reading communication packets)
2020-11-01T23:46:20.027461Z 3533 [Note] Aborted connection 3533 to db: ‘asgard_service’ user: ‘choerodon’ host: ‘192.168.2.14’ (Got an error reading communication packets)
2020-11-01T23:46:20.027662Z 3517 [Note] Aborted connection 3517 to db: ‘base_service’ user: ‘choerodon’ host: ‘192.168.2.31’ (Got an error reading communication packets)
2020-11-01T23:46:20.027744Z 3535 [Note] Aborted connection 3535 to db: ‘agile_service’ user: ‘choerodon’ host: ‘192.168.1.44’ (Got an error reading communication packets)
2020-11-01T23:46:20.027956Z 3544 [Note] Aborted connection 3544 to db: ‘knowledgebase_service’ user: ‘choerodon’ host: ‘192.168.1.52’ (Got an error reading communication packets)
2020-11-01T23:46:20.028179Z 3542 [Note] Aborted connection 3542 to db: ‘base_service’ user: ‘choerodon’ host: ‘192.168.3.74’ (Got an error reading communication packets)
2020-11-01T23:46:20.028351Z 3538 [Note] Aborted connection 3538 to db: ‘devops_service’ user: ‘choerodon’ host: ‘192.168.2.36’ (Got an error reading communication packets)
2020-11-01T23:46:20.028593Z 3468 [Note] Aborted connection 3468 to db: ‘test_manager_service’ user: ‘choerodon’ host: ‘192.168.2.35’ (Got an error reading communication packets)
2020-11-01T23:46:20.028635Z 3548 [Note] Aborted connection 3548 to db: ‘notify_service’ user: ‘choerodon’ host: ‘192.168.2.15’ (Got an error reading communication packets)
2020-11-01T23:46:20.028899Z 3553 [Note] Aborted connection 3553 to db: ‘manager_service’ user: ‘choerodon’ host: ‘192.168.2.11’ (Got an error reading communication packets)
2020-11-01T23:46:20.029184Z 3547 [Note] Aborted connection 3547 to db: ‘base_service’ user: ‘choerodon’ host: ‘192.168.2.31’ (Got an error reading communication packets)
2020-11-01T23:46:20.029372Z 3564 [Note] Aborted connection 3564 to db: ‘manager_service’ user: ‘choerodon’ host: ‘192.168.2.11’ (Got an error reading communication packets)
2020-11-01T23:46:20.029668Z 3554 [Note] Aborted connection 3554 to db: ‘base_service’ user: ‘choerodon’ host: ‘192.168.0.134’ (Got an error reading communication packets)
2020-11-01T23:46:20.029932Z 3370 [Note] Aborted connection 3370 to db: ‘base_service’ user: ‘choerodon’ host: ‘192.168.0.134’ (Got an error reading communication packets)
2020-11-01T23:46:20.030138Z 3385 [Note] Aborted connection 3385 to db: ‘workflow_service’ user: ‘choerodon’ host: ‘192.168.1.58’ (Got an error reading communication packets)
2020-11-01T23:46:20.030255Z 3373 [Note] Aborted connection 3373 to db: ‘test_manager_service’ user: ‘choerodon’ host: ‘192.168.2.35’ (Got an error reading communication packets)
2020-11-01T23:46:20.030469Z 3351 [Note] Aborted connection 3351 to db: ‘workflow_service’ user: ‘choerodon’ host: ‘192.168.1.58’ (Got an error reading communication packets)
2020-11-01T23:46:20.215889Z 2943 [Note] Aborted connection 2943 to db: ‘devops_service’ user: ‘choerodon’ host: ‘192.168.2.36’ (Got an error reading communication packets)
2020-11-01T23:46:20.416099Z 0 [Note] InnoDB: page_cleaner: 1000ms intended loop took 938478ms. The settings might not be optimal. (flushed=4 and evicted=0, during the time.)
2020-11-01T23:46:36.956603Z 3589 [Warning] InnoDB: Retry attempts for reading partial data failed.
2020-11-01T23:46:36.956639Z 3589 [ERROR] InnoDB: Tried to read 16384 bytes at offset 49152, but was only able to read 0
2020-11-01T23:46:36.956648Z 3589 [ERROR] InnoDB: Operating system error number 5 in a file operation.
2020-11-01T23:46:36.956664Z 3589 [ERROR] InnoDB: Error number 5 means ‘Input/output error’
2020-11-01T23:46:36.956668Z 3589 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2020-11-01T23:46:36.956673Z 3589 [ERROR] InnoDB: File (unknown): ‘read’ returned OS error 105. Cannot continue operation
2020-11-01T23:46:36.956677Z 3589 [ERROR] InnoDB: Cannot continue operation.
2020-11-01T23:46:39.198976Z 3633 [Warning] InnoDB: Retry attempts for reading partial data failed.
2020-11-01T23:46:39.199000Z 3633 [ERROR] InnoDB: Tried to read 16384 bytes at offset 65536, but was only able to read 0
2020-11-01T23:46:39.199005Z 3633 [ERROR] InnoDB: Operating system error number 5 in a file operation.
2020-11-01T23:46:39.199010Z 3633 [ERROR] InnoDB: Error number 5 means ‘Input/output error’
2020-11-01T23:46:39.199014Z 3633 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2020-11-01T23:46:39.199019Z 3633 [ERROR] InnoDB: File (unknown): ‘read’ returned OS error 105. Cannot continue operation
2020-11-01T23:46:39.199023Z 3633 [ERROR] InnoDB: Cannot continue operation.
2020-11-01T23:46:39.949205Z 0 [Note] InnoDB: FTS optimize thread exiting.
2020-11-01T23:47:16.096242Z 3669 [Warning] InnoDB: Retry attempts for reading partial data failed.
2020-11-01T23:47:16.096287Z 3669 [ERROR] InnoDB: Tried to read 16384 bytes at offset 8257536, but was only able to read 0
2020-11-01T23:47:16.096295Z 3669 [ERROR] InnoDB: Operating system error number 5 in a file operation.
2020-11-01T23:47:16.096301Z 3669 [ERROR] InnoDB: Error number 5 means ‘Input/output error’
2020-11-01T23:47:16.096305Z 3669 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2020-11-01T23:47:16.096313Z 3669 [ERROR] InnoDB: File (unknown): ‘read’ returned OS error 105. Cannot continue operation
2020-11-01T23:47:16.096327Z 3669 [ERROR] InnoDB: Cannot continue operation.