Hive Exception: Could not connect to meta store...

Error: 

hive> show tables;

FAILED: Error in metadata: MetaException(message:Could not connect to meta store using any of the URIs provided)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

Solution

1. It implies that the hive metastore server is not started up, so please use the following commands to start it up:

[root @.. bin]# hive --service metastore &

2. Please also check if the parameters of metastore server you want to connect to are correct.

转载于:https://my.oschina.net/javachina/blog/113372

您好!根据您提供的异常信息 `Caused by: org.apache.hadoop.hive.metastore.api.MetaException: Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused (Connection refused)`,这意味着您的代码无法连接到 Hive 元数据存储(MetaStore)。 这可能是由于以下原因导致的问题和解决方法: 1. Hive MetaStore 未启动或无法访问:请确保 Hive MetaStore 服务已经启动,并且您的代码能够访问到它。您可以尝试使用以下命令来检查 Hive MetaStore 的状态: ```shell hive --service metastore status ``` 如果服务未启动,请启动它。如果服务已启动,请确保您的代码连接到正确的 MetaStore 地址。 2. MetaStore URI 配置错误:请检查您代码中使用的 MetaStore URI 是否正确。通常,MetaStore URI 的格式为 `thrift://<metastore_host>:<metastore_port>`。确保 `<metastore_host>` 和 `<metastore_port>` 分别是正确的 Hive MetaStore 主机和端口号。 3. 防火墙或网络问题:如果您的代码运行在不同的主机上,而 Hive MetaStore 运行在另一个主机上,则可能存在防火墙或网络配置问题。请确保防火墙允许主机之间的连接,并且网络配置正确。 4. 其他配置问题:还有其他可能的配置问题导致无法连接到 Hive MetaStore。例如,可能缺少必要的配置属性或权限不足。请检查您的 HiveHadoop 配置文件,并确保所有必要的配置属性都正确设置。 如果以上解决方法都无法解决问题,请提供更多关于您的环境和代码的详细信息,以便我能够更好地帮助您解决问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值