我尝试使用Elasticsearch(在Docker上安全运行)创建一个Haystack文档存储库,但是我收到了以下错误。我知道我需要告诉Haystack使用https
,但是我在文档中找不到方法。我尝试指定端口9300和9200。
document_store = ElasticsearchDocumentStore(
host='https://localhost',
username= 'elastic',
password='{PASSWORD}',
port=9200,
index='squad_docs'
)
Python控制台中的Haystack错误
ConnectionError: ConnectionError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) caused by: ProtocolError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
日志中的ElasticSearch警告
{"@timestamp":"2022-11-08T14:01:54.875Z", "log.level": "WARN", "message":"received plaintext http traffic on an https channel, closing connection Netty4HttpChannel{localAddress=/172.18.0.2:9200, remoteAddress=/172.18.0.1:56568}", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"elasticsearch[c759978b5b07][transport_worker][T#1]","log.logger":"org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4HttpServerTransport","elasticsearch.cluster.uuid":"vDXCcs4uQM-gcuf5vciZkA","elasticsearch.node.id":"VunPyrAPRbG9PrLFyZ1E8w","elasticsearch.node.name":"c759978b5b07","elasticsearch.cluster.name":"docker-cluster"}
1条答案
按热度按时间q3qa4bjr1#
ElasticsearchDocumentStore
有一个参数scheme
,您需要将其设置为"https"
。您可能需要查看文档以查看所有可用参数。