MQTT client from Groov EPIC node red keep getting disconnected to azure eventgrid MQTT broker

Hi,

I am running MQTT broker in microsoft azure eventgrid and I have generated certificates and keys to connect the Grooc EPIC nodered MQTT out client to eventgrid mqtt broker. When I deploy i could see it is connected for 10 seconds. After that it got disconnected and every few seconds it is showing connecting and got disconnected again. I have followed microsoft azure eventgrid tutorials for this and they gave examples for mqttx app for testing purpose. I am not sure what I am missing here and why it is getting disconnected every few seconds and ultimately i am not able see the sensor data in the cloud. Please help me to fix the problem. Thanks in Advance.

Regards,
Baskaran

We have seen that connect/disconnect cycle on other customer initial setups.
It always comes down to network connections, miss-configured broker/client or certificate issues.

Can you share your network setup, both from a high level and then what the groov Manage network screens look like.
Then some screenshots of the broker and groov Manage native Data Server connection screens look like.

With that information hopefully myself, @greichert and others that have experience with different broker setups can get you up and connected.

Hi,

Sorry for the delay in reply. I have fixed the issue by creating both subscription and publish permission to the topic in the cloud. Thanks

1 Like

Please help to fix the error shown in the snap

There is not really enough information to go on here.
Have you looked at the Data Service Logs?
At a guess, it would be a configuration issue rather than an issue with the groov Device.

Hi Beno- Thanks for your revert. PFA the data service log
mqtt (1).zip (118.5 KB)

When you read your log, what did you see?

1 Like

INFO|2024-07-11 00:07:57,765|MqttSparkplug.java|1646|Connecting to MQTT server tcp://twinalytics-event-grid.centralus-1.ts.eventgrid.azure.net:8883;bdSeq=73;server ver=MQTT_3;keep alive=10 sec;conn timeout=5000 ms;min free space=600;hist payld=1000;primary id=topic;primary spec=SPEC_2_0;compression=NONE.
ERROR|2024-07-11 00:07:59,008|MqttString.java|843|MQTT protocol connection attempt to server failed waiting for validation tcp://twinalytics-event-grid.centralus-1.ts.eventgrid.azure.net:8883.
INFO|2024-07-11 00:07:59,360|TestTcpConnection.java|74|Test connection test to twinalytics-event-grid.centralus-1.ts.eventgrid.azure.net:8883 succeeded.
WARN|2024-07-11 00:07:59,360|MqttString.java|950|Closing client threw com.hivemq.client.mqtt.exceptions.ConnectionClosedException: Server closed connection without DISCONNECT…
ERROR|2024-07-11 00:08:03,784|MqttSparkplug.java|1688|Connection attempt to MQTT server failed waiting for validation tcp://twinalytics-event-grid.centralus-1.ts.eventgrid.azure.net:8883.
INFO|2024-07-11 00:08:04,131|TestTcpConnection.java|74|Test connection test to twinalytics-event-grid.centralus-1.ts.eventgrid.azure.net:8883 succeeded.

ERROR|2024-07-11 00:07:59,008|MqttString.java|843|MQTT protocol connection attempt to server failed waiting for validation tcp://twinalytics-event-grid.centralus-1.ts.eventgrid.azure.net:8883.

protocol connection attempt to server failed waiting for validation

That seems to be the problem, don’t you agree?

Yes sir. Request you to please help to fix this issue

Since you are getting a validation error, I suggest that you check the things that might be invalid.

  • Broker URL
  • Broker SSL certificates
  • Broker Key
  • Broker username
  • Broker password
  • Broker topics exist
  • Broker topic path layer is less than 7 slashes (/) deep
  • Publication payload size (ie, less than 128Kb)
  • Current version of EPIC or RIO firmware is in use
  • EPIC / RIO network settings
  • EPIC / RIO can ping the broker from their groov Manage network tools
  • EPIC / RIO can see the open port on the broker from groov Manage network tools

Mqtt node gets connected intermittently ie its status fluctuates from “disconnected” to “connecting” & then “connected” & then back to “disconnected”. Kindly help to get it connected consistently




@gazalam, please see my post above yours just now.
It contains the things you need to check that can be causing the issue you describe.