当前位置:   article > 正文

hive安装,启动失败错误及解决办法汇总_hive启动失败

hive启动失败

1.安装hive

下载hive:https://downloads.apache.org/hive/
安装及配置hive:hive:https://blog.csdn.net/qq_28854219/article/details/81185610?

2.hive启动失败,hive报错及解决办法

错误一
[root@node01 conf]# hive
19/03/31 09:57:31 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist

Logging initialized using configuration in jar:file:/opt/sxt/apache-hive-1.2.2-bin/lib/hive-common-1.2.2.jar!/hive-log4j.properties
Exception in thread “main” java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient…

可能原因: 没有mysql和hive没有连接上
解决办法: 将mysql-connector-java-5.1.32-bin.jar拷贝一份到hive的lib目录下。
(下载jar包:https://dev.mysql.com/downloads/connector/j/
)

错误二
Terminal initialization failed; falling back to unsupported

可能原因: 这是由于hadoop的目录中存在老版本的jline-0.9.94.jar
解决办法: 将hive下的新版本jline的JAR包拷贝到hadoop下 cp /hive/apache-hive-1.1.0-bin/lib/jline-2.12.jar /hadoop-2.5.2/share/hadoop/yarn/lib/
并删除老版本:jline-0.9.94.jar

错误三
hive.site.xml配置文件出错
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>

  <property>
      <name>hive.server2.thrift.bind.host</name>
      <value>hadoop1</value>
      <description>Bind host on which to run the HiveServer2 Thrift service.</description>
  </property>

   <property>
        <name>datanucleus.fixedDatastore</name>
        <value>false</value>
   </property>
   <property>
        <name>hive.metastore.execute.setugi</name>
        <value>true</value>
    </property>
        <property>
                <name>javax.jdo.option.ConnectionURL</name>
                <value>jdbc:mysql://192.168.223.10:3306/hive?createDatabaseIfNotExist=true&amp;useSSL=false</value>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionDriverName</name>
                <value>com.mysql.jdbc.Driver</value>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionUserName</name>
                <value>root</value>
        </property>
        <property>
                <name>javax.jdo.option.ConnectionPassword</name>
                <value>admin</value>
        </property>
        <property>
                <name>hive.metastore.warehouse.dir</name>
                <value>/usr/hive/apache-hive-1.2.2-bin/warehouse</value>
        </property>
        <property>
                <name>hive.exec.scratchdir</name>
                <value>/usr/hive/apache-hive-1.2.2-bin/tmp</value>
        </property>
        <property>
                <name>hive.querylog.location</name>
                <value>/usr/hive/apache-hive-1.2.2-bin/log</value>
        </property>
        <property>
                <name>hive.metastore.schema.verification</name>
                <value>false</value>
        </property>
        <property>
                <name>hbase.zookeeper.quorum</name>
                <value>hadoop1:2181,hadoop2:2181,hadoop3:2181</value>
        </property>
</configuration>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56

主要修改其中的
jdbc:mysql://master:3306/hive?createDatabaseIfNotExist=true&useSSL=false
master改为对应的主机ip如:
jdbc:mysql://192.168.223.10:3306/hive?createDatabaseIfNotExist=true&useSSL=false

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/719379
推荐阅读
相关标签
  

闽ICP备14008679号