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

The handshake failed due to un unexpected packet format

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

Dinant
Posts: 91
Joined: Sat 17 Aug 2013 9:11 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 2012 R2
Location: Markelo
Contact:

Re: The handshake failed due to un unexpected packet format

Post by Dinant »

mcrossley wrote:OK, unless you are getting the exception I don't think it was picking up the new file.

I had a quick look this morning, I don't think MX can be made to use an updated DLL without MX being recompiled - because the public key of the assembly will change (or be removed ;) )when I compile it. :(
I think you are right.
In the first test I've replaced the dll when MX was running. Now I see that is not a stable situation.
Dinant
Posts: 91
Joined: Sat 17 Aug 2013 9:11 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 2012 R2
Location: Markelo
Contact:

Re: The handshake failed due to un unexpected packet format

Post by Dinant »

My provider has disabled TLS 1.0 again. So I have added an external ftp script which uses WinSCP.
First you have to install WinSCP.
Then add 2 files ftp2web.bat and ftp2web.txt to the Cumulus directory.

<cumulus-directory>\ftps2web.bat:

Code: Select all

"<winscp-install-directory>\WinSCP.com" /script=<cumulus-directory>\ftps2web.txt /log=<cumulus-directory>\ftps2web.log
<cumulus-directory>\ftps2web.txt (example with upload of 4 files):

Code: Select all


open ftps://<user>:<password>@<ftp-server>:21 -explicit -passive=on -rawsettings MinTlsVersion=11 MaxTlsVersion=12

put D:\Cumulus\extra\clientrawhourT.txttmp <upload-directory>/clientrawhour.txt
put D:\Cumulus\extra\monthlyrecordT.jstmp  <upload-directory>/monthlyrecord.js
put D:\cumulus\extra\webtagsT.jsontmp      <upload-directory>/webtags.json
put D:\Cumulus\realtime.txt                <upload-directory>/realtime.txt

exit
Change in the Cumulus MX config:
Under Settings, Internet settings, External programs you have to add ftps2web.bat

Under Settings, Extra web files: you can disable the checkboxes for all files in the FTP column.

If the FTPS script runs it creates a log file ftp2weg.log in the Cumulus directory. If everything is running fine you can remove the /log option from the WinSCP command line because the logfile can grow very quick.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: The handshake failed due to un unexpected packet format

Post by david3 »

I just ran into this same issue after my ftp server was upgraded from vsftpd v2.2.2 to vsftpd v3.0.2 (which came with the upgrade from CentOS 6 to CentOS 7).

with v2.2.2 my vsftpd.conf had

Code: Select all

ssl_tlsv1_2=YES
with v3.0.2 I kept getting the error in ftplog.txt

Code: Select all

There is stale data on the socket, maybe our connection timed out. Re-connecting.
I found to fix it, I had to add this to vsftpd.conf

Code: Select all

ssl_tlsv1=YES
Actually, I enabled 1.0, 1.1, and 1.2 just in case the higher version is supported in the future.

Code: Select all

ssl_tlsv1=YES
ssl_tlsv1_1=YES
ssl_tlsv1_2=YES
But it's TLS v1.0 that seems to be required by CumulusMX, which I guess is being deprecated and discouraged due to some security issues. I'm guessing the newer version of vsftpd disables it by default whereas the older version didn't.

Anyway, I'm thinking TLS v1.0 is still better than plain old unencrypted ftp. And it is working.
User avatar
mcrossley
Posts: 12690
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: The handshake failed due to un unexpected packet format

Post by mcrossley »

Yes, TLS 1.0 has been considered insecure for some time now. All sites should really be using 1.2.
david3
Posts: 63
Joined: Sat 28 Jan 2012 4:03 pm
Weather Station: Davis Vantage Vue
Operating System: Debian 12 64bit for rpi

Re: The handshake failed due to un unexpected packet format

Post by david3 »

Yes... To be clear, it's only the ftp server that requires TLS 1.0 (for CumulusMX ftps uploading).
Dinant
Posts: 91
Joined: Sat 17 Aug 2013 9:11 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 2012 R2
Location: Markelo
Contact:

Re: The handshake failed due to un unexpected packet format

Post by Dinant »

I have disabled the FTP upload by disabling the following options:
Enable realtime FTP
Realtime.txt FTP
Realtimegauges.txt FTP

But I still get "Error connecting ftp - The handshake failed due to an unexpected packet format." in the MXDIAG file every 5 minutes.
In the ftplog.txt is says:

Code: Select all

2018-09-12 22:15:00.653 Connecting to ftp.xxx.nl
220 ::ffff:xxx.xxx.xxx.xxx FTP server ready
AUTH TLS
234 AUTH TLS successful
Disposing FtpClient object...
There is stale data on the socket, maybe our connection timed out. Re-connecting.
Not sending QUIT because the connection has already been closed.
Disposing FtpSocketStream...
How to disable the FTP upload completely?
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: The handshake failed due to un unexpected packet format

Post by steve »

Disable 'auto update' in the internet settings.
Steve
Dinant
Posts: 91
Joined: Sat 17 Aug 2013 9:11 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 2012 R2
Location: Markelo
Contact:

Re: The handshake failed due to un unexpected packet format

Post by Dinant »

Disable 'auto update' in the internet settings.
Yes, but then all files are not updated anymore. I want all files being updated but no ftp from within Cumulus.
The FTP upload of Cumulus is being rejected by my internet provider.
I have to upload the files with my own script (FTP with TLS 1.2).
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: The handshake failed due to un unexpected packet format

Post by steve »

Remove your ftp server details from the config.
Steve
Locked