Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Possible issue inserting data into sql db

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Locked
stefanbagnato
Posts: 159
Joined: Sun 08 May 2016 9:11 pm
Weather Station: Vantage Pro 2
Operating System: Windows Server 2019
Location: Raleigh, NC

Possible issue inserting data into sql db

Post by stefanbagnato »

Due to a lightning strike nearby, my station was down for 26 days. I just got it set back up today. I had been updating the txt files with data from a nearby station during the outage, however, I realize now that I need to actually insert the data into the monthly file via sql. However, looking at the MXdiags folder, a bunch of entries have been showing up. Specifically, while the db does seem to be updated every minute, I am getting logs such as the below:

2018-07-16 21:58:00.014 Writing log entry for 7/16/2018 9:58:00 PM
2018-07-16 21:58:00.014 Written log entry for 7/16/2018 9:58:00 PM
2018-07-16 21:58:00.014 Writing today.ini, LastUpdateTime = 7/16/2018 9:58:00 PM raindaystart = 19.6 rain counter = 19.6
2018-07-16 21:58:00.029 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('18-07-16 21:58',78.9,82,72.9,0.0,0.0,0,0.00,0.00,29.958,19.60,74.8,49,0.0,78.9,78.9,0.0,0,0.000,0.000,88.1,0,0.0,0,0.00,0.00,'N','N')
2018-07-16 21:58:00.211 MySQL: 1 rows were affected.
2018-07-16 21:58:26.675 Error connecting ftp - The connection was terminated before a greeting could be read.
2018-07-16 21:58:26.712 Error encountered during MySQL operation.
2018-07-16 21:58:26.712 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DAYS)' at line 1
2018-07-16 21:58:26.718 Error uploading realtime.txt to realtime.txt : Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.
2018-07-16 21:58:56.681 Error connecting ftp - The connection was terminated before a greeting could be read.
2018-07-16 21:58:56.725 Error encountered during MySQL operation.
2018-07-16 21:58:56.726 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DAYS)' at line 1
2018-07-16 21:58:56.732 Error uploading realtime.txt to realtime.txt : Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.
2018-07-16 21:59:00.220 Writing log entry for 7/16/2018 9:59:00 PM
2018-07-16 21:59:00.221 Written log entry for 7/16/2018 9:59:00 PM
2018-07-16 21:59:00.223 Writing today.ini, LastUpdateTime = 7/16/2018 9:59:00 PM raindaystart = 19.6 rain counter = 19.6
2018-07-16 21:59:00.224 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('18-07-16 21:59',78.9,82,72.9,0.0,0.0,0,0.00,0.00,29.958,19.60,74.8,49,0.0,78.9,78.9,0.0,0,0.000,0.000,88.1,0,0.0,0,0.00,0.00,'N','N')
2018-07-16 21:59:00.263 MySQL: 1 rows were affected.
2018-07-16 21:59:26.694 Error connecting ftp - The connection was terminated before a greeting could be read.
2018-07-16 21:59:26.732 Error encountered during MySQL operation.
2018-07-16 21:59:26.733 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DAYS)' at line 1
2018-07-16 21:59:26.739 Error uploading realtime.txt to realtime.txt : Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.
2018-07-16 21:59:56.693 Error connecting ftp - The connection was terminated before a greeting could be read.
2018-07-16 21:59:56.733 Error encountered during MySQL operation.
2018-07-16 21:59:56.734 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DAYS)' at line 1
2018-07-16 21:59:56.739 Error uploading realtime.txt to realtime.txt : Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Possible issue inserting data into sql db

Post by steve »

It looks like the inserts shown are working OK, but you have a problem with your syntax for a different insert - probably a problem with your retention string.
Steve
stefanbagnato
Posts: 159
Joined: Sun 08 May 2016 9:11 pm
Weather Station: Vantage Pro 2
Operating System: Windows Server 2019
Location: Raleigh, NC

Re: Possible issue inserting data into sql db

Post by stefanbagnato »

Steve, any idea how to fix? Is there more info I should share with you? Outside of keeping the text files updated using the exact same data categories as before strike (IE I figured out the headings and which columns needed a decimal and so on...) I didn't change anything else.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Possible issue inserting data into sql db

Post by steve »

You could show your SQL settings, it may be easy for someone to spot. I may not be much help for a few days, I am away from home, typing this on my phone in a restaurant waiting for my food to arrive.
Steve
Locked