Add elasticsearch security by x-pack authentificaiton

I'm using elasticsearch5.5.2 with java spring boot application.

I would firstly, add the default authentification, after, connect it to the ldap.

So, I added:
.put("xpack.security.user", "transport_client_user:changeme")
.put("client.transport.ignore_cluster_name", true)
.put("xpack.security.transport.ssl.enabled", "true")
.put("xpack.ssl.keystore.path", xxxx.pfx)
.put("xpack.ssl.keystore.password", xxxx)
.put("xpack.ssl.truststore.path", xxxx)
.put("xpack.ssl.truststore.password", xxxx.pfx)
.put("client.transport.sniff", true)
.put("transport.tcp.port", 9300)
.build();

I got the following error: org.elasticsearch.client.transport.NoNodeAvailableException: None of the configured nodes are available: [{#transport#-1}{wcxlZUAyTLW_uAoYXOMAYw}{localhost}{127.0.0.1:9200}]

I suppose that it's relative to the default user/password? (when I turn ssl.enable to false, it works).

Hi there,

Please go through our documentation on how to setup Transport client to work with security. I believe all your questions are answered there, but if something is still unclear, we'd be happy to help.

Also, keep in mind that the transport client is deprecated in version 7.0.0 in favor of the high level rest client so if you're planning on upgrading soon, you might want to look into migrating to the that instead of committing effort into building a solution with the transport client

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.