# io.netty.handler.ssl.SslHandshakeTimeoutException: handshake timed out after 10000ms

**URL:** <https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117>\
**Category:** Elasticsearch\
**Created:** [February 22, 2023, 3:42am UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117 "2023-02-22T03:42:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raghulvishal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raghulvishal/32/117550_2.png) [@Raghulvishal](https://discuss.elastic.co/u/Raghulvishal)\
**Post date:** [February 22, 2023, 3:42am UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117/1 "2023-02-22T03:42:08Z")

</div>

Hi Team,  
We are getting this below exception daily. so, can you please give solution for this exception.  
we are using Elasticsearch 7.3.2, java version 1.8.0\_131 and tomcat version 9.

2023-02-19 18:55:20.683 [elasticsearch[_client_][transport\_worker][T#2]] WARN org.elasticsearch.transport.OutboundHandler - [103]:send message failed [channel: Netty4TcpChannel{localAddress=0.0.0.0/0.0.0.0:port, remoteAddress=/ip:port, profile=default}]  
io.netty.handler.ssl.SslHandshakeTimeoutException: handshake timed out after 10000ms  
at io.netty.handler.ssl.SslHandler$5.run(SslHandler.java:2054) [netty-handler-4.1.49.Final.jar:4.1.49.Final]  
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) [netty-common-4.1.49.Final.jar:4.1.49.Final]  
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170) [netty-common-4.1.49.Final.jar:4.1.49.Final]  
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [netty-common-4.1.49.Final.jar:4.1.49.Final]  
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [netty-common-4.1.49.Final.jar:4.1.49.Final]  
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) [netty-transport-4.1.49.Final.jar:4.1.49.Final]  
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.49.Final.jar:4.1.49.Final]  
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.49.Final.jar:4.1.49.Final]  
at java.lang.Thread.run(Thread.java:750) [?:1.8.0\_332]  
2023-02-19 18:55:20.685 [elasticsearch[_client_][transport\_worker][T#2]] WARN org.elasticsearch.transport.OutboundHandler - [103]:sending transport message [Request{internal:tcp/handshake}{399342}{false}{false}{true}] of size [124] on [Netty4TcpChannel{localAddress=0.0.0.0/0.0.0.0:port, remoteAddress=/ip:port, profile=default}] took [10006ms] which is above the warn threshold of [5000ms] with success [false]

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 22, 2023, 4:36am UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117/2 "2023-02-22T04:36:13Z")

</div>

Welcome to our community! 😃

> [@Raghulvishal](#):
>
> Elasticsearch 7.3.2

Please note that version is [EOL](https://www.elastic.co/support/eol) and no longer supported, you should be looking to upgrade as a matter of urgency as it's very old.

> [@Raghulvishal](#):
>
> tomcat version 9.

Does this run your client code?

What is the output from the [`_cluster/stats?pretty&human` API](https://www.elastic.co/guide/en/elasticsearch/reference/8.4/cluster-stats.html)?

---

<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:** [February 22, 2023, 4:36am UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117/3 "2023-02-22T04:36:13Z")

</div>

Elasticsearch 7.3 is [EOL](https://www.elastic.co/support/eol) and no longer supported. Please upgrade ASAP.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<div class="post-metadata">

**Author:** ![Raghulvishal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raghulvishal/32/117550_2.png) [@Raghulvishal](https://discuss.elastic.co/u/Raghulvishal)\
**Post date:** [February 22, 2023, 10:44am UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117/4 "2023-02-22T10:44:35Z")

</div>

This is output of our cluster stats.  
{  
"\_nodes": {  
"total": 8,  
"successful": 8,  
"failed": 0  
},  
"cluster\_name": "####",  
"cluster\_uuid": "DD00FjboRlmFLKVcdU2nPg",  
"timestamp": 1677061175368,  
"status": "green",  
"indices": {  
"count": 461,  
"shards": {  
"total": 4586,  
"primaries": 2293,  
"replication": 1.0,  
"index": {  
"shards": {  
"min": 2,  
"max": 10,  
"avg": 9.947939262472884  
},  
"primaries": {  
"min": 1,  
"max": 5,  
"avg": 4.973969631236442  
},  
"replication": {  
"min": 1.0,  
"max": 1.0,  
"avg": 1.0  
}  
}  
},  
"docs": {  
"count": 363072545,  
"deleted": 25158248  
},  
"store": {  
"size": "766.6gb",  
"size\_in\_bytes": 823141903857  
},  
"fielddata": {  
"memory\_size": "106.3kb",  
"memory\_size\_in\_bytes": 108904,  
"evictions": 0  
},  
"query\_cache": {  
"memory\_size": "201.3mb",  
"memory\_size\_in\_bytes": 211109337,  
"total\_count": 32292900,  
"hit\_count": 7127915,  
"miss\_count": 25164985,  
"cache\_size": 3432,  
"cache\_count": 1101742,  
"evictions": 1098310  
},  
"completion": {  
"size": "0b",  
"size\_in\_bytes": 0  
},  
"segments": {  
"count": 12287,  
"memory": "435mb",  
"memory\_in\_bytes": 456229988,  
"terms\_memory": "178.8mb",  
"terms\_memory\_in\_bytes": 187565473,  
"stored\_fields\_memory": "228.9mb",  
"stored\_fields\_memory\_in\_bytes": 240045656,  
"term\_vectors\_memory": "0b",  
"term\_vectors\_memory\_in\_bytes": 0,  
"norms\_memory": "1.9mb",  
"norms\_memory\_in\_bytes": 2038336,  
"points\_memory": "14.3mb",  
"points\_memory\_in\_bytes": 15055183,  
"doc\_values\_memory": "10.9mb",  
"doc\_values\_memory\_in\_bytes": 11525340,  
"index\_writer\_memory": "22.3mb",  
"index\_writer\_memory\_in\_bytes": 23448406,  
"version\_map\_memory": "1.6kb",  
"version\_map\_memory\_in\_bytes": 1734,  
"fixed\_bit\_set": "72.7mb",  
"fixed\_bit\_set\_memory\_in\_bytes": 76272424,  
"max\_unsafe\_auto\_id\_timestamp": 1677059706968,  
"file\_sizes": {

```
  }
}

```

},  
"nodes": {  
"count": {  
"total": 8,  
"coordinating\_only": 0,  
"data": 5,  
"ingest": 0,  
"master": 3,  
"voting\_only": 0  
},  
"versions": [  
"7.3.2"  
],  
"os": {  
"available\_processors": 108,  
"allocated\_processors": 108,  
"names": [  
{  
"name": "Linux",  
"count": 8  
}  
],  
"pretty\_names": [  
{  
"pretty\_name": "Ubuntu 18.04.6 LTS",  
"count": 8  
}  
],  
"mem": {  
"total": "848.9gb",  
"total\_in\_bytes": 911572004864,  
"free": "94.2gb",  
"free\_in\_bytes": 101191860224,  
"used": "754.7gb",  
"used\_in\_bytes": 810380144640,  
"free\_percent": 11,  
"used\_percent": 89  
}  
},  
"process": {  
"cpu": {  
"percent": 23  
},  
"open\_file\_descriptors": {  
"min": 561,  
"max": 35585,  
"avg": 17628  
}  
},  
"jvm": {  
"max\_uptime": "320d",  
"max\_uptime\_in\_millis": 27653202781,  
"versions": [  
{  
"version": "1.8.0\_131",  
"vm\_name": "Java HotSpot(TM) 64-Bit Server VM",  
"vm\_version": "25.131-b11",  
"vm\_vendor": "Oracle Corporation",  
"bundled\_jdk": true,  
"using\_bundled\_jdk": false,  
"count": 8  
}  
],  
"mem": {  
"heap\_used": "35.3gb",  
"heap\_used\_in\_bytes": 37994793856,  
"heap\_max": "80.7gb",  
"heap\_max\_in\_bytes": 86701506560  
},  
"threads": 1064  
},  
"fs": {  
"total": "2.8tb",  
"total\_in\_bytes": 3166766153728,  
"free": "1tb",  
"free\_in\_bytes": 1119663431680,  
"available": "1tb",  
"available\_in\_bytes": 1119562768384  
},  
"plugins": [  
{  
"name": "repository-gcs",  
"version": "7.3.2",  
"elasticsearch\_version": "7.3.2",  
"java\_version": "1.8",  
"description": "The GCS repository plugin adds Google Cloud Storage support for repositories.",  
"classname": "org.elasticsearch.repositories.gcs.GoogleCloudStoragePlugin",  
"extended\_plugins": [

```
    ],
    "has_native_controller": false
  }
],
"network_types": {
  "transport_types": {
    "security4": 8
  },
  "http_types": {
    "security4": 8
  }
},
"discovery_types": {
  "zen": 8
},
"packaging_types": [
  {
    "flavor": "default",
    "type": "tar",
    "count": 8
  }
]

```

}  
}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 22, 2023, 10:10pm UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117/5 "2023-02-22T22:10:49Z")

</div>

In future please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

Other than the very old version that you need to upgrade ASAP, you look to be oversharded. You have nearly 600 shards per node with an average size of ~5.5GB, and with each node having ~10GB of heap assigned to it. That's going to be putting a lot of pressure on Elasticsearch to manage and is very inefficient.

You should look to increase the average size of your shards and to reduce your shard count.

---

<div class="post-metadata">

**Author:** ![Raghulvishal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raghulvishal/32/117550_2.png) [@Raghulvishal](https://discuss.elastic.co/u/Raghulvishal)\
**Post date:** [February 23, 2023, 3:23am UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117/6 "2023-02-23T03:23:22Z")

</div>

overshards is the reason for a ssl.handshake timeout exception. But, we are getting this error recently.  
This error causing because of creating overshards or something related to elastic?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 23, 2023, 3:25am UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117/7 "2023-02-23T03:25:11Z")

</div>

Over sharding puts unnecessary load on the cluster that can impact connection time outs between nodes, yes.

You really need to upgrade first though, 7.3 is not supported.

---

<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:** [March 23, 2023, 3:25am UTC](https://discuss.elastic.co/t/io-netty-handler-ssl-sslhandshaketimeoutexception-handshake-timed-out-after-10000ms/326117/8 "2023-03-23T03:25:30Z")

</div>

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