apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.66k stars 3.27k forks source link

[Bug] CATALOG on hive查询时报异常java.net.UnknownHostException: xxxxx #32408

Open zhangjjzyl opened 7 months ago

zhangjjzyl commented 7 months ago

Search before asking

Version

2.0.4

What's Wrong?

-- 创建catalogSQL
CREATE CATALOG c_hive PROPERTIES (
    'type'='hms',
    'hive.metastore.uris' = 'thrift://192.168.30.31:9083',
        'fs.defaultFS' = 'hdfs://192.168.30.31:8020',
        'hive.version' = '2.1.1');

可以正常show tables,按照官方文档增加了fs.defaultFS配置,查询仍然报java.net.UnknownHostException: emr-header-1

emr-header-1是hadoop集群的host,集群未开启ha

What You Expected?

这个问题该如何解决

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

mesat commented 7 months ago

Please try to copy the hdfs-site.xml and hive-site.xml files into the conf folder. Check the documentation: https://doris.apache.org/docs/2.0/admin-manual/config/config-dir

zhangjjzyl commented 7 months ago

@mesat

I copied the hdfs-site.xml and hive-site.xml files into the FE and BE conf folder(all nodes),then restart FE and BE ,but the error is still same. the hdfs-site.xml and hive-site.xml is copied from CDH,no changes. image

mesat commented 7 months ago

can you share these files?

zhangjjzyl commented 7 months ago

@mesat of course conf.zip

mesat commented 7 months ago

Are you sure that you can ping these addresses: emr-worker-1 emr-header-1

zhangjjzyl commented 7 months ago

@mesat I can't ping these addresses when not config hosts file. If i config hosts file,the query is correct ,even not copy hdfs-site.xml hive-site.xml into conf folder. But i think doris should be replace the hostname with ip automatic. If i have 2 clusters,and hostname is same,how config hosts file?

zhangjjzyl commented 7 months ago

https://github.com/apache/doris/discussions/32781#discussioncomment-8900886 I read the source code,I think should add replace hostname with ip in there.

mesat commented 7 months ago

@mesat I can't ping these addresses when not config hosts file. If i config hosts file,the query is correct ,even not copy hdfs-site.xml hive-site.xml into conf folder. But i think doris should be replace the hostname with ip automatic. If i have 2 clusters,and hostname is same,how config hosts file?

Every cluster has to have a unique hostname. Otherwise, the resolution would conflict.