0
我正在使用elasticsearch 2.3.1和python 2.7。我試圖創建一個簡單的實例,並測試作爲Elasticsearch:安裝屏蔽時無法使用python進行連接
esInstance = Elasticsearch(['https://'+shield_uname+":"+shield_pass+"@"+server+":"+port])
print esInstance.info()
,但我得到
elasticsearch.exceptions.SSLError: ConnectionError(EOF occurred in violation of protocol (_ssl.c:590)) caused by: SSLError(EOF occurred in violation of protocol (_ssl.c:590))
我到底做錯了什麼?當我嘗試時出現同樣的錯誤
requests.get("https://"+shield_uname+":"+shield_pass+"@"+server+":"+port, verify=False)
我該如何解決這個問題?
謝謝,但我沒有任何證書或鑰匙在我身邊。我可以用use_ssl = False來使用http_auth嗎? – AbtPst
是的,你可以使用'http_auth'而不使用SSL,但這確實意味着你的用戶名/密碼會以純文本的形式通過你的網絡(可以測試,但不能用於生產!)。這相當於使用'http',但要這樣做,您可以在'port'設置爲刪除SSL使用/設置後刪除所有內容。 – pickypg
完美!這是我現在需要做的。謝謝 – AbtPst