# Caught exception while handling client http traffic, closing connection

**URL:** https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/357567
**Category:** Elasticsearch
**Tags:** fleet
**Created:** [April 17, 2024, 6:32am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/357567 "2024-04-17T06:32:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sudharsanam132](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sudharsanam132](https://discuss.elastic.co/u/sudharsanam132)
#### Post date: [April 17, 2024, 6:32am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/357567/1 "2024-04-17T06:32:28Z")

</div>

While adding fleet I have this warning in elasticsearch repeatedly

log:

```auto
[chamber1] caught exception while handling client http traffic, closing connection
 Netty4HttpChannel{localAddress=/192.168.1.78:9200, remoteAddress=/192.168.1.131:58684}
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate

```

My fleet conf is

```auto

./elastic-agent install --url=https://mail.sbatest1.com:8220 \
  --fleet-server-es=https://192.168.1.78:9200 \
  --fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE3MTMzMzI5ODQ1MDc6eWJ6a2pWQzBRdTZUbXZpWlBhR1hpQQ \
  --fleet-server-policy=fleet-server-policy \
  --certificate-authorities=/tmp/certs/ca.crt \
  --fleet-server-es-ca=/tmp/certs/http_ca.crt \
  --fleet-server-cert=/tmp/certs/fleet-server.crt \
  --fleet-server-cert-key=/tmp/certs/fleet-server.key \
  --fleet-server-port=8220

```

---

<div class="post-metadata">

### Author: ![Julia\_Bardi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julia_bardi/32/79463_2.png) [@Julia\_Bardi](https://discuss.elastic.co/u/Julia_Bardi)
#### Post date: [May 21, 2024, 9:48am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/357567/2 "2024-05-21T09:48:42Z")

</div>

It sounds like something is wrong with the certificate or CA config. Are you sure the `fleet-server-es-ca` is correct?

---

<div class="post-metadata">

### Author: ![sudharsanam132](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sudharsanam132](https://discuss.elastic.co/u/sudharsanam132)
#### Post date: [May 21, 2024, 10:11am UTC](https://discuss.elastic.co/t/caught-exception-while-handling-client-http-traffic-closing-connection/357567/3 "2024-05-21T10:11:12Z")

</div>

Not sure , But after i tried with finger print without mentioning the certificate elasticsearch automatically creates certificate for fleet.

And then I didnt look upon the same error

thanks for the reply
