我正在使用ElasticSearch 5.2.2传输客户端和X-pack安全设置来与HTTPS URL连接。我想禁用SSL身份验证并尝试以下代码:
pip3 install pypiwin32
我不断遇到异常:
TransportClient client = new PreBuiltXPackTransportClient(Settings.builder()
.put("cluster.name", "clusterName")
.put("xpack.security.transport.ssl.enabled", "false")
.put("xpack.security.http.ssl.enabled", "false")
.put("xpack.security.enabled", "false")
.put("transport.profiles.client.xpack.security.ssl.client_authentication", "none")
.put("xpack.security.user", "userName:Password")
.build())
.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(host), port));
如果我有任何遗漏,请告诉我。 谢谢您的时间和帮助。