你好,

可以看一下SQL client的日志,里面应该有更详细的堆栈信息。

On Wed, Apr 14, 2021 at 10:42 AM 张锴 <[email protected]> wrote:

> flink版本1.12.2 ,在交互式界面执行flink sql 连接hive操作时,出现连接拒绝异常,内容如下:
> Flink SQL> use catalog myhive;
>
> Flink SQL> show tables;
> dim_kcl_customer_source_1h_all
> mytest
>
> Flink SQL> select * from dim_kcl_customer_source_1h_all limit 10;
> 2021-04-14 10:22:24,451 WARN  org.apache.hadoop.hive.conf.HiveConf
>                 [] - HiveConf of name hive.hook.proto.base-directory does
> not exist
> 2021-04-14 10:22:24,452 WARN  org.apache.hadoop.hive.conf.HiveConf
>                 [] - HiveConf of name hive.strict.managed.tables does not
> exist
> 2021-04-14 10:22:24,452 WARN  org.apache.hadoop.hive.conf.HiveConf
>                 [] - HiveConf of name hive.stats.fetch.partition.stats does
> not exist
> 2021-04-14 10:22:24,452 WARN  org.apache.hadoop.hive.conf.HiveConf
>                 [] - HiveConf of name hive.heapsize does not exist
> 2021-04-14 10:22:24,466 INFO
>  org.apache.hadoop.hive.metastore.HiveMetaStoreClient         [] - Trying
> to connect to metastore with URI thrift://test-hadoop002:9083
> 2021-04-14 10:22:24,467 INFO
>  org.apache.hadoop.hive.metastore.HiveMetaStoreClient         [] - Opened a
> connection to metastore, current connections: 2
> 2021-04-14 10:22:24,468 INFO
>  org.apache.hadoop.hive.metastore.HiveMetaStoreClient         [] -
> Connected to metastore.
> 2021-04-14 10:22:24,468 INFO
>  org.apache.hadoop.hive.metastore.RetryingMetaStoreClient     [] -
> RetryingMetaStoreClient proxy=class
> org.apache.hadoop.hive.metastore.HiveMetaStoreClient ugi=hadoop
> (auth:SIMPLE) retries=24 delay=5 lifetime=0
> 2021-04-14 10:22:24,609 INFO
>  org.apache.hadoop.hive.metastore.HiveMetaStoreClient         [] - Closed a
> connection to metastore, current connections: 1
> 2021-04-14 10:22:25,057 WARN
>  org.apache.hadoop.hdfs.shortcircuit.DomainSocketFactory      [] - The
> short-circuit local reads feature cannot be used because libhadoop cannot
> be loaded.
> 2021-04-14 10:22:25,235 INFO  org.apache.hadoop.mapred.FileInputFormat
>                 [] - Total input files to process : 1
> [ERROR]
> *Could not execute SQL statement. Reason:java.net.ConnectException:
> Connection refused*
>
> *表能查出来,执行sql语句时遇到拒绝连接,在hive里面执行同样的sql能查到数据,请问一下这块出现的问题是什么原因导致的呢。该如何排查*
>


-- 
Best regards!
Rui Li

回复