HiveMQ Public Broker disconnects randomly and cannot reconnect

Hi,
Recently I noticed that the public Broker disconnects my .net client without reason at random intervals and when I try to reconnect, it does not allow the connection for a random period of time. My code hasn’t changed for about a year and before that everything was working fine. I connect to the public broker: broker.hivemq.com / 1883 / V500 and when I try to connect again I get the message: (Reson: “UnspecifiedError”) (Exception: Error while authenticating. Connection closed.). I am using .NET 7 library - MQTTnet. I also connect to other brokers, including HiveMQ Clusters, and only the Public version has such problems. I’m using PingReq to hold the session and I send it every minute so it’s not an inactivity problem. I upgraded the version from V311 to V500, unfortunately it didn’t change anything. I’m not using any username or password bacause it’s public so don’t know why there is ‘authentication’ problem. Is there anything more I can do or is there something I don’t know about?

Hello @de4,

Greetings! We’re thrilled to have you here, showing interest in MQTT and the HiveMQ broker. Welcome to the HiveMQ Community! We’re always happy to see new users.

From your description, it seems network issues might be affecting the connection between your .NET client and the public broker. To assist you better, we need the following information:

  1. Exact Time and Date:
  • Could you please provide the exact date and time (including timezone) when you experienced the disconnections or connection denials with the public broker?
  1. Exact Client ID:
  • What is the exact Client ID of your affected .NET client that is facing these issues?
  1. Connection Step - Reason Code:
  • If the connection fails, do you always observe the same error, i.e. “Reson: “UnspecifiedError”) (Exception: Error while authenticating. Connection closed.”?

Your cooperation in providing these details will enable us to conduct a more thorough investigation and offer targeted assistance.

Feel free to reply with the information when you have it. Thank you.

Best regards,
Dasha from HiveMQ Team

Hello,

Thank you for your answer. Currently, the problem has disappeared from the horizon. Anyway, I’m sending data regarding the problem. Of course, this is only a small part of the logs.

Client ID was:
HiveMQ_Public_CEMonitorAppCloud

Logs:
2024-01-19 11:42:38.425 +01:00 [ERR] MqttClient disconnected… (Reson: “NormalDisconnection”) (Exception: null)
2024-01-19 11:43:06.079 +01:00 [ERR] Mqtt client connection problems (Ping failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:43:06.099 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) check #2 (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:44:06.749 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:44:06.794 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:45:07.039 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:45:07.051 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:47:03.232 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:47:03.232 +01:00 [ERR] MqttClient disconnected… (Reson: “UnspecifiedError”) (Exception: Error while authenticating. Connection closed.)
2024-01-19 11:47:03.244 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:48:03.454 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:48:03.461 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:49:03.662 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:49:03.676 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:49:03.663 +01:00 [ERR] MqttClient disconnected… (Reson: “UnspecifiedError”) (Exception: Error while authenticating. Connection closed.)
2024-01-19 11:50:03.871 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:50:03.878 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:51:04.083 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:51:04.094 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:52:04.364 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:52:04.376 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:53:04.590 +01:00 [ERR] Mqtt client connection problems…(ConnectAsync failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 11:53:04.591 +01:00 [ERR] MqttClient disconnected… (Reson: “UnspecifiedError”) (Exception: Error while authenticating. Connection closed.)
2024-01-19 11:53:04.600 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) after creation (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 15:14:12.686 +01:00 [ERR] MqttClient disconnected… (Reson: “NormalDisconnection”) (Exception: null)
2024-01-19 15:14:42.886 +01:00 [ERR] Mqtt client connection problems (Ping failed) (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)
2024-01-19 15:14:42.898 +01:00 [ERR] Mqtt client connection problems (mqttClient.IsConnected == false) check #2 (“HiveMQ_Public”/MQTTnet.Client.MqttClientOptions)