我正在尝试使用eland库远程连接到我的3节点Elasticsearch(版本8.3.3)集群。我先试一个节点。此节点在elasticsearch.yml
中具有以下配置。
network.host: 1.2.3.4
xpack.security.enabled: true
xpack.security.http.ssl:
enabled: false
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: xxx
truststore.path: xxx
http.host
和transport.host
都在配置文件中注解掉了。
我在Jupyter Notebook的另一个服务器上有以下代码。
from elasticsearch import Elasticsearch
import eland as ed
es = Elasticsearch([{'host': "1.2.3.4", 'port': 9200, 'scheme': 'http'}], basic_auth=("xxx","yyy"), request_timeout=120)
index="abc"
fields=["@timestamp", "fieldA", "fieldB"]
df = ed.DataFrame(es, index, columns=fields)
我一直得到Connection timed out
。仅运行es.info()
也会得到Connection timed out
错误。
我该怎么办?
1条答案
按热度按时间jtw3ybtb1#
Tldr
我相信这可能是因为你正在使用的计划。
你不应该使用
https
吗?解决方案