Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

Possible issue inserting data into sql db

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.
stefanbagnato
Posts: 18
Joined: Sun May 08, 2016 9:11 pm
Weather Station: Vantage Pro 2
Operating System: Windows Server 2012 R2
Location: Holly Springs, NC

Possible issue inserting data into sql db

Postby stefanbagnato » Tue Jul 17, 2018 2:08 am

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: 26620
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Possible issue inserting data into sql db

Postby steve » Tue Jul 17, 2018 7:22 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job

stefanbagnato
Posts: 18
Joined: Sun May 08, 2016 9:11 pm
Weather Station: Vantage Pro 2
Operating System: Windows Server 2012 R2
Location: Holly Springs, NC

Re: Possible issue inserting data into sql db

Postby stefanbagnato » Tue Jul 17, 2018 11:02 am

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: 26620
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Possible issue inserting data into sql db

Postby steve » Tue Jul 17, 2018 6:02 pm

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development since I have retired from my day job


Return to “Cumulus MX”

Who is online

Users browsing this forum: dazza1223 and 2 guests