Underlying cause: com.mysql.cj.jdbc.exceptions.CommunicationsException : Communications link failure
Hive试图schematool -dbType mysql -initSchema时候报错如下:
Metastore connection URL: jdbc:mysql://Desktop:3306/hive?characterEncoding=utf8&useSSL=false
Metastore Connection Driver : com.mysql.cj.jdbc.Driver
Metastore connection User: appleyuchi
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
Underlying cause: com.mysql.cj.jdbc.exceptions.CommunicationsException : Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
SQL Error code: 0
Use --verbose for detailed stacktrace.
*** schemaTool failed ***
(Python3.6) appleyuchi@Desktop:~$ netstat -an|grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp6 0 0 :::33060 :::*
问题就出在当前节点外界不可访问,根据[1]处理之后
(Python3.6) appleyuchi@Desktop:~$ netstat -an|grep 3306
tcp6 0 0 :::3306 :::* LISTEN
tcp6 0 0 :::33060 :::* LISTEN
再次初始化hive数据库:
schematool -dbType mysql -initSchema
成功
问题的原因是:
hive-site.xml中的Desktop:3306不可访问,所以要把mysql设置成远程可以访问的。
Reference:
[1]mysql8设置局域网访问
Underlying cause: com.mysql.cj.jdbc.exceptions.CommunicationsException : Communications link failure相关推荐
- mac之idea连接MySQL数据库报com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
项目场景: 最近入手了一台MacBookPro(谨慎尝试,用惯了windos后使用感具别扭,需要大量时间来适应),下载了最新的idea和最新的mysql8.0.23,然后开始了漫长而艰辛的开始,各种没 ...
- com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure 数据库jdbc连接异常,数据库连接异 ...
- 【Linux 报错】com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The las
报错信息如下: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failureThe last pa ...
- 连接数据库报错com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure的解决方法
控制台报错 Caused by: com.mysql.cj.exceptions.CJCommunicationsException: Communications link failure com. ...
- Druid 连接池 报错 com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
场景赘述 早晨查看项目前一天的实际运行日志,发现了 一个Springboot项目中的druid 连接池和 mysql 产生了异常信息,重连暂并未对系统产生影响 下面是具体报错信息: com.mysql ...
- 解决:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure(真实有效)
数据库连接失败 在数据库连接失败,经常会有蛮多一系列的问题导致的原因,这个时候一定要多去尝试一下各种方法,并且做好自己的梳理! 一.例如我在SpringBoot项目中使用了阿里的数据库连接池Driud ...
- 数据库连接失败报错com.mysql.cj.jdbc.exceptions.CommunicationsException
1.问题: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last pac ...
- Failed to obtain JDBC Connection; nested exception is com.mysql.cj.jdbc.exceptions.CommunicationsEx
我的是再宿主机连接虚拟机的时候报的这个错 The last packet sent successfully to the server was 0 milliseconds ago. The dri ...
- CommunicationsException: Communications link failure; 项目启动遇到数据库报错
1. 问题 今天启动项目突然报此错误 2. 原因之一 MySQL服务没有启动 3. 解决办法 启动MySQL服务,本地的启动方法(查看方法),打开任务管理器(ctrl+shift+esc),选择顶部的 ...
最新文章
- 矩阵奇异值分解简介及C++/OpenCV/Eigen的三种实现
- linux基础(6)-shell编程
- Golang和Ethereum中的big.Int
- 消息中间件kafka概述和安装
- springmvc01
- Dedecms会员中心注入漏洞
- 软件漏洞-泛微OA-汇总
- AT32F437基于LVGL的仪表显示案例
- Ecshop模板开发(二十三):手机版显示商城
- 用摄像管替换电视机电路里的显现管的摄像机
- STM32CubeMX和STM32CubeIDE组合,定义STM32开发新方式
- css3 如何画太极 和 奥运五环
- ESC/POS 打印机指令
- 智能视频分析系统 PVG-VA
- html分享到微信朋友圈代码,微信分享给朋友及朋友圈JS代码
- Python基础-DAY16
- moment 农历_设计农历新年赠品
- android 意图过滤,Android 意图(Intent)及过滤器(Filter).pdf
- HTTP状态码含义:428、429、431、511431状态码详解
- Springboot+Mybatis+通用Mapper多数据源实现数据同步
热门文章
- 文件夹操作之判断是否存在(Directory)
- 第五十四天 how can I 坚持
- POJ3026 bfs+prim
- sqlite mysql pgsql_SQLite 、MySQL 与PostgreSQL三个关系型数据库的比较
- bio阻塞的缺点_java 中的 BIO/NIO/AIO 详解
- (六)JS基础知识三(走进作用域和闭包)【三座大山之二,不会闭包,基本不会通过】
- arraylist如何检测某一元素是否为空_java学习笔记:【ArrayList集合】
- 哈工大计算机学院庞,奋斗在知足与知不足之间――我与我的导师计算机学院马培军教授二三事...
- 遍历一个ul设置各个li不同的样式
- java返回json格式的状态码数据(二)