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
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
Moderator: mcrossley
-
- 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
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.
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.
-
- 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
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.
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.
- 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
Under your Web/Upload Site Advanced settings, try disabling EPSV - "Disable EPSV mode in FTP(S)"
-
- 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
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.
-
- 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
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.
-
- 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
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.
- 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
With EPSV disabled you still get this error?
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?
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]
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?
-
- 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
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.mcrossley wrote: ↑Fri 14 Mar 2025 9:03 am With EPSV disabled you still get this error?Did you restart MX after changing the setting?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]
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?
- 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
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.
-
- 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
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.
- 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
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.
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.
-
- 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
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.
-
- 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
PHP works flawlessly. Thanks for the suggestion! I should have done that a long time ago.