【已解决】2.1.2版本,Elasticsearch catalog查询超时,Connection timed out after 5001 milliseconds

Viewed 102
  • 创建Elasticsearch catalog成功:
CREATE CATALOG es PROPERTIES (
    "type"="es",
    "hosts"="http://172.16.x.x:x200",
    "username"="xxx",
    "password"="xxx"
);
  • 查询索引列表成功:
show tables;

  • 查询提示超时
SELECT * from allalarminfo

java.sql.SQLException: errCode = 2, detailMessage = (doriscluster-be-2.doriscluster-be-internal.default.svc.cluster.local)[CANCELLED]Failed to connect to ES server, errmsg is: [HTTP_ERROR]Connection timed out after 5001 milliseconds

	0#  doris::HttpClient::execute(std::function<bool (void const*, unsigned long)> const&) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:0
	1#  doris::HttpClient::execute_post_request(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) at /var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/std_function.h:244
	2#  doris::ESScanReader::open() at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:449
	3#  doris::vectorized::NewEsScanner::open(doris::RuntimeState*) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:449
	4#  doris::vectorized::ScannerScheduler::_scanner_scan(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_ptr<doris::vectorized::ScanTask>) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:345
	5#  std::_Function_handler<void (), doris::vectorized::ScannerScheduler::submit(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_ptr<doris::vectorized::ScanTask>)::$_3>::_M_invoke(std::_Any_data const&) at /var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701
	6#  doris::ThreadPool::dispatch_thread() at /home/zcp/repo_center/doris_release/doris/be/src/util/threadpool.cpp:0
	7#  doris::Thread::supervise_thread(void*) at /var/local/ldb_toolchain/bin/../usr/include/pthread.h:562
	8#  ?
	9#  clone
  • jdbc类型的catalog功能正常
  • 2.1.2版本

更新

执行 SELECT * from allalarminfo limit 10后数据出来了; 应该是不加翻页限制数量太大了

2 Answers

catalog属性中加个 nodes_discovery=false,重建试试。

加上该属性后,不报错,但是也没有返回值,一直卡住