Page 1 of 2

CumulusMX Version 3025 to Version 3028 RPi2 - Update - Fixed

Posted: Wed 05 Aug 2015 12:42 pm
by pete_c
Just a recap relating to my update.

Base RPi2 using:

CumulusMX# uname -a
Linux ICS-Cumulus 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux


CumulusMX# mono -V
Mono JIT compiler version 3.12.1 (tarball Fri Mar 6 23:28:08 UTC 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. http://www.mono-project.com
TLS: __thread
SIGSEGV: normal
Notifications: epoll
Architecture: armel,vfp+hard
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen


CumulusMX is sitting in the root directory of the Rasberry Pi 2 (IE: /CumulusMX)

Backed up CumulusMX directory V.25. Unzipped Cumulus V.27 to root directory. (copied over all new V.27 files over to old directory rewriting older files then copied over INI file from V.25.

Am I doing this wrong?

Started fine then see this in the console. Local Browser GUI looks fine to me.

Type Ctrl-C to terminate
7:29:08 AM Downloading Archive Data
7:29:28 AM Normal running
System.NullReferenceException: Object reference not set to an instance of an object
at ?.? (Int32 ?) [0x00000] in <filename unknown>:0
at ?.? () [0x00000] in <filename unknown>:0
at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0
**** An error has occurred - please zip up the MXdiags folder and post it in the forum ****
Press Enter to terminate


MXDiags file shows:

2015-08-05 07:29:17.829 Loaded archive record for Page=0 Record=4 Timestamp=1/1/1900 12:00:00 AM
2015-08-05 07:29:17.829 Ignoring old archive data
bad CRC
2015-08-05 07:29:28.640 Updating highs and lows
2015-08-05 07:29:28.646 Start normal reading loop
2015-08-05 07:29:28.666 Start Timers
2015-08-05 07:29:28.667 Starting 1-minute timer
2015-08-05 07:29:28.672 Attempting realtime FTP connect
2015-08-05 07:29:29.701 Starting Realtime timer, interval = 30 seconds
System.NullReferenceException: Object reference not set to an instance of an object
at . (Int32 ) [0x00000] in <filename unknown>:0
at . () [0x00000] in <filename unknown>:0
at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0
2015-08-05 07:30:04.355 Writing log entry for 8/5/2015 7:30:04 AM
2015-08-05 07:30:04.364 Written log entry for 8/5/2015 7:30:04 AM
2015-08-05 07:30:04.369 Writing today.ini, LastUpdateTime = 8/5/2015 7:30:04 AM raindaystart = 13.75 rain counter = 13.75
2015-08-05 07:30:04.373 INSERT IGNORE INTO Monthly (LogDateTime,Temp,Humidity,Dewpoint,Windspeed,Windgust,Windbearing,RainRate,TodayRainSoFar,Pressure,Raincounter,InsideTemp,InsideHumidity,LatestWindGust,WindChill,HeatIndex,UVindex,SolarRad,Evapotrans,AnnualEvapTran,ApparentTemp,MaxSolarRad,HrsSunShine,CurrWindBearing,RG11rain,RainSinceMidnight,WindbearingSym,CurrWindBearingSym) Values('15-08-05 07:30',64.3,95,62.8,0.0,0.0,0,0.00,0.00,30.014,13.75,67.3,50,0.0,64.3,64.3,0.0,0,0.000,0.000,68.7,184,0.0,0,0.00,0.00,'N','N')
2015-08-05 07:30:04.381 MySQL: 1 rows were affected.


Looks like a simple error here relating to my data.

Not sure exactly if I updated correctly.

Downgraded back to V.25. Here is startup of Version 25

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 12:59 pm
by steve
Could you attach the MX diags file, please, so I can attempt to decode the stack trace? Pasting it here seems to have done odd things to the characters that it uses. From what I can see, it looks like Mono has had a problem starting a thread, possibly for a timer.

The recommended way to upgrade is to take a copy of your installation and then unzip the new version into your existing installation.

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 1:06 pm
by pete_c
Thank you Steve.

Yes; just copied over new V.27 files to older V.25 directory and recopied INI file from old V.25 to new V.27 directory.

BTW yesterday upgrading to CumulusMX V.26 saw the same thing.

Here is the MXDiag file.

Should I upgrade Mono?

Downgraded back to V.25. Here is the startup. No issues to report.

Cumulus MX v.3.0.0 build 3025
This is pre-release beta software
Today.ini = data/today.ini
Last update=8/5/2015 7:20:00 AM
Connected to station
8:15:00 AMDownloading Archive Data
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
8/5/2015 8:15:01 AM
Type Ctrl-C to terminate
8:15:11 AMDownloading Archive Data
8:15:24 AMNormal running

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 1:28 pm
by steve
pete_c wrote:Yes; just copied over new V.27 files to older V.25 directory and recopied INI file from old V.25 to new V.27 directory.
Sorry, I can't follow that. If you have just copied build 3027 over your existing installation, where are you copying the Cumulus.ini file from, and why? It should already be there.

How is your station connected to the Pi?

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 1:36 pm
by pete_c
Sorry, I can't follow that. If you have just copied build 3027 over your existing installation, where are you copying the Cumulus.ini file from, and why? It should already be there.
Initially I stopped CumulusMX (just do a top and kill)

Copied CumulusMX to Wintel PC (using WinSCP) for backup. Renamed it CumulusMXV.25

Unzipped CumulusMXV27 on Wintel PC. Copied over CumulusMX directory writing over CumulusMX on RPi2.

I assume that it is writing a new INI file so I copied over old V.25 INI file to new V.27 CumulusMX directory.

I did not know that about the INI file.
How is your station connected to the Pi?
I thought about this just now. It is still using the Serial port splitter cuz I still have Cumulus 1 running on a Windows server.

Davis Console ==> Serial Server ==>
1 - Cumulus 1 on Wintel Server
2 - CumulusMX on RPi2

Should I disconnect the serial server and do a direct Davis Console ==> RPi2 connection for a bit and try it again?

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 1:44 pm
by mcrossley
Why kill MX and not gracefully shut it down with a ctrl-C? Killing it could corrupt your files. And i would try to reproduce with a direct connection.

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 1:49 pm
by steve
As I've said before, it is not possible to split the connection to a Davis station without using something which understands the protocol, and expect not to have problems. People much cleverer than me have said this many times; Virtual VP would not exist otherwise. It would be useful to try it connected directly, as Mark suggests. I think a 'kill' will get trapped and handled the same as ctrl-c, though. The end of the diags file would confirm that, it should look something like this:

2015-08-04 19:43:10.870 Cumulus closing
2015-08-04 19:43:10.910 Writing Cumulus.ini file
2015-08-04 19:43:10.975 Closing connection
2015-08-04 19:43:10.976 Station stopped

The problem is somewhere in the code which reads the data from the station, but I can't fully decode the stack trace to see exactly where it is. If you turn on debug logging and data logging via the Cumulus.ini settings, it might narrow it down a bit. It may still be a bug in MX regardless of any issues with the way your station is connected.
I assume that it is writing a new INI file so I copied over old V.25 INI file to new V.27 CumulusMX directory.
The distribution doesn't include a Cumulus.ini file, nor does Cumulus ever create a new file if one already exists. If it did, everyone would lose their settings every time they upgraded.

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 2:03 pm
by pete_c
Why kill MX and not gracefully shut it down with a ctrl-C? Killing it could corrupt your files. And i would try to reproduce with a direct connection.
Thank you Mark.

I am still testing such that I just put in a quickie start up cron job to auto start it rather than an autostart script.

I tested this morning just manually starting it in the CumulusMX directory.
The distribution doesn't include a Cumulus.ini file, nor does Cumulus ever create a new file if one already exists. If it did, everyone would lose their settings every time they upgraded.
Thank you Steve. I did not know.

OK so shutting it down. Doing a direct Davis Console to RPi2 connection.

Starting it up without debug first.

Then enabling debug.

Note that with the serial server debug would abend CumulusMX in about 30 seconds.

I couldn't let go of Cumulus 1 so was double FTPing all of the data up to WUN and CWOP. Really do not need Cumulus 1 running any more.

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 2:11 pm
by pete_c
Worked removing serial server. Apologies. You were right Steve and I was not wanting to stop using Cumulus 1.

I am now not running Cumulus 1 and will stay at CumulusMX.

./autostart_mx.sh
Current culture: English (United States)
Serial: 0295D03093D60633517011E4A7200EFE
Cumulus MX v.3.0.0 build 3027
This is pre-release beta software
Today.ini = data/today.ini
Last update=8/5/2015 7:30:04 AM
Connected to station
9:08:21 AM Downloading Archive Data
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
8/5/2015 9:08:21 AM
Type Ctrl-C to terminate
9:08:22 AM Downloading Archive Data
9:08:22 AM Normal running

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 2:15 pm
by steve
That's good, but I've spotted that you have actually found a genuine bug anyway. It's in the code which handles invalid loop packets, so you were seeing it because you were getting invalid loop packets because of your splitting of the output. Nice bit of testing - thanks!

Re: CumulusMX Version 3025 to Version 3027 RPi2 Update Issue

Posted: Wed 05 Aug 2015 2:27 pm
by pete_c
Thank you Steve and Mark.

Great stuff here!

Re: CumulusMX Version 3025 to Version 3027 RPi2 - Update

Posted: Wed 05 Aug 2015 10:44 pm
by pete_c
CumulusMX Abended after running fine for a few hours. MXDiag shows. (started at around 0912 AM and quit around 1436 PM.

2015-08-05 14:30:00.786 INSERT IGNORE INTO Monthly (LogDateTime,Temp,Humidity,Dewpoint,Windspeed,Windgust,Windbearing,RainRate,TodayRainSoFar,Pressure,Raincounter,InsideTemp,InsideHumidity,LatestWindGust,WindChill,HeatIndex,UVindex,SolarRad,Evapotrans,AnnualEvapTran,ApparentTemp,MaxSolarRad,HrsSunShine,CurrWindBearing,RG11rain,RainSinceMidnight,WindbearingSym,CurrWindBearingSym) Values('15-08-05 14:30',80.2,56,63.1,2.0,8.0,174,0.00,0.00,29.985,13.75,71.6,49,0.0,80.2,81.6,0.0,0,0.000,0.000,83.5,860,0.0,0,0.00,0.00,'S','N')
2015-08-05 14:30:00.794 MySQL: 1 rows were affected.
2015-08-05 14:30:26.909 Reading reception stats
2015-08-05 14:32:04.962 Reading reception stats
2015-08-05 14:33:43.002 Reading reception stats
2015-08-05 14:35:21.027 Reading reception stats
2015-08-05 14:36:58.882 Reading reception stats
System.NullReferenceException: Object reference not set to an instance of an object
at . (Int32 ) [0x00000] in <filename unknown>:0
at . () [0x00000] in <filename unknown>:0
at System.Threading.Thread.StartInternal () [0x00000] in <filename unknown>:0


I have attached the txt file.
20150805-091249.txt
Downgraded to V.25 for time being.

Re: CumulusMX Version 3025 to Version 3027 RPi2 - Update

Posted: Thu 06 Aug 2015 5:10 am
by ICP963
OK, I am likely an idiot for trying this, but I updated to 3027 ny just copying CumulusMX.exe from the 3027 zip file into my Cumulus directory after exiting 3026. the 3027 exe file is the only file I changed and it seems to be running.

Is that a good idea, or am I doomed? :)

Roy - N7QYK

Re: CumulusMX Version 3025 to Version 3027 RPi2 - Update

Posted: Thu 06 Aug 2015 7:10 am
by steve
The only things that have changed between 3026 are the .exe and the .pdb file (which contains debug symbols), so on this occasion you will be OK (as far as the upgrade goes, anyway).

Re: CumulusMX Version 3025 to Version 3027 RPi2 - Update

Posted: Thu 06 Aug 2015 7:28 am
by steve
Actually, there was another change between 3026 and 3027, I added back a DLL which I had removed from the distribution at some point in the past, and removing it stopped Twitter working for some people. If you don't use Twitter, or it's working OK for you anyway, it's not a problem.