HiveMQ

Connecting to cluster on HiveMQ cloud using Paho C client

Hi,

I am unable to connect to HiveMQ cluster using Paho C client

I tried using the following URL

“mqtts://b2875e8f26514134af6a25b6a3dfa45a.s1.eu.hivemq.cloud:8883”

and

“tcp://b2875e8f26514134af6a25b6a3dfa45a.s1.eu.hivemq.cloud:8883”

…with appropriate username and password

but the client is not able to connect to the broker.

Return code is -1 which means “A generic error code indicating the failure of an MQTT client operation.” according to the following link.

https://www.eclipse.org/paho/files/mqttdoc/MQTTClient/html/_m_q_t_t_client_8h.html#af33a6d6c0e8a6a747bf39638e0bba36b

Please advice.

Thanks.

Regards,
Harsha

Hello Harsha,

Thanks for reaching out. I did quick test to connect the HiveMQ cloud cluster Using MQTT CLI. I have followed steps mentioned at Quick Start Guide.

If it is feasible, please do a quick test if you can connect the HiveMQ Cloud with MQTT CLI. You may need to contact Paho mailing list to get this issue resolved if you can connect broker using MQTT CLI.

Kind Regards,
Sheetal

1 Like