Error while connecting to Elastic Cloud using RestClient or Transport Client

If i Connect with Transport Client returned error is:

Exception in thread "main" java.lang.VerifyError: class org.elasticsearch.shield.ShieldPlugin overrides final method onModule.(Lorg/elasticsearch/action/ActionModule;)V

If try to connect with Rest Client then:1. java.io.IOException: An existing connection was forcibly closed by the remote host

or 2. No nodesavailable exception

My Elasticsearch is in Elastic Cloud --> google cloud and id is 488098

What version of Elasticsearch are you trying to connect to, and what version are you using for the client libraries?

I use 5.5.2 version Elasticsearch which is in Cloud and My Client libraries i tried using 5.5.2 and 5.6.0

Then you have something wrong with your client configuration/classpath.

org.elasticsearch.shield.ShieldPlugin is a plugin for Elasticsearch 1 and 2. You shouldn't be using it as part of a 5.5 client.

No, Im using Xpack

The error message that you included in your original post lists that class. It must have come from somewhere, and it's not part of the 5.x transport client.
You need to work out where it's coming from, because it looks like the source of your problems.

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