Hive安装过程遇到的问题(启动hive --service metastore &)

来源:互联网 发布:促销规则 数据库设计 编辑:程序博客网 时间:2024/05/21 17:40

转载:http://blog.csdn.net/namelessml/article/details/52688955

感谢博主!!

异常:
WARN conf.HiveConf: DEPRECATED: hive.metastore.ds.retry.* no longer has any effect.  Use hive.hmshandler.retry.* instead
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:9083.
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:93)
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:75)
        at org.apache.hadoop.hive.metastore.TServerSocketKeepAlive.<init>(TServerSocketKeepAlive.java:34)
        at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:5192)
        at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:5134)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Exception in thread "main" org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:9083.
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:93)
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:75)
        at org.apache.hadoop.hive.metastore.TServerSocketKeepAlive.<init>(TServerSocketKeepAlive.java:34)
        at org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:5192)
        at org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:5134)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:212)

问题一:

$ hiveLogging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-1.2.1.jar!/hive-log4j.propertiesException in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient......
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5

可能原因1:

因为没有正常启动Hive 的 Metastore Server服务进程。

解决方法:

启动hive 的 Metastore Server服务进程,执行如下命令:

hive --service metastore &
  • 1
  • 1

可能原因2:

设置ConnectionURL错误

        <value>jdbc:mysql://localhost:3306/hive;createDatabaseIfNotExist=true</value>
  • 1
  • 1

解决方法:

将上面;修改成?即可。

        <name>javax.jdo.option.ConnectionURL</name>        <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
  • 1
  • 2
  • 1
  • 2

问题二:

$ hive --service metastore &[5] 17493hadoop@ubuntu:/usr/local/hive/conf$ Starting Hive Metastore Serverorg.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:9083.......
  • 1
  • 2
  • 3
  • 4
  • 5
  • 1
  • 2
  • 3
  • 4
  • 5

解决方法:

metastore重复启动,kill后重新启动即可解决。

# 查看启动metastore的进程号$ ps -aux | grep 'metastore'# 杀死相关进程$ kill -9 进程号
原创粉丝点击