2

I have an es_client (java/dropwizard) application. It communicates with the elastic search just fine over plain text connection. I have followed the instructions at https://github.com/sonian/elasticsearch-jetty to set up SSL for es client. However when I start my es_client it reports every 5 seconds the following:

INFO [2014-01-08 23:02:14,814] org.elasticsearch.client.transport: [Karolina Dean] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9443]], disconnecting... ! org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9443]][cluster/nodes/info] disconnected

How can I go about figuring this one out?

Thanks, Maciej

1
  • Actually, is it possible to talk to eleasticsearch via Java API using SSL? THe "jetty plugin" way seem to address just the REST API side of things. Commented Jan 9, 2014 at 1:18

1 Answer 1

2

Elasticsearch by default does not support SSL on its transport layer, so that would be something you would have to add yourself. This requires new code on both the server and client side.

Fortunately, Elasticsearch is very modular at its source code, so it's possible to swap out the transport implementations rather easily by just adding one line to the configuration file.

Unfortunately, Elasticsearch uses a lot of private fields and methods that make it hard to just add a new feature to their existing implementation without re-implementing it all or copy/pasting large amounts of code. Additionally, Elasticsearch shades their Netty-includes and skips classes they don't use, which means that you have to include the required SSL+helper classes from a compatible Netty version yourself.

Found, a hosted Elasticsearch provider which has full SSL support using the Java transport client does this using this open source plugin, which you can probably use as an inspiration should you decide to implement it yourself.

Another different approach would be using stunnel ot take care of the SSL-specific parts between your machines instead of doing anything with Elasticsearch itself.

Sign up to request clarification or add additional context in comments.

1 Comment

The elasticsearch-transport-module is deprecated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.