# Error while connecting to Elastic Cloud using RestClient or Transport Client

**URL:** <https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483>\
**Category:** Elasticsearch\
**Created:** [September 14, 2017, 8:05am UTC](https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483 "2017-09-14T08:05:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chiranjeevi](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@chiranjeevi](https://discuss.elastic.co/u/chiranjeevi)\
**Post date:** [September 14, 2017, 8:05am UTC](https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483/1 "2017-09-14T08:05:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [September 14, 2017, 9:42am UTC](https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483/2 "2017-09-14T09:42:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chiranjeevi](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@chiranjeevi](https://discuss.elastic.co/u/chiranjeevi)\
**Post date:** [September 14, 2017, 10:18am UTC](https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483/3 "2017-09-14T10:18:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [September 14, 2017, 11:08am UTC](https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483/4 "2017-09-14T11:08:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![chiranjeevi](https://avatars.discourse-cdn.com/v4/letter/c/c68b51/32.png) [@chiranjeevi](https://discuss.elastic.co/u/chiranjeevi)\
**Post date:** [September 14, 2017, 12:03pm UTC](https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483/5 "2017-09-14T12:03:55Z")

</div>

No, Im using Xpack

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [September 14, 2017, 12:30pm UTC](https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483/6 "2017-09-14T12:30:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 12, 2017, 12:31pm UTC](https://discuss.elastic.co/t/error-while-connecting-to-elastic-cloud-using-restclient-or-transport-client/100483/7 "2017-10-12T12:31:11Z")

</div>

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