查找hive启动日志
默认名是hive.log
[root@Master bin]# find / -name hive.log
/tmp/root/hive.log
Q1 Illegal character entity: expansion character (code 0x8
hive-site.xml有未识别的字符,需要删除,比如报错
xception in thread "main" java.lang.RuntimeException: com.ctc.wstx.exc.WstxParsingException: Illegal character entity: expansion character (code 0x8
at [row,col,system-id]: [3215,96,"file:/opt/apache-hive-3.1.2/conf/hive-site.xml"]
查看文件 hive-site.xml
在3215行,96列出附近找到
查找:fortransactional
删除即可
Q2 Caused by: java.net.URISyntaxException: Relative path in absolute URI: KaTeX parse error: Expected '}', got 'EOF' at end of input: …a.io.tmpdir%7D/%7Bsystem:user.name%7D
修改hive-site.xml ,修改所有${…}之类的value值,写上绝对路径.
部分修改如下(可以搜索name标签内名字查找)
<property>
<name>hive.downloaded.resources.dir</name>
<!-- 修改这里的value -->
<value>/opt/apache-hive-3.1.2/resources</value>
<description>Temporary local directory for added resources in the remote file system.</description>
</property>
<property>
<name>hive.server2.logging.operation.log.location</name>
<value>/opt/apache-hive-3.1.2/log</value>
<description>Top level directory where operation logs are stored if logging functionality is enabled</description>
</property>
<property>
<name>hive.exec.local.scratchdir</name>
<value>/opt/apache-hive-3.1.2/scratchdir</value>
<description>Local scratch space for Hive jobs</description>
</property>
<property>
<name>hive.querylog.location</name>
<value>/opt/apache-hive-3.1.2/querylog</value>
<description>Location of Hive run time structured log file</description>
</property>
报错server.HiveServer2: Error starting HiveServer2 on attempt 1, will retry in 60000ms
修改hive-site.xml,将下面value改为true
<property>
<name>hive.server2.active.passive.ha.enable</name>
<value>true</value>
<description>Whether HiveServer2 Active/Passive High Availability be enabled when Hive Interactive sessions are enabled.This will also require hive.server2.support.dynamic.service.discovery to be enabled.</description>
</property>
参考链接:
https://stackoverflow.com/questions/29602670/using-hive-got-exception-java-lang-noclassdeffounderror-org-apache-tez-dag-api
本文解决Hive启动过程中的日志错误、非法字符实体、URISyntaxException等问题,通过修改hive-site.xml配置文件中的路径设置及高可用性参数,确保Hive服务稳定运行。
8504

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



