# Failing with Connection Return Codes 7

**URL:** <https://community.hivemq.com/t/failing-with-connection-return-codes-7/1673>\
**Category:** HiveMQ Cloud\
**Created:** [December 12, 2022, 10:44pm UTC](https://community.hivemq.com/t/failing-with-connection-return-codes-7/1673 "2022-12-12T22:44:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![acmmanoj](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@acmmanoj](https://community.hivemq.com/u/acmmanoj)\
**Post date:** [December 12, 2022, 10:44pm UTC](https://community.hivemq.com/t/failing-with-connection-return-codes-7/1673/1 "2022-12-12T22:44:41Z")

</div>

I have been testing a python client (Paho) with my local MQTT server (windows 10). It is working fine with passwords and TLS as well.

My Paho python client successfully connects to HiveMQ public mosquito broker using port 1883 without any issues as well!

But when I tried to connect to my hiveMQ cloud broker using port 8883, it fails to connect to the broker with return code 7. According to my understanding MQTT Connection Return Codes are only defined up to 5, can someone explain what causes this error?

I successfully connected to the cloud broker using my Linux mosquito broker using the following command

```auto
mosquitto_sub -h f86f3a7384644b569094607fbe400e2e.s2.eu.hivemq.cloud -p 8883 -u manoj2 -P my_PASSWORD -t my/test/topic

```

But when I tried the same command on the windows 10 mosquito broker it returns the following error

```auto
Error: protocol error

```

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [December 13, 2022, 8:47am UTC](https://community.hivemq.com/t/failing-with-connection-return-codes-7/1673/2 "2022-12-13T08:47:48Z")

</div>

Hi @acmmanoj ,

Great that you are interested in MQTT and HiveMQ, welcome to the community!

Are you following this [Getting started with Paho Python](https://console.hivemq.cloud/clients/python-paho) guide? If so, please indicate which steps of the guide did work correctly for you and at which step you are stuck now.

Tnx,  
Dasha from HiveMQ team

---

<div class="post-metadata">

**Author:** ![acmmanoj](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@acmmanoj](https://community.hivemq.com/u/acmmanoj)\
**Post date:** [December 14, 2022, 7:51pm UTC](https://community.hivemq.com/t/failing-with-connection-return-codes-7/1673/3 "2022-12-14T19:51:06Z")

</div>

@Daria_H

Thanks for the replay. The problem was sorted out. When the TLS certificate is included with the python client, messaging service starts normally. It seems that Ubuntu allows communication with HiveMQ mosquito broker without the certificate whereas Windows no.

Manoj
