-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WeatherService silently stops updating on N4 JACEs #4
Comments
The Application Director Dump Threads output showed this for the unhealthy WeatherService thread:
The lines with 'locked' might be suspicious. I noted that one of the changes between 4.0.1 and 4.0.2 was a change to the API used for fetching URLs, so I have updated the JACE 8000 showing the problem to the 4.0.2 version of this module to see if that helps. |
Unfortunately, I cannot reproduce the error in my environment. However, I am testing 4.0.2 that uses Tridium HttpsConnection class. How is 4.0.2 running on your site? |
Apologies for the delay! I do still appear to have a problem with the 4.0.2 module (JACE 8000 with Niagara 4.7.109.20). Below is the thread dump for the WeatherService thread. It looks a little different as it's using the Tridium class, but still appears to have got stuck in "java.net.SocketInputStream.socketRead0(Native Method)".
|
The thread dump for the WeatherService after I've cleared the problem by cutting and then pasting the WeatherService is:
|
I've just been looking at this again a little. I notice the javax.baja.net.HttpConnection class has two different timeout methods. The one NvBaseReader is using sets up an SO_TIMEOUT (socket timeout) of 30 seconds; setTimeout(). The other sets up a 'connection timeout'; setConnectionTimeout(), which is also possible by calling connect() with a timeout argument. It looks like setting a general timeout using setTimeout() does not set up a 'connection timeout' as you might think, and the default is for there not to be a timeout. With the 4.0.1 versions of this module I'm not sure any timeouts were in place. My guess is that the Internet connection at the site the JACE 8000 is installed on is occasionally flaky, and that can coincide with making the initial connection, causing the WeatherService to lock-up. Do you think adding a call to setConnectionTimeout() as well as setTimeout() might cure this problem I've been seeing? |
The issue described below may not be a problem with the OpenWeatherMap provider itself, but Niagara Community user 'roc' suggested I record the issue here too.
Note: The issue was observed using the 4.0.1 release of this module.
I think the idea would be to add optional extras to the OWM provider that:
Anyway, the issue description as posted on Niagara Community:
_We're getting occasional problems with the WeatherService on some of our JACE 8000s.
We are in the UK and using the OpenWeatherMap Provider kindly provided as open source by Neopsis: https://github.com/neopsis/niagara-weather
I've just been examining the issue on a JACE running N4.7.109.20.
What I see is that the WeatherService stops updating automatically, and using the UpdateWeatherReport action either at the service or report level does not update it either. There are no messages in the Application Director other than the regular station saves and NTP time sync updates.
I tried creating another report under the existing WeatherService, but that would not update either.
I tried disabling and re-enabling the WeatherService, but that did not help.
I tried duplicating the WeatherService to create a WeatherService1. The report within this was then able to update.
My guess is that there is some background thread or timer created when the WeatherService is created during station start-up or on creating a new entry under Services when a station is already running. This has silently died and neither automatic or manual updates occur any more. This is not removed and recreated when you disable and then re-enable the WeatherService, so doing that does not fix the issue.
The best workaround I have found is to 'cut' the WeatherService and 'paste' it back in the same location in the Services folder, then renaming it back from WeatherService1 to WeatherService. Getting it running again this way preserves any links in/out of the WeatherService (e.g. we use the current external temperature from the WeatherService in an average of the site's OAT sensor readings).
Can anyone shed any further light on what's going on and why there are no Application Director messages about failures to update?
Perhaps as a first step towards resolving this sort of issue Tridium can think about updating the WeatherService so the disabling and re-enabling the WeatherService would recreate this background thread/timer too?_
The text was updated successfully, but these errors were encountered: