我正在尝试使用python elasticsearch库连接到我的elasticsearch示例:
es = Elasticsearch(HOST="https://elastic:password@3392047428db45a0b0e41659542.us-central1.gcp.cloud.es.io",PORT=9243)
es = Elasticsearch()
但我总是收到错误消息:
elasticsearch.exceptions.ConnectionError: ConnectionError(<urllib3.connection.HTTPConnection object at 0x000002BD624E6208>: 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 0x000002BD624E6208>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it)
我也尝试了,但得到相同的错误:
es = Elasticsearch(['3392047428db45a0b0e41659542.us-central1.gcp.cloud.es.io'], http_auth=('elastic', 'password'))
如果我获得URL并手动输入username
和password
,我就可以连接。请帮助我了解此错误的可能原因......提前感谢:)
1条答案
按热度按时间bqujaahr1#