Could not open connection to the HS2 server解决方案
问题如下:
Error:Could not open client transport with JDBC Uri: jdbc:hive2://node01:10000/default:java.net.ConnectException refused
先输入下面命令,确定metostore能不能启动
启动元数据服务 hive --service metastore netstat -nlpt | grep 9083 启动H2服务 hive --service hiveserver2 netstat -nlpt | grep 10000 查看日志(默认位置/tmp/用户名/hive.log) /tmp/hadoop/hive.log
hive3.2 beeline启动错误:
java.lang.NoClassDefFoundError: org/apache/tez/dag/api/TezConfiguration
默认一段时间后服务会重新起来。 但是为什么会启动tez呢,我没有安装啊。查看日志,有如下关联信息 2020-11-17 00:06:29,576 INFO [main] server.HiveServer2: HS2 interactive HA not enabled. Starting tez sessions.. 2020-11-17 00:06:29,576 INFO [main] server.HiveServer2: Starting/Reconnecting tez sessions.. 解决方案1.安装tez引擎 解决方案2.修改hive参数 修改hive配置文件参数 <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>
hive3.2 beeline连接错误,启动无法连接,禁止匿名用户连接:
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: hadoop is not allowed to impersonate anonymous (state=08S01,c
ode=0)
beeline !connect jdbc:hive2://localhost:10000/default anonymous anonymous 默认的用户名为anonymous
解决方案:修改hive参数