opensearch에 index를 생성할 때,
client = OpenSearch(
... hosts=[{"host": host, "port": port}],
... http_compress=True, # enables gzip compression for request bodies,
... use_ssl=False,
... verify_certs=False,
... ssl_assert_hostname=False,
... ssl_show_warn=False,
... )
다음과 같은 오류가 발생했다.
opensearchpy.exceptions.ConnectionError: ConnectionError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) caused by: ProtocolError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
해결: http_auth를 설정하고, use_ssl=True로 변경하니 해결되었다.
client = OpenSearch(
hosts=[{"host": host, "port": port}],
http_compress=True, # enables gzip compression for request bodies,
http_auth=('admin', 'admin'),
use_ssl=True,
verify_certs=False,
ssl_assert_hostname=False,
ssl_show_warn=False,
)