The reference to entity "useSSL" must end with the ';' delimiter.

本文解决在Hive测试环境中遇到的SSL连接警告问题,详细介绍了如何通过修改hive-site.xml文件中的URL参数分隔符来避免警告,并确保MetaStore正常运行。

在搭建测试环境的hive的时候,发现启动的时候,经常报以下警告信息

Thu May 14 09:52:26 CST 2020 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.

根据报错提示, MySQL 5.5.45+, 5.6.26+ and 5.7.6+默认采用SSL连接,如果需要取消这个警告,需要在url上加上添加useSSL=true,

jdbc:mysql://www.xxxx.com:3306/db?characterEncoding=utf8&useSSL=false

发现我用的mysql是5.7.23,符合上面描述,修改后,重启MetaStore,发现报了以下错误

Caused by: org.xml.sax.SAXParseException; systemId: file:/usr/apache-hive-1.2.1-bin/conf/hive-site.xml; lineNumber: 17; columnNumber: 88; The reference to entity "useSSL" must end with the ';' delimiter.
	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2432)
	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2420)
	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2488)

网上查了下,主要是hive-site.xml中url里参数分隔符&需要转义为 & 才行,修改如下解决。

jdbc:mysql://www.xxxx.com:3306/db?characterEncoding=utf8&useSSL=false

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

RunningShare

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值