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 4019) - 03 April 2024

Legacy Cumulus 1 release 1.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

All gone downhill since upgrading to b3129 - ftp not working

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

All gone downhill since upgrading to b3129 - ftp not working

Post by Feek »

I've gone through my usual upgrade process - I use the default web site.

Download the new install file, ftp it over to my Pi.

Stop the service, take a copy of my current install, copy the new install over the top of the old install, restart the service.

While it was all restarting, I've copied the webfiles directory to my server.

Everything looks OK on the management console dashboard and gauges when I'm connected to the Pi but nothing is being uploaded to the server. As you can see (link in signature), it's all looking a bit poor at the moment. I've checked my ftp settings, it all looks good but I'm getting errors in the ftplog.txt file.

Code: Select all

Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response: 220-You are user number 3 of 50 allowed.
Response: 220-Local time is now 19:32. Server port: 21.
Response: 220-This is a private system - No anonymous login
Response: 220-IPv6 connections are also welcome on this server.
Response: 220 You will be disconnected after 15 minutes of inactivity.
Status:   Detected FTP server: PureFTPd
Command:  AUTH TLS
Response: 234 AUTH TLS OK.
Status:   FTPS Authentication Successful
Status:   Time to activate encryption: 0h 0m 0s.  Total Seconds: 0.071165.
Command:  USER [redacted]
Command:  QUIT
Warning:  FtpClient.Disconnect(): Exception caught and discarded while closing control connection: System.ObjectDisposedException: Safe handle has been closed
  at System.Runtime.InteropServices.SafeHandle.DangerousAddRef (System.Boolean& success) [0x0001c] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.Threading.WaitHandle.WaitOneNative (System.Runtime.InteropServices.SafeHandle waitableSafeHandle, System.UInt32 millisecondsTimeout, System.Boolean hasThreadAffinity, System.Boolean exitContext) [0x00008] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.Threading.WaitHandle.InternalWaitOne (System.Runtime.InteropServices.SafeHandle waitableSafeHandle, System.Int64 millisecondsTimeout, System.Boolean hasThreadAffinity, System.Boolean exitContext) [0x00014] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.Threading.WaitHandle.WaitOne (System.Int64 timeout, System.Boolean exitContext) [0x00000] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at System.Threading.WaitHandle.WaitOne (System.Int32 millisecondsTimeout, System.Boolean exitContext) [0x00019] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at FluentFTP.FtpSocketStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x0002e] in <b4872924fc424f07ad87d26c599202dd>:0 
  at FluentFTP.FtpSocketStream.ReadLine (System.Text.Encoding encoding) [0x00045] in <b4872924fc424f07ad87d26c599202dd>:0 
  at (wrapper remoting-invoke-with-check) FluentFTP.FtpSocketStream.ReadLine(System.Text.Encoding)
  at FluentFTP.FtpClient.GetReply () [0x0006e] in <b4872924fc424f07ad87d26c599202dd>:0 
  at FluentFTP.FtpClient.Execute (System.String command) [0x000da] in <b4872924fc424f07ad87d26c599202dd>:0 
  at FluentFTP.FtpClient.Disconnect () [0x0002e] in <b4872924fc424f07ad87d26c599202dd>:0 
Status:   Disposing FtpSocketStream...
2021-05-07 19:32:56.593 Realtime[4]: Uploading - realtime.txt

2021-05-07 19:32:56.594 FTP[4]: Uploading realtime.txt to /public_html/qso365/weather/realtime.txt

# OpenWrite("/public_html/qso365/weather/realtime.txt", Binary)

Code: Select all

Status:   Connecting to [redacted]
Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response: 220-You are user number 3 of 50 allowed.
Response: 220-Local time is now 19:32. Server port: 21.
Response: 220-This is a private system - No anonymous login
Response: 220-IPv6 connections are also welcome on this server.
Response: 220 You will be disconnected after 15 minutes of inactivity.
Status:   Detected FTP server: PureFTPd
Command:  AUTH TLS
Response: 234 AUTH TLS OK.
Status:   FTPS Authentication Successful
Status:   Time to activate encryption: 0h 0m 0s.  Total Seconds: 0.073467.
Command:  USER [redacted]
2021-05-07 19:32:57.092 FTP[4]: Error uploading realtime.txt to /public_html/qso365/weather/realtime.txt : Safe handle has been closed
2021-05-07 19:32:57.092 Realtime[4]: Uploading - realtimegauges.txt

