Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.3 (build 4086) - 19 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

FTP Stops Working Randomly

From Cumulus MX version 3 build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since, and has recently released Cumulus MX version 4. 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
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

FTP Stops Working Randomly

Post by hemmits »

Not sure if it's a coincidence, but ever since upgrading to version 4, I have been having random ftp issues. Namely, the ftp uploads just stop. Every time this happens, I get the following error message in the ftp logs:

2025-03-12 19:03:32.4023|INFO|MXR|FTP[137]: Uploading realtime.xml
2025-03-12 19:03:32.4023|INFO|R-T|> UploadStream("realtime.xml", NoCheck, False)
2025-03-12 19:03:32.4023|INFO|R-T|> OpenWrite("realtime.xml", Binary, -1, False)
2025-03-12 19:03:32.4023|INFO|R-T|> OpenDataStream("STOR realtime.xml", 0)
2025-03-12 19:03:32.4023|INFO|R-T|> OpenPassiveDataStream(EPSV, "STOR realtime.xml", 0)
2025-03-12 19:03:32.4023|INFO|R-T|Command: EPSV
2025-03-12 19:03:32.4531|INFO|R-T|Response: 500 Unknown command [49ms]
2025-03-12 19:03:32.4531|INFO|MXR|FTP[137]: Error uploading realtime.xml : Error while uploading the file to the server. See InnerException for more info.
2025-03-12 19:03:32.4531|INFO|MXR|FTP[137]: Inner Exception: Code: 500 Message: Unknown command

Sometimes I have to restart cumulus 5 or 6 times throughout a given day when this happens. Other times it will run for several days without issue. However, lately it has been much more frequent. Today I switched to active FTP to see if this helps and will report back, but I am stumped as to what is causing this issue.
water01
Posts: 3674
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: FTP Stops Working Randomly

Post by water01 »

Please post the entire MXDiags log not just a snippet of where you think the error occurred as more than likely there are better clues as to what the problem is.

Better still switch on data and debug logging and run MX until the error occurs and send the entire log. You may have to .zip it if it is too large.
David
Image
User avatar
mcrossley
Posts: 14426
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: FTP Stops Working Randomly

Post by mcrossley »

Under your Web/Upload Site Advanced settings, try disabling EPSV - "Disable EPSV mode in FTP(S)"
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

Re: FTP Stops Working Randomly

Post by hemmits »

Thanks Mark. I'll try this out. I was running in active mode with no issues as well. However, that was only a 12-hour test. I'll switch back to passive and see if this works and will report back.
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

Re: FTP Stops Working Randomly

Post by hemmits »

So, I tried running Cumulus with disabling EPSV and it ran fine for about 5 hours then stopped ftp uploads again with the same error. I went back to active mode and the same error occurred a few hours later again. Not sure if it's my ftp server, firewall, or anti-virus program. There is no rhyme or reason as to what is causing this.
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

Re: FTP Stops Working Randomly

Post by hemmits »

Would it be possible to code Cumulus to restart the ftp component if an error code like this is found? I noticed for instance that if I switch between active and passive ftp in the settings, ftp uploads resumed after I clicked save. I don't need to restart Cumulus so there is some sort of reset of the ftp component when the settings are saved.
User avatar
mcrossley
Posts: 14426
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: FTP Stops Working Randomly

Post by mcrossley »

With EPSV disabled you still get this error?

Code: Select all

2025-03-12 19:03:32.4023|INFO|R-T|Command: EPSV
2025-03-12 19:03:32.4531|INFO|R-T|Response: 500 Unknown command [49ms]
Did you restart MX after changing the setting?

The error 500 is coming from the FTP server, can you ask your provider to check their FTP server logs for any indication of what has gone wrong?
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

Re: FTP Stops Working Randomly

Post by hemmits »

mcrossley wrote: Fri 14 Mar 2025 9:03 am With EPSV disabled you still get this error?

Code: Select all

2025-03-12 19:03:32.4023|INFO|R-T|Command: EPSV
2025-03-12 19:03:32.4531|INFO|R-T|Response: 500 Unknown command [49ms]
Did you restart MX after changing the setting?

The error 500 is coming from the FTP server, can you ask your provider to check their FTP server logs for any indication of what has gone wrong?
Yeah, I did and with those changes the error then became Command: PSV 500 unknown command. I'm stumped. It has to be the ftp server.
User avatar
mcrossley
Posts: 14426
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: FTP Stops Working Randomly

Post by mcrossley »

PSV is trying to create a passive mode FTP session. Why your server would suddenly refuse to do that (same with EPSV = extended passive mode) is a question for the hosting company.
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

Re: FTP Stops Working Randomly

Post by hemmits »

So, this ftp issue is only affecting the realtime files including the gauges. All other ftp uploads are fine. I really don't think it is my ftp server as all looks good on their end.
User avatar
mcrossley
Posts: 14426
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: FTP Stops Working Randomly

Post by mcrossley »

Rather than restarting MX each time you could disable/enable FTP - it should have the same effect.

It appears the server does not like long running FTP connections and starts returning errors to valid commands after a while.

I have a complete rewrite of FTP connection handling planned for v4.5 of Cumulus that should fix this (and other) FTP issues that have been patched and repatched many times in the past to try and fix and the code has now got far too convoluted.
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

Re: FTP Stops Working Randomly

Post by hemmits »

Enabling and restarting FTP definitely works or anything that causes that like changing FTP settings. I imagine hosting sites are starting to crack down on long ftp sessions or excessive connections, as they mimic server attacks. In the meantime, I'll just rsync the files via a script I have.
freddie
Posts: 2874
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Bromfield, Shropshire, UK
Contact:

Re: FTP Stops Working Randomly

Post by freddie »

You could always try the PHP Upload functionality?
Freddie
Image
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

Re: FTP Stops Working Randomly

Post by hemmits »

freddie wrote: Mon 17 Mar 2025 3:40 pm You could always try the PHP Upload functionality?
Thanks for the suggestion Freddie! I look into this when I get a chance.
hemmits
Posts: 48
Joined: Wed 14 May 2014 2:07 am
Weather Station: Davis Pro 2
Operating System: Windows 11
Location: usa

Re: FTP Stops Working Randomly

Post by hemmits »

PHP works flawlessly. Thanks for the suggestion! I should have done that a long time ago.
Post Reply