Error "An existing connection was forcibly closed by the remote host" in MQTT CLI

Hi,
When I tried to connect to the hivemq broker using MQTT CLI, im getting the error “An existing connection was forcibly closed by the remote host”. The hostname, username and password’s are correct. I don’t know why it is showing this error. Can you please let me know how to resolve this error?

Hello @Shaku ,

Could you please confirm if the broker is a HiveMQ Cloud broker, or if this is a HiveMQ Community/Professional/Enterprise Edition broker deployment?

If this is a HiveMQ Cloud deployment, be sure to include the option ‘-s’ when sending the con request, as the HiveMQ Cloud broker requires TLS.

If this is not a Cloud broker deployment, please share the event.log and hivemq.log from the hivemq/logs directory of the Broker you are looking to connect to.

Best,
Aaron from the HiveMQ Team

Hi @AaronTLFranz ,

The broker is a HiveMQ community edition broker deployment. Attached the event.log file as you requested. It is working in my system when i try to connect. But when my colleague tried to use the same credentials, we are getting the above error. Can you please let us know why is this occurring?

Hello @Shaku

  • Is HiveMQ CE hosted on your local computer? Share more details regarding your HiveMQ CE deployment.
  • Are you using any HiveMQ extension to authenticate MQTT clients?
  • Have you checked for any firewall blocks that might be preventing your colleague from connecting?
  • Can you please share the full MQTT CLI command used?

Kind regards,
Diego from HiveMQ Team

@Diego Below are the answers for your questions:

  • We are hosting the hiveMQ CE in Azure.

  • we are using an Hivemq extension to authenticate mqtt clients.

  • The command he used is provided below
    con -h hostname -p 8883 -u alice@example.com -pw UuIayuioGoby6mljqhaq --cafile C:/Users/alice/Downloads/CACertificate.pem
    [In the place of hostname, i will put my hostname]

Hello @Shaku ,

Thank you for the additional details.

A few more pieces to confirm :

  • Which HiveMQ extension is currently being used to authenticate MQTT clients?
  • Has port 8883 been opened both in Azure, as well as on the network the client you are looking to connect is on?
  • Has port 8883 been configured as the listener port for the HiveMQ deployment? The default port for HiveMQ CE is 1883. The cloud broker is 8883, so I want to be certain on this point.
  • Is the client able to connect when not using TCP-TLS?

Best,
Aaron from HiveMQ Team