REST Server Not Starting
Quote from pythontom on 24/05/2024, 10:11We are using the REST server to cleanly shut the RTSA suite down from a script but are finding that even though it is enabled in the settings is doesn't always start and then needs re-enabling to start it again when the software is next enabled.
We are using "Aaronia-RTSA-Suite-PRO.sh" to launch the software, is there any way we can ensure the REST server starts everytime?
We are using the REST server to cleanly shut the RTSA suite down from a script but are finding that even though it is enabled in the settings is doesn't always start and then needs re-enabling to start it again when the software is next enabled.
We are using "Aaronia-RTSA-Suite-PRO.sh" to launch the software, is there any way we can ensure the REST server starts everytime?
Quote from mm_dev on 24/05/2024, 11:36Not sure I fully understand what you're saying. Is the REST server not starting after you terminate the RTSA using it, or is it actually getting disabled between starts? Is it only when using the REST server to shutdown the RTSA (and how exactly are you doing that), or also with regular UI usage? Is there anything mentioned in the log files? (Extras -> Data -> Debug Log Files)
Also I assume you've only checked this on Linux, correct?
Not sure I fully understand what you're saying. Is the REST server not starting after you terminate the RTSA using it, or is it actually getting disabled between starts? Is it only when using the REST server to shutdown the RTSA (and how exactly are you doing that), or also with regular UI usage? Is there anything mentioned in the log files? (Extras -> Data -> Debug Log Files)
Also I assume you've only checked this on Linux, correct?
Quote from pythontom on 24/05/2024, 11:44Sorry, I'll try and explain better... 🙂
So, we have enabled the rest server and if we start RTSA manually it starts up fine between sessions, and generally when we are launching using "Aaronia-RTSA-Suite-PRO.sh" it does start up.
But, sometimes when RTSA is started the rest server doesn't start and when I look in the settings it has been disabled, so then we have to re-enable it. This sometimes is caused by a crash of RTSA but sometimes even when the software shuts cleanly.
We are using the application in an unmonitored location so need to the rest server to be started every time as we are using it to close the software cleanly from our script. We are using "/app/process" and "running: false" to close it.
So, what I would like to try and do is programmatically make sure the rest server is always enabled before we launch the software.
Sorry, I'll try and explain better... 🙂
So, we have enabled the rest server and if we start RTSA manually it starts up fine between sessions, and generally when we are launching using "Aaronia-RTSA-Suite-PRO.sh" it does start up.
But, sometimes when RTSA is started the rest server doesn't start and when I look in the settings it has been disabled, so then we have to re-enable it. This sometimes is caused by a crash of RTSA but sometimes even when the software shuts cleanly.
We are using the application in an unmonitored location so need to the rest server to be started every time as we are using it to close the software cleanly from our script. We are using "/app/process" and "running: false" to close it.
So, what I would like to try and do is programmatically make sure the rest server is always enabled before we launch the software.
Quote from mm_dev on 24/05/2024, 12:54Well, quick look through the code shows that the server will be disabled automatically whenever it receives a socket error. Unfortunately the corresponding error message is not made available to the UI, but it should show up in the logfiles. Depending on when this error appears (at termination or at startup) you may need a different solution.
There is no API for adjusting the global RTSA configuration. The only option I'd see right now would be to check the AppManager.xml config file, but for obvious reasons you're on your own when you start to manually mess with the config files (these are considered implementation details and can change without notice).
And if the socket error that causes the server to become disabled appears after the software is (re)started that option isn't going to work anyway.
Well, quick look through the code shows that the server will be disabled automatically whenever it receives a socket error. Unfortunately the corresponding error message is not made available to the UI, but it should show up in the logfiles. Depending on when this error appears (at termination or at startup) you may need a different solution.
There is no API for adjusting the global RTSA configuration. The only option I'd see right now would be to check the AppManager.xml config file, but for obvious reasons you're on your own when you start to manually mess with the config files (these are considered implementation details and can change without notice).
And if the socket error that causes the server to become disabled appears after the software is (re)started that option isn't going to work anyway.