我刚搭好的hive,运行过程遇到这个报错:
WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
看了好多帖子,需要修改jdbc的连接配置;
于是修改hive-site.xml;
sudo vi hive-site.xml
在dbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true添加&useSSL=false
修改如图

修改前:

修改后效果:

我的hive-site.xml文件
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true&useSSL=false</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
<description>Driver class name for a JDBC metastore</description>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hive</value>
<description>username to use against metastore database</description>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hive</value>
<description>password to use against metastore database</description>
</property>
</configuration>
参考博客:
https://blog.youkuaiyun.com/qq_37392589/article/details/81215953

本文解决Hive在运行过程中出现的SSL连接警告问题,通过修改hive-site.xml配置文件中的JDBC连接字符串,添加useSSL=false参数,成功避免了未验证服务器身份的SSL连接警告。
302

被折叠的 条评论
为什么被折叠?



