python - Windows上的Elasticsearch连接问题(found.io)

标签 python elasticsearch github

在Windows上,我想将python程序连接到found.io上托管的elasticsearch集群(通过heroku)。

与elasticsearch的连接超时,给我一个异常(exception),说“目标机器主动拒绝了它”。

es = Elasticsearch(
      [elastic],
        # port=443,
        use_ssl=True,
        verify_certs=True,
        ca_certs=certifi.where(),
    )

我期望建立索引,但是收到以下错误消息:
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x03A0EC70>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x03A0EC70>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it)

最佳答案

可能是PROXY问题,例如 heroku/legacy-cli issue 642中的问题,并记录在using the CLI / using an HTTP proxy中。

另一个原因就是当远程 flex 搜索集群未启动时(如in this thread)。

关于python - Windows上的Elasticsearch连接问题(found.io),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56330037/

相关文章:

python - 如何创建Python固定长度位?

python - QML 中的光标形状

amazon-web-services - AWS Elasticsearch 。禁止/8/索引写入 (api)。无法写入索引

elasticsearch - 在搜索中给予文档字段不同的优先级

git - 为什么 git-cherry pick 什么都不说?

python - Pandas Python 中的 Dataframe Comprehension 以创建新的 Dataframe

python - 有没有办法在 Flask WTForms 中创建数据列表字段?

search - 当搜索到文档时,ES如何仅返回该文档的一部分?

git - 将文件提交回 GitHub for Windows

git - 使用不同的用户通过 https 推送到 GitHub