# Connect to elasticsearch over SSL using found

**URL:** https://discuss.elastic.co/t/connect-to-elasticsearch-over-ssl-using-found/54624
**Category:** Elasticsearch
**Created:** [July 4, 2016, 8:51am UTC](https://discuss.elastic.co/t/connect-to-elasticsearch-over-ssl-using-found/54624 "2016-07-04T08:51:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![EmanuelRocha](https://avatars.discourse-cdn.com/v4/letter/e/b3f665/32.png) [@EmanuelRocha](https://discuss.elastic.co/u/EmanuelRocha)
#### Post date: [July 4, 2016, 8:51am UTC](https://discuss.elastic.co/t/connect-to-elasticsearch-over-ssl-using-found/54624/1 "2016-07-04T08:51:08Z")

</div>

I'm trying to connect to my elasticsearch server over SSL and tried lots of different things but couldn't fix the problem so I've tried to establish the connection using found shield example.

Currently I'm using elasticsearch 2.3.3 and jdk1.7.0\_79 and trying to connect to elastic using found-shield but when I run the example that should work it outputs the following:

```
	[2016-07-04 08:38:10,455][INFO][no.found.elasticsearch.example.TransportExample] Connecting to cluster: [CLUSTER_ID] via [CLUSTER_ID.REGION.aws.found.io:9343] using ssl:[true]
[2016-07-04 08:38:10,688][INFO][org.elasticsearch.plugins] [Neuronne] modules [], plugins [shield], sites []
[2016-07-04 08:38:10,983][INFO][org.elasticsearch.transport] [Neuronne] Using [org.elasticsearch.shield.transport.ShieldClientTransportService] as transport service, overridden by [shield]
[2016-07-04 08:38:10,987][INFO][org.elasticsearch.transport] [Neuronne] Using [org.elasticsearch.shield.transport.netty.ShieldNettyTransport] as transport, overridden by [shield]
[2016-07-04 08:38:12,051][INFO][org.elasticsearch.client.transport] [Neuronne] failed to get node info for {#transport#-1}{IP_ADDRESS}{CLUSTER_ID.REGION.aws.found.io/IP_ADDRESS:9343}, disconnecting...
org.elasticsearch.transport.RemoteTransportException: [Failed to deserialize exception response from stream]
org.elasticsearch.transport.TransportSerializationException: Failed to deserialize exception response from stream
		...
		at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[netty-3.10.5.Final.jar:na]
		at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[netty-3.10.5.Final.jar:na]
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_79]
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_79]
		at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_79]
Caused by: java.io.IOException: failed to read exception for id [40]
		... 30 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
		... 32 common frames omitted
Caused by: java.lang.IndexOutOfBoundsException: Readable byte limit exceeded: 118
		... 37 common frames omitted

```

I'm new to elasticsearch so if something misses please ask me that I'll try to provide you with it quickly.

Thanks, Emanuel

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [July 5, 2016, 6:58am UTC](https://discuss.elastic.co/t/connect-to-elasticsearch-over-ssl-using-found/54624/2 "2016-07-05T06:58:12Z")

</div>

Hey,

can you provide more code, how you start/initialize the connection? There is also some docs about it, but I guess you already read it... [https://www.elastic.co/guide/en/cloud/current/shield.html#shield-transport](https://www.elastic.co/guide/en/cloud/current/shield.html#shield-transport)

--Alex

---

<div class="post-metadata">

### Author: ![EmanuelRocha](https://avatars.discourse-cdn.com/v4/letter/e/b3f665/32.png) [@EmanuelRocha](https://discuss.elastic.co/u/EmanuelRocha)
#### Post date: [July 7, 2016, 10:47pm UTC](https://discuss.elastic.co/t/connect-to-elasticsearch-over-ssl-using-found/54624/3 "2016-07-07T22:47:36Z")

</div>

Sry for taking so long, I'm just using the example on [https://github.com/elastic/found-shield-example](https://github.com/elastic/found-shield-example) and to initialize I just use the command given:

```
mvn compile exec:java -Dhost=YOUR_CLUSTER_ID.REGION.aws.found.io -Dshield.user="username:password"
```

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [July 8, 2016, 6:07am UTC](https://discuss.elastic.co/t/connect-to-elasticsearch-over-ssl-using-found/54624/4 "2016-07-08T06:07:31Z")

</div>

Hey,

did you update the Elasticsearch/Shield plugin versions in the pom.xml?

--Alex

---

<div class="post-metadata">

### Author: ![EmanuelRocha](https://avatars.discourse-cdn.com/v4/letter/e/b3f665/32.png) [@EmanuelRocha](https://discuss.elastic.co/u/EmanuelRocha)
#### Post date: [July 8, 2016, 8:18am UTC](https://discuss.elastic.co/t/connect-to-elasticsearch-over-ssl-using-found/54624/5 "2016-07-08T08:18:36Z")

</div>

Hi, yes I did it,

```
<dependencies>
        <dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch</artifactId>
            <version>2.3.3</version>
        </dependency>
        <dependency>
            <groupId>org.elasticsearch.plugin</groupId>
            <artifactId>shield</artifactId>
            <version>2.3.3</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.0.13</version>
        </dependency>
    </dependencies>

```

Emanuel

---

<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: [July 5, 2017, 10:37pm UTC](https://discuss.elastic.co/t/connect-to-elasticsearch-over-ssl-using-found/54624/6 "2017-07-05T22:37:08Z")

</div>


