DataWorks通过公网连接数据库报以下问题怎么解决?errormessage:[Exception:Communications link failure The last packet successfully received from the server was 13 milliseconds ago. The last packet sent successfully to the server was 13 milliseconds ago.ExtraInfo:Resource Group IP:["172.19.24.23","192.168.207.213(Primary)"],HostName:cn-shanghai.628324810174977.17008194398871, ,detail version info:mysql_all],Root Cause:[Received fatal alert: protocol_version]RequestId:0b9a187617019348980005301e5ae2
离线同步报错:Communications link failure
https://help.aliyun.com/zh/dataworks/support/batch-synchronization?spm=a2c4g.11186623.0.i113
读取报错
问题现象:
读取数据时,报错如下:Communications link failure The last packet successfully received from the server was 7,200,100 milliseconds ago. The last packet sent successfully to the server was 7,200,100 milliseconds ago. - com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
可能原因:
数据库执行SQL查询速度慢,导致MySQL读超时。
解决方法:
排查是否设置了where过滤条件,以确保筛选字段已添加索引。
排查源数据表的数据是否太多。如果数据太多,建议拆分为多个任务。
查询日志找到执行阻塞的SQL,咨询数据库管理员解决。
写入报错
问题现象:
写入数据时,报错如下:Caused by: java.util.concurrent.ExecutionException: ERR-CODE: [TDDL-4614][ERR_EXECUTE_ON_MYSQL] Error occurs when execute on GROUP 'xxx' ATOM 'dockerxxxxx_xxxx_trace_shard_xxxx': Communications link failure The last packet successfully received from the server was 12,672 milliseconds ago. The last packet sent successfully to the server was 12,013 milliseconds ago. More...
可能原因:
慢查询导致SocketTimeout。TDDL默认连接数据的SocketTimeout是12秒,如果一个SQL在MySQL端执行超过12秒仍未返回,会报4614的错误。当数据量较大或服务端繁忙时,会偶尔出现该错误。
解决方法:
建议数据库稳定后,重新运行同步任务。
联系数据库管理员调整该超时时间。
这个问题可能是由于网络不稳定或者数据库连接超时导致的。你可以尝试以下方法来解决这个问题:
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
DataWorks基于MaxCompute/Hologres/EMR/CDP等大数据引擎,为数据仓库/数据湖/湖仓一体等解决方案提供统一的全链路大数据开发治理平台。