执行查看linux端口命令 9083 端口发现被占用 Hive安装过程遇到的问题

来源:互联网 发布:java sip协议开发 编辑:程序博客网 时间:2024/06/01 15:52



执行查看linux端口命令

9083 端口发现被占用

[root@h1 bin]# netstat -apn|grep 9083
tcp        0      0 0.0.0.0:9083                0.0.0.0:*                   LISTEN      26235/java         
tcp       48      0 192.168.170.69:9083         192.168.170.69:44742        CLOSE_WAIT  -                  
[root@h1 bin]# netstat -apn|grep 9088
[root@h1 bin]#



问题一:

$ 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:

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

解决方法:

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

hive --service metastore &
  • 1

可能原因2:

设置ConnectionURL错误

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

解决方法:

将上面;修改成?即可。

        <name>javax.jdo.option.ConnectionURL</name>        <value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true</value>
  • 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

解决方法:

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

# 查看启动metastore的进程号$ ps -aux | grep 'metastore'# 杀死相关进程$ kill -9 进程号