Page 1 of 2
Problem with dashboard graphs
Posted: Thu 09 Jul 2020 9:46 am
by freddie
Running 3.6.11 since this time yesterday. I'm seeing the following JSON response when viewing certain data types in the Interface charts:
Code: Select all
{"Title":"Unexpected Error","ErrorCode":"NullReferenceException","Description":"Object reference not set to an instance of an object"}
Daily rain and daily temperature are okay. The rest give this response.
Nothing being logged in MXDiags, and nothing in the terminal window.
It was working okay an hour or so ago.
Restarting MX has fixed it.
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 11:09 am
by sfws
I'm not seeing daily temperature charts in admin interface. Instead, I get an error message:
Code: Select all
Highcharts error #15: www.highcharts.com/errors/15/
All the other charts are okay for me in 3.6.11 admin interface.
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 11:21 am
by rogerthn
Do you mean like below?
Annotation 2020-07-09 131939.png
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 1:18 pm
by mcrossley
freddie wrote: ↑Thu 09 Jul 2020 9:46 am
Running 3.6.11 since this time yesterday. I'm seeing the following JSON response when viewing certain data types in the Interface charts:
Code: Select all
{"Title":"Unexpected Error","ErrorCode":"NullReferenceException","Description":"Object reference not set to an instance of an object"}
Daily rain and daily temperature are okay. The rest give this response.
Nothing being logged in MXDiags, and nothing in the terminal window.
It was working okay an hour or so ago.
Restarting MX has fixed it.
At the moment I'm struggling to see how that could happen. The GraphData list has no concept of null entries, and the list is just iterated from start to end, I'll do some more staring and see if I can figure out how a null entry gets generated...
sfws wrote: ↑Thu 09 Jul 2020 11:09 am
I'm not seeing daily temperature charts in admin interface. Instead, I get an error message:
Code: Select all
Highcharts error #15: www.highcharts.com/errors/15/
All the other charts are okay for me in 3.6.11 admin interface.
Highcharts error 15 appears to be that the data is not sorted in date order. Again hard to see how this has happened as new data is always append to the end of the list and old data popped off the start.
The code the add/remove entries from the list hasn't changed, the only difference from previous builds is that I use a StringBuilder to create the output JSON text rather than concatenating strings.
Of course I am seeing neither issue on my live or dev instances of MX
I take another look this evening and see if inspiration strikes!
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 1:35 pm
by HansR
I'd guess it has to do with the cache.
When changed, empty the cache and refresh (try again) often helps with these graphs (same as with my own playground)
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 2:13 pm
by freddie
HansR wrote: ↑Thu 09 Jul 2020 1:35 pm
I'd guess it has to do with the cache.
I had ruled out the cache, as I was getting the same response when using wget (and cURL).
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 2:39 pm
by PaulMy
I am not seeing the issue and all charts looks good here in dashboard, and also
www.komokaweather.com/cumulusmx/index.php
Enjoy,
Paul
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 3:22 pm
by Mapantz
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 6:26 pm
by LAdrain
I am not sure if I am seeing a similar error?? It looks like when i run the exe it is not picking up any history.
2020-07-09_18h57_38.jpg
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 6:42 pm
by mcrossley
That looks like it isn't even trying to get the history data. Do you have the logger enabled?
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 7:10 pm
by LAdrain
logging is on. It just runs straight through, before it showed a percentage.
Re: Problem with dashboard graphs
Posted: Thu 09 Jul 2020 7:48 pm
by water01
Well I don't know what I did right but mine is working perfectly since I installed the release just after Mark put it up.
Re: Problem with dashboard graphs
Posted: Fri 10 Jul 2020 7:54 am
by sfws
I did not look at web graphs yesterday, but the daily temperature is not plotting there.
Further investigation this morning has revealed that my problem is incorrect generation of json, both api, and web versions of "dailytemp.json" are being generated with just a single time, instead of 30 days worth of time, value pairs.
Code: Select all
{"mintemp":[[1594166400000,15.2]],"maxtemp":[[1594166400000,18.7]],"avgtemp":[[1594166400000,16.0]]}
I have tried changing between 31 and 30 days in the graph section of station settings, and it makes no difference.
I have tried stopping MX, and restarting MX, it makes no difference. I even tried leaving MX off last night, but it made no difference.
Excerpt from MXDiags after restarting this morning:
2020-07-10 08:22:44.513 Loaded 581 entries to graph data list
That seemed encouraging as yesterday it was loading half that number, but as seen above, still only one time, value pair and no graph for daily temperature.
water01 wrote: ↑Thu 09 Jul 2020 7:48 pm
Well I don't know what I did right but mine is working perfectly since I installed the release just after Mark put it up.
David 1) uses a Fine Offset 2) he uses Windows 10 and 3) is plotting a month like I want to at
http://www.dmjsystems.co.uk/weatherbos/trends.php, so if he is having no problems as per immediate preceding post, then we can rule those 3 factors out and I can't think what could be different between his install of MX and mine. Not what did he do right, but what did I do wrong? Of course I was busy during most of day and did not stop to install new MX until tea-time Wednesday. I installed every file in the release, I did not look at which files had changed and only install those.
Re: Problem with dashboard graphs
Posted: Fri 10 Jul 2020 8:46 am
by mcrossley
LAdrain wrote: ↑Thu 09 Jul 2020 7:10 pm
2020-07-09_20h09_25.jpglogging is on. It just runs straight through, before it showed a percentage.
Start a new thread please as this is unrelated. I will need to see a log with MX started using the -debug parameter, thanks.
Re: Problem with dashboard graphs
Posted: Fri 10 Jul 2020 9:04 am
by mcrossley
@freddie - I have found that the graph data is not created/accessed in a thread safe manner, this could possibly cause issues, I don't know if it caused your problem but it needs fixing anyway.
@sfws - The above may also have affected you for the Highcharts error 15. The only explanation I have come up with is a system clock adjustment of greater than 1 minute backwards at some point (unlikely I think).
Your daily temps is a puzzle as well. That data is for the 8th July, iirc you use a 9am rollover, so its just the last entry.
Your log should have an entry "Loaded nnn entries to daily data list" at start-up?