# Not abe to connect to elastic search cloud cluster from Transport Client

**URL:** <https://discuss.elastic.co/t/not-abe-to-connect-to-elastic-search-cloud-cluster-from-transport-client/112942>\
**Category:** Elasticsearch\
**Created:** [December 22, 2017, 5:29am UTC](https://discuss.elastic.co/t/not-abe-to-connect-to-elastic-search-cloud-cluster-from-transport-client/112942 "2017-12-22T05:29:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankur\_singla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankur_singla/32/45612_2.png) [@ankur\_singla](https://discuss.elastic.co/u/ankur_singla)\
**Post date:** [December 22, 2017, 5:29am UTC](https://discuss.elastic.co/t/not-abe-to-connect-to-elastic-search-cloud-cluster-from-transport-client/112942/1 "2017-12-22T05:29:54Z")

</div>

I am using 6.1.1 elastic search but while connecting to elastic cloud with transport client i am getting

```
java.io.StreamCorruptedException: invalid internal transport message format, got (48,54,54,50)

```

I am using X-pack Transport client

```
Settings settings = Settings.builder()
					.put("client.transport.nodes_sampler_interval", "5s")
		            .put("client.transport.sniff", false)
		            .put("transport.tcp.compress", true)
		            .put("cluster.name", "abcd")
		            .put("xpack.security.transport.ssl.enabled", enableSsl)
		            .put("request.headers.X-Found-Cluster", "abcd")
			    .put("xpack.security.user", "user:password") // your shield username and password
			    .build();
			
			TransportClient client = new PreBuiltXPackTransportClient(settings)
					.addTransportAddress(new TransportAddress(InetAddress.getByName("xxxxxxxxxxe7be789c.us-east-1.aws.found.io"), 9243))

```

Please let me know if i am using missing something.  
;

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 22, 2017, 4:10pm UTC](https://discuss.elastic.co/t/not-abe-to-connect-to-elastic-search-cloud-cluster-from-transport-client/112942/2 "2017-12-22T16:10:56Z")

</div>

There is a big red warning in cloud when you use 6.1.1:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/7/479f2e3ff19e3b676d5a095adc483207ab0fb835.jpg)

You need to use for now the Java REST Client for now or wait a bit for the team to fix that problem, I believe.

---

<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:** [January 19, 2018, 4:11pm UTC](https://discuss.elastic.co/t/not-abe-to-connect-to-elastic-search-cloud-cluster-from-transport-client/112942/3 "2018-01-19T16:11:00Z")

</div>

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