# Error closing inbound of SSL/TLS connection

**URL:** <https://forum.cirrus-link.com/t/error-closing-inbound-of-ssl-tls-connection/278>\
**Category:** Chariot MQTT Server\
**Created:** [October 31, 2022, 6:02pm UTC](https://forum.cirrus-link.com/t/error-closing-inbound-of-ssl-tls-connection/278 "2022-10-31T18:02:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylor.koch](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@taylor.koch](https://forum.cirrus-link.com/u/taylor.koch)\
**Post date:** [October 31, 2022, 6:02pm UTC](https://forum.cirrus-link.com/t/error-closing-inbound-of-ssl-tls-connection/278/1 "2022-10-31T18:02:29Z")

</div>

Hello and apologies if this is the wrong place for this question.

I am having an issue with a (Python) paho-mqtt client connection receiving a [SSL: TLSV1\_ALERT\_INTERNAL\_ERROR] tlsv1 alert internal error from Chariot (and crashing) when the “Stop server” button is clicked (or the service is stopped) on the Chariot broker.  
On the Chariot side I see the error:  
“Error closing inbound of SSL/TLS connection with ID ######: closing inbound before receiving peer’s close\_notify”

Normally, my Python client will “walk” to the next available server if the server it is connected to goes down. This is tested to be working on:

- Chariot without SSL
- Mosquitto broker with/without SSL
- Chariot with SSL \*\*\* ONLY if the docker container containing Chariot is restarted, or if access to port 8883 is blocked via firewall \*\*\*\*

There seems to be something in the Chariot shutdown process that is causing this error. Preliminary Googling seems to suggest either a bug in JVM 11, or a mix-up in the order of closing the request and the reader.

Any suggestions?

Tested using:

- Both Linux and Windows Chariot v2.2.3
- Python client is using Open SSL 1.1.1q and connected via TLSv1.2

---

<div class="post-metadata">

**Author:** ![chad.kienle](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chad.kienle](https://forum.cirrus-link.com/u/chad.kienle)\
**Post date:** [November 1, 2022, 10:48pm UTC](https://forum.cirrus-link.com/t/error-closing-inbound-of-ssl-tls-connection/278/2 "2022-11-01T22:48:01Z")

</div>

We were able to reproduce this behavior. This is due to the Chariot server forcefully closing the connection with the client on server shutdown and not first attempting a “cleaner” disconnect/closure. The next release of Chariot will have this behavior addressed and the (Python) Paho-MQTT client should experience a cleaner disconnect without errors.  
For now, you should be able to catch the TLSV1\_ALERT\_INTERNAL\_ERROR and attempt any logic (like walking to the next server) without having the application crash.