2021-05-07 19:32:57.093 FTP[4]: Uploading web/realtimegauges.txt to /public_html/qso365/weather/realtimegauges.txt

# OpenWrite("/public_html/qso365/weather/realtimegauges.txt", Binary)
The last updated time is showing as 18:50 which is when I started doing this. I'm not sure what's happening here.

I can easily go back to the previous version but I'd quite like this to work :)
/edit - I have gone back to the previous version and I no longer see those ftp errors.


Thanks.

Image
Last edited by Feek on Fri 07 May 2021 7:16 pm, edited 1 time in total.
User avatar
ConligWX
Posts: 1606
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by ConligWX »

Looks like you may have missed copying over some web files

I had a similar finding the other day.

Though it looks like you fixed it
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by Feek »

ConligWX wrote: Fri 07 May 2021 7:14 pm Though it looks like you fixed it
I've gone back to the previous version.
ConligWX wrote: Fri 07 May 2021 7:14 pm Looks like you may have missed copying over some web files
That was my first thought but I don't think so.
User avatar
ConligWX
Posts: 1606
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by ConligWX »

I had this issue (displaying wrong characters) with two files which was part of the change log

Fix: Remove THW Index in /web/websitedataT.json, and default web site index.htm

If the index.htm isn’t updated but the websitedata.json is, you will get that type of error.

So update CumulusMX then upload the webfiles folder content to the webserver
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by Feek »

ConligWX wrote: Fri 07 May 2021 7:42 pm So update CumulusMX then upload the webfiles folder content to the webserver
Thanks - Yes, I've already done this. In fact, I completely renamed my /weather folder on the server, created a new one and uploaded a fresh copy of the webfiles folder but that made no difference.

What's failing is the ftp upload as you can see from the two log extracts in my first post. With the old version back, I'm no longer getting those ftp errors.
User avatar
HansR
Posts: 5957
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by HansR »

The ftp library has been updated and the error you get has to do with reuse of the tls connection. At least it seems like it: it disconnects. Apparently the lib does not handle it well.

I have been struggling with this recently and gave up. Mark must say what he want with this, but i think you're better of trying SFTP connection.

Some trouble to set up, especially the type of key to use but then you leave FTP troubles behind you.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by mcrossley »

FTPS session reuse is a problem with the library, and like Hans I'm not sure what the solution is at the moment - I'll have to investigate more.
(I'd say FTP and particularly FTPS issues absorb the biggest proportion of my dev time - the day FTP is abandoned I'll rejoice!)

Your web site issue is symptomatic of not updating the websitedataT.json file.
G6GUH
Posts: 87
Joined: Sat 23 Mar 2013 9:29 am
Weather Station: Davis VP2 Pro
Operating System: Windows 10
Location: Church Stretton, Shropshire

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by G6GUH »

I have had problems with V3129 using FTP ptotocol option 1 I get an error regarding handles, if I resort to opt 0 all works fine. Perhaps it is a problem with the web site key ?

Regards All

Pete
f4phlyer
Posts: 144
Joined: Sun 13 Feb 2011 7:12 pm
Weather Station: Davis Vantage Pro 2
Operating System: RaspBerry Pi Win 10 OSx
Location: Spring, Texas USA
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by f4phlyer »

mcrossley wrote: Sat 08 May 2021 1:56 pm (I'd say FTP and particularly FTPS issues absorb the biggest proportion of my dev time - the day FTP is abandoned I'll rejoice!)
In light of my experience with the "Unhandled Exception" I'd agree, is there an alternative?
retreat at augusta pines weather
CumulusMX on Raspberry π rPi5
http://augusta-pines-weather.com / CumulusMX 4.0.0 build:4017
WeatherUnderground KTXSPRIN538
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by mcrossley »

Version 3.11.1 has been released - it reverts the FTP component back to the previous version, this should fix crashes introduced when v3.11.0 is running under Mono.
Feek
Posts: 106
Joined: Sun 08 Jan 2012 9:22 pm
Weather Station: GW1003
Operating System: Raspbian
Location: Kirby Cross, Essex, UK
Contact:

Re: All gone downhill since upgrading to b3129 - ftp not working

Post by Feek »

mcrossley wrote: Sat 08 May 2021 11:02 pm Version 3.11.1 has been released - it reverts the FTP component back to the previous version, this should fix crashes introduced when v3.11.0 is running under Mono.
Thank you Mark, all updated and working now.
Post Reply