Unable to connect to MQTT

MQTT broker giving me this error: Connect failed: AMQJSC0001E Connect timed out. when i tried connecting to the mqtt broker. please assist

Hi @yimin1994

welcome to the HiveMQ Community! We’re excited to have you join us, especially because of your interest in MQTT and the HiveMQ broker. It’s great to see new users like you.

I’m sorry to hear about the issue you’re encountering with the MQTT broker. To better assist you, could you please provide some additional details?

  1. Which client are you using? Are you utilizing the HiveMQ WebSocket client as at here (MQTT Websocket Client), or are you using a different one?

  2. Can you confirm the host of the broker you’re trying to connect to? Is it broker.hivemq.com, or are you attempting to connect to a different broker?

  3. Are you using the default port 8884 for the connection, or have you configured a different port?

  4. Lastly, are you utilizing SSL for the connection, or is it a non-SSL connection?

Providing this information will help us diagnose the issue more effectively and provide you with the appropriate assistance.

Dasha from HiveMQ Team

I am able to connect with my Hivemq cluster URL : 865c5779b51940bd883f75a227fefd05.s1.eu.hivemq.cloud using AsynchMQTT library with Wifi but unable to connect with Ethernet Module W5500 module. Although it connects to the free mqtt without TLS successfully but not using TLS using Asynch MQTT. Please help me in connecting using Ethernet module. I get following log on serial port: Ethernet.localIP()=




Connecting to MQTT…

[ATCP] connect: error = -6