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

转载: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.(TServerSocket.java:93)
        at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:75)
        at org.apache.hadoop.hive.metastore.TServerSocketKeepAlive.(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.(TServerSocket.java:93)
        at org.apache.thrift.transport.TServerSocket.(TServerSocket.java:75)
        at org.apache.hadoop.hive.metastore.TServerSocketKeepAlive.(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)

问题一:

$ hive

Logging initialized using configuration in jar:file:/usr/local/hive/lib/hive-common-1.2.1.jar!/hive-log4j.properties
Exception 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=truevalue>
  • 1
  • 1

解决方法:

将上面;修改成?即可。

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

问题二:

$ hive --service metastore &
[5] 17493
hadoop@ubuntu:/usr/local/hive/conf$ Starting Hive Metastore Server
org.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 进程号

你可能感兴趣的:(Hive)