Scada-LTS
Scada-LTS copied to clipboard
MQTT data source stops communicating with broker after PC restarts or comes back from sleep mode
Describe the bug The MQTT datasource stops communicating with the configured broker after the PC restarts or comes back from sleep mode. It only returns to normal if we switch it 'off' and back 'on' again manually.
To Reproduce
- Set up a MQTT data source
- Let it run for a few minutes to check if it's working fine
- Restart the computer or put it on sleep mode
- Check the last timestamp of the data points of the MQTT data source and you'll see it holds the last info before the restart/sleep mode
Expected behavior Well, as all the other data sources, it should restablish communication automatically as the server is on again.
Desktop:
- OS: Windows 11
- Browser: Microsoft Edge, Chrome and Firefox
- Version: Scada-LTS 2.7.5.2 and Scada-LTS 2.7.5.3 (I haven't checked for the latest releases)
Thanks in advance for your support and attention.
Hi @eng-rodrigo-lobo, You mean you have a broker on one computer, that computer goes into sleep mode, or you reboot it, and the MQTT data source in Scada-LTS on another computer does not bear the connection to that broker, when does it go back to normal?
For future reference, it's a good idea to check the operation of the application on the latest release version before reporting a bug. Although in this case, from what I remember, we didn't do the MQTT fixes....
Let's check the issue...
Regards, Kamil Jarmusik
Hi @Limraj !
Sorry, I think I didn't give a better overview of the application.
I have a smartmeter at home that provides the information via MQTT. I configured the smartmeter to publish the data to emqx.io (a broker service online). I have configured the Scada LTS in my test bench to subscribe to this topics, so the broker is virtually never down. The problems that I presented before were only at the SCADA LTS side, after the Scada PC went on sleep mode or restarted.
About the lastest releases, I understand and apologize for using old releases, by the time I was installing the system these were the only ones with the windows installer available. Is there an easy way to upgrade versions withou using the installer?
Hi @eng-rodrigo-lobo,
-
"It only returns to normal if we switch it 'off' and back 'on' again manually." you wrote that if you turn data source off and on it works? An analogy to this is restarting an application(and system). During stop and startup, it does the same thing as during the operation of stoping and starting the Data Source. This seems to be a specific behavior of windows in sleep/hibernation state...
-
Generally, in our Data Source MQTT you can configure up to 10 connection attempts after connection failure. In the next release we will allow an unlimited number (Integer.MAX = 2147483647) of times to configure these connection attempts when the connection is lost (try period corresponds to the "Update period" parameter).
-
When the Data Source is not working, do you have any errors, events related to this Data Source when you go to edit it? If so, can you show the content of these messages?
-
You can try with a different version of the protocol, they are supported by different libraries.
-
Upgrade Scada-LTS - First stop tomcat, next backup database(returning from a newer to the previous version may be difficult because some versions involve changes in the database structure), and next you can replace the war file in Scada-LTS/tomcat/webapps (Assuming you used the installer), delete old folder with application (Scada-LTS or ScadaBR) and start tomcat.
-
Could you send the Scada-LTS/tomcat/logs logs?
Regards, Kamil Jarmusik
Hi @Limraj !
Just to give you some feedback, I updated ScataLTS to the latest realease 2.7.6 and it is working fine.
Maybe it was some bug from older releases, but as I updated the software the datasource started working fine.
Thanks for your attention in this topic!