1 详细异常信息

ERROR yarn.ApplicationMaster: User class threw exception: java.sql.SQLException: Communications link failure
The last packet successfully received from the server was 18,973 milliseconds ago. The last packet sent successfully to the server was 3 milliseconds ago. Query: select user_register_analyse_id as userRegisterAnalyseId,day_time as dayTime,city_code as cityCode,city,city_province as cityProvince,province,total_user_register_count as totalUserRegisterCount,day_user_register_count as dayUserRegisterCount,first_order_user_count as firstOrderUserCount,day_user_register_ordered_conversion_rate as dayUserRegisterOrderedConversionRate from t_user_register_analyse where day_time = ? and city_code = ? limit 1 Parameters: [2019-09-01 00:00:00, 130900]
java.sql.SQLException: Communications link failure

  

2 检查一下自己的msyql连接是否关闭

解决方案:

  第一步,先设置下mysql连接的过期时间,让mysql会自动释放连接

    set  global wait_timeout=30

    set  global interactive_timeout=30

    或者 修改my.cnf 重启mysql

    [mysqld]
    wait_timeout=30
    interactive_timeout=30

  第二步,代码中手动关闭连接,根据自己用的代码api,自己检查下,是否把执行完sql后,关闭资源或者将连接还给线程池。

异常-ERROR yarn.ApplicationMaster: User class threw exception: java.sql.SQLException: Communications link failure的更多相关文章

  1. 【异常】ser class threw exception: java.sql.SQLException: The last packet successfully received from the server was 39,444 milliseconds ago. The last

    1 详细异常 ser class threw exception: java.sql.SQLException: The last packet successfully received from ...

  2. org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent succ

    数据库 没有开启  连接失败 org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause ...

  3. 异常解决:Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    异常描述 这个异常通常有如下信息: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failu ...

  4. 使用mysql-connector-java.jar连接MySql时出现:Error while retrieving metadata for procedure columns: java.sql.SQLException: Parameter/Column name pattern can not be NULL or empty.

    错误如下: 程序实现的功能是调用一个存储过程,但是不认这个存储过程的参数. 原因是版本太高了,由于使用的是6.0.6版本的,改成5.1.38即可. POM配置如下: <!-- mysql-con ...

  5. 【异常】update更新java.sql.SQLException: Duplicate entry '2019-07-30 00:00:00-110100' for key

    1 详细异常信息 User class threw exception: java.sql.SQLException: Duplicate entry '2019-07-30 00:00:00-110 ...

  6. java.sql.SQLException: Io 异常: Got minus one from a read call

    博客分类: Oracle   Tomcat服务器下的应用连接Oracle时报错,出现以下异常: java.sql.SQLException: Io 异常: Got minus one from a r ...

  7. mybatis 执行查询时报错 【Error querying database. Cause: java.sql.SQLException: Error setting driver on UnpooledDataSource. Cause: java.lang.ClassNotFoundException: Cannot find class: 】

    org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.sql.SQLE ...

  8. org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents mor

    今天在用junit测试mybits程序是遇到一个问题,报错为: org.apache.ibatis.exceptions.PersistenceException: ### Error queryin ...

  9. 初学MyBatis(踩坑)Error querying database. Cause: java.sql.SQLException: java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.lang.Long

    最近在学习Mybatis,代码全部根据教程写好了,一运行结果报了一个错误,主要错误内容: Caused by: org.apache.ibatis.exceptions.PersistenceExce ...

随机推荐

  1. iOS-浅谈iOS中三种生成随机数方法

    ios 有如下三种随机数方法:

  2. springboot-mybatis-pagehelper(分页插件)

    依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://m ...

  3. LVS负载均衡在Ubuntu环境下部署详解

    一.本地环境介绍: 负载均衡的三台机器均为Ubuntu Server 14.04 64位系统,内核中已集成ipvs模块( modprobe -l | grep ipvs 查看 ).为演示LVS负载均衡 ...

  4. Flutter JSON解析与复杂模型转换技巧及实例

    其实转换成model类是有好处的,转换后可以减少上线后APP崩溃和出现异常,所以我们从这节课开始,要制作model类模型,然后用model的形式编辑UI界面. 类别json的分析 比如现在从后台得到了 ...

  5. 是什么在阻止我们学习unity2019?

    背景 时过境迁,这是一篇老文,写于2019年5月. 在学习最新的unity ecs过程中,以及学习最新的effect 时,在迈出第一步的时候即遭遇一些困难(学习和测试环境搭建不起来,有时候真的很无语) ...

  6. 向量空间模型(Vector Space Model)

    搜索结果排序是搜索引擎最核心的构成部分,很大程度上决定了搜索引擎的质量好坏.虽然搜索引擎在实际结果排序时考虑了上百个相关因子,但最重要的因素还是用户查询与网页内容的相关性.(ps:百度最臭名朝著的“竞 ...

  7. JavaScript中的Truthy和Falsy

    JavaScript中存在Truthy值和Falsy值的概念 — 除了boolean值true.false外,所有类型的JavaScript值均可用于逻辑判断,其规则如下: 1.所有的Falsy值,当 ...

  8. [转帖]hive与hbase的联系与区别:

    https://www.cnblogs.com/xubiao/p/5571176.html 原作者写的很好.. 这里面简单学习总结一下.. 都是bigdata的工具, 都是基于google的bigta ...

  9. Markdown 空格详细介绍

      它叫不换行空格,全称No-Break Space,它是最常见和我们使用最多的空格,大多数的人可能只接触了 ,它是按下space键产生的空格.在HTML中,如果你用空格键产生此空格,空格是不会累加的 ...

  10. python学习-45 模块

    模块 -----模块包括三种: ····python标准库 ····第三方模块 ····应用程序自定义模块 -------应用程序自定义模块 1.建立两个py文件,一个是定义函数用的cal.py de ...