RIO MQTT set up & validation error in: MqttString.java

Hi Opto22 folks,

I am unable to get a connection validated to our MQTT broker (Solace). I am not using SSL, authentication or certs, etc.

ERROR|2023-12-05 13:25:39,409|MqttString.java|805|MQTT protocol connection attempt to broker failed waiting for validation tcp://10.29.1.224:1883.

The logs indicate that the connection is made, etc. The RIO tools can ping & detect the IP addr and open port 1883.

I have a home lab set up where there are no issues with the OPTO22 RIO. The home broker is Mosquitto, or Moquette. Also no authentication, etc.

A java paho (no username, or however the paho defaults are being set) publisher connects & validates fine via the RIO MM2 shell on the box, using identical configuration, to the same Solace MQTT broker, that I am targetting when setting up and configuring with the groov RIO browser UI.

Is there any other diagnostic I can enable to get more granularity to the ERROR failure above in your: MqttString.java ??

Update firmware? Delete the entire config and re-enter?

Any suggestions?

On your RIO, it would be best to be using firmware 3.5.0 or newer. Upgrade if you need too.
If you have continued issues, what parameters are you using to connect to the broker. The MQTT Client can be a little slow to resolve the name so additional connection timeout could help too.

I set up a Solace Account with a DMR Cluster at AWS Virginia (USA).
On a RIO using 3.5.0 I set up the MQTT Server configuration and it connects. Here is the log message (with the host name slightly blotted out).

INFO|2023-12-07 08:16:19,315|MqttString.java|853|Connecting to broker tcp://mr-connection-xxxxxxxxx.messaging.solace.cloud:1883;client id=OPTO5D070E130E5F2D3F;keep alive=10;conn timeout=5;

INFO|2023-12-07 08:16:21,054|MqttString.java|960|Connected to MQTT broker tcp://mr-connection-xxxxxxxxx.messaging.solace.cloud:1883.

Hi @bryce ,
I made the firmware update:

System Version3.5.0-b.46
System Build Time8/11/2023
4:00:46 AM
  • Data Service: MQTT string re-config:
    • u/n: bxr (required)
    • p/w: none (option)
    • client id: hb2 (option)
    • SSL: none (therefore no certs required)
  • connection fails with same message series:
ERROR|2024-02-06 21:24:44,505|MqttString.java|896|MQTT protocol connection attempt to broker failed waiting for validation tcp://10.29.1.224:1883.

INFO|2024-02-06 21:24:44,614|TestTcpConnection.java|74|Test connection attempt to 10.29.1.224:1883 succeeded.

INFO|2024-02-06 21:24:49,640|MqttString.java|853|Connecting to broker tcp://10.29.1.224:1883;client id=*User Provided*;keep alive=10;conn timeout=5;

NOTE that I am able to SSH into the device, and start a java PAHO mqtt client with a heartbeat message to a topic, and all is validated to the Solace mqtt broker.

For your mqtt client, is there a way to turn on more debug granularity?

Can we get snippet of the MqttString.java source codes?

Why does the test connection succeed, while broker protocol connect fails at validation, when no password is configured, and so on.

It seems that your result has similar config, other than going with the auto client ID versus specified option (I tried the auto clientID also; same failure in the log)

Im having this exact issue. Test connect succeeds but connection fails. Any chance a resolution was found?

Solace shut down my free account and they have ignored requests to renew a temporary account.

Try increasing the MQTT Server connection timeout to 10 seconds.

1 Like

Same result with longer timeouts …

INFO|2024-02-14 18:51:07,056|DataService.java|205|*** Data Service is starting up.
INFO|2024-02-14 18:51:08,744|MqttString.java|1062|MQTT String Protocol Started.
INFO|2024-02-14 18:51:09,099|DevicesConfiguration.java|138|Starting devices cpdet.
INFO|2024-02-14 18:51:11,313|MqttString.java|853|Connecting to broker tcp://10.29.1.224:1883;client id=*User Provided*;keep alive=20;conn timeout=15;

INFO|2024-02-14 18:51:12,757|MiddleCallback.java|214|Device cpdet Connected with 15 Tags.

ERROR|2024-02-14 18:51:27,607|MqttString.java|896|MQTT protocol connection attempt to broker failed waiting for validation tcp://10.29.1.224:1883.
INFO|2024-02-14 18:51:27,741|TestTcpConnection.java|74|Test connection attempt to 10.29.1.224:1883 succeeded.

INFO|2024-02-14 18:51:42,774|MqttString.java|853|Connecting to broker tcp://10.29.1.224:1883;client id=*User Provided*;keep alive=20;conn timeout=15;

This catches some of the client restart phase …

Some brokers like AWS have a 7 slash \ limit in the Topic. They will connect briefly and then disconnect on a protocol error. Both the RIO and Epic can exceed this limit when trying to get points at the IO level. You might want to try a different broker like Hive or Mosquitto. If you must use AWS Sparkplug may be your best bet.