FTP - occasional 'Login authentication failed' messages
Posted: Wed 12 Aug 2020 1:04 pm
I'm running 3.7.0 b3089 on a Raspberry PI and it's working just great. The main functionality is to FTP realtime.txt every 30 seconds and other web files (graphs etc.) every 10 minutes to a remote webserver/FTP site. This is port 21 standard FTP and not FTPS/SSH.
However.... My ISP seems to be a bit flaky at the moment and I get occasionally dropouts which resolve themselves. Cumulus seems to cope with this but sometimes when it's trying to open a new FTP connect I get a "Login authentication failed" message from the remote FTP server. This can happen for a few minutes and then it sorts itself out and connects just fine. What seems odd is that cumulus logging into the FTP site fails repeatedly but then after a few minutes suddenly connects and will start uploading again. If it (failed logons) happens too many times in quick succession the website/FTP hosting company have a firewall rule to block traffic from my IP address, which then requires me to open a support ticket to get resolved.
This issue has been happening for a few weeks now, before I was on 3089 so it's not specific to this version.
Here's an extract from my ftplog.txt before it starts connecting again (and when it does connect). The username shown in the ftp log is always correct (the one in the cumulus settings) but the password I cannot of course confirm as it's understandably hidden in the log file. It just seems odd that this authentication fails but then fixes itself again. This doesn't always happen, sometimes - I believe when my IP address changes as a result of a full reconnection to my ISP it seems that many multiple connections are attempted (which fail) and this then causes my web hosting provider to block the IP address of my ISP where Cumulus is running.
I would try SFTP/FTP over SSH but my webhost requires a fixed IP address to FTP from - and I cannot get one from my ISP where I run Cumulus.
A backup plan is to potentially use the Cumulus web command call a remote URL with lots of webtags which then 'recreates' the realtime.txt or similar file. I may need to resort to this for better reliability.
Any thoughts would be most welcome.
However.... My ISP seems to be a bit flaky at the moment and I get occasionally dropouts which resolve themselves. Cumulus seems to cope with this but sometimes when it's trying to open a new FTP connect I get a "Login authentication failed" message from the remote FTP server. This can happen for a few minutes and then it sorts itself out and connects just fine. What seems odd is that cumulus logging into the FTP site fails repeatedly but then after a few minutes suddenly connects and will start uploading again. If it (failed logons) happens too many times in quick succession the website/FTP hosting company have a firewall rule to block traffic from my IP address, which then requires me to open a support ticket to get resolved.
This issue has been happening for a few weeks now, before I was on 3089 so it's not specific to this version.
Here's an extract from my ftplog.txt before it starts connecting again (and when it does connect). The username shown in the ftp log is always correct (the one in the cumulus settings) but the password I cannot of course confirm as it's understandably hidden in the log file. It just seems odd that this authentication fails but then fixes itself again. This doesn't always happen, sometimes - I believe when my IP address changes as a result of a full reconnection to my ISP it seems that many multiple connections are attempted (which fail) and this then causes my web hosting provider to block the IP address of my ISP where Cumulus is running.
Code: Select all
020-08-12 13:17:38.473FTP[243]: Uploading /home/pi/CumulusMX/web/realtimegaugesT.txttmp to realtimegauges.txt
# OpenWrite("realtimegauges.txttmp", Binary)
# GetFileSize("realtimegauges.txttmp")
# OpenPassiveDataStream(AutoPassive, "STOR realtimegauges.txttmp", 0)
Command: EPSV
Response: 530 You aren't logged in
# OpenPassiveDataStream(PASV, "STOR realtimegauges.txttmp", 0)
Command: PASV
Response: 530 You aren't logged in
Status: Testing connectivity using Socket.Poll()...
# GetWorkingDirectory()
Command: PWD
Response: 530 You aren't logged in
Command: QUIT
Response: 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
Response: 221 Logout.
Status: Disposing FtpSocketStream...
# Connect()
Status: Connecting to 83.223.xxx.xxx:21
Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response: 220-You are user number 3 of 50 allowed.
Response: 220-Local time is now 13:17. 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: USER cumulus@ftpsiteserver.co.uk
Response: 331 User cumulus@ftpsiteserver.co.uk OK. Password required
Command: PASS ***
Response: 530 Login authentication failed
# Connect()
Command: QUIT
Response: 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
Response: 221 Logout.
Status: Disposing FtpSocketStream...
Status: Connecting to 83.223.xxx.xxx:21
Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response: 220-You are user number 3 of 50 allowed.
Response: 220-Local time is now 13:17. 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: USER cumulus@ftpsiteserver.co.uk
Response: 331 User cumulus@ftpsiteserver.co.uk OK. Password required
Command: PASS ***
Response: 530 Login authentication failed
Command: QUIT
Response: 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
Response: 221 Logout.
Status: Disposing FtpSocketStream...
2020-08-12 13:18:03.188FTP[244]: Uploading realtime.txt to realtime.txt
# OpenWrite("realtime.txttmp", Binary)
# GetFileSize("realtime.txttmp")
# Connect()
Status: Connecting to 83.223.xxx.xxx:21
Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response: 220-You are user number 3 of 50 allowed.
Response: 220-Local time is now 13:18. 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: USER cumulus@ftpsiteserver.co.uk
Response: 331 User cumulus@ftpsiteserver.co.uk OK. Password required
Command: PASS ***
Response: 530 Login authentication failed
2020-08-12 13:18:06.754FTP[244]: Uploading /home/pi/CumulusMX/web/realtimegaugesT.txttmp to realtimegauges.txt
# OpenWrite("realtimegauges.txttmp", Binary)
# GetFileSize("realtimegauges.txttmp")
# OpenPassiveDataStream(AutoPassive, "STOR realtimegauges.txttmp", 0)
Command: EPSV
Response: 530 You aren't logged in
# OpenPassiveDataStream(PASV, "STOR realtimegauges.txttmp", 0)
Command: PASV
Response: 530 You aren't logged in
Status: Testing connectivity using Socket.Poll()...
# GetWorkingDirectory()
Command: PWD
Response: 530 You aren't logged in
Command: QUIT
Response: 221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
Response: 221 Logout.
Status: Disposing FtpSocketStream...
# Connect()
Status: Connecting to 83.223.xxx.xxx:21
Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response: 220-You are user number 3 of 50 allowed.
Response: 220-Local time is now 13:18. 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: USER cumulus@ftpsiteserver.co.uk
Response: 331 User cumulus@ftpsiteserver.co.uk OK. Password required
Command: PASS ***
Response: 230 OK. Current restricted directory is /
Command: FEAT
Response: 211-Extensions supported:
Response: EPRT
Response: IDLE
Response: MDTM
Response: SIZE
Response: MFMT
Response: REST STREAM
Response: MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
Response: MLSD
Response: AUTH TLS
Response: PBSZ
Response: PROT
Response: UTF8
Response: TVFS
Response: ESTA
Response: PASV
Response: EPSV
Response: SPSV
Response: ESTP
Response: 211 End.
Status: Text encoding: System.Text.UTF8Encoding
Command: OPTS UTF8 ON
Response: 200 OK, UTF-8 enabled
Command: SYST
Response: 215 UNIX Type: L8
2020-08-12 13:18:26.377FTP[245]: Uploading realtime.txt to realtime.txt
# OpenWrite("realtime.txttmp", Binary)
Command: TYPE I
Response: 200 TYPE is now 8-bit binary
# GetFileSize("realtime.txttmp")
Command: SIZE realtime.txttmp
Response: 550 Can't check for file existence
# OpenPassiveDataStream(AutoPassive, "STOR realtime.txttmp", 0)
Command: EPSV
Response: 229 Extended Passive mode OK (|||30000|)
Status: Connecting to 83.223.xxx.xxx:30000
Command: STOR realtime.txttmp
Response: 150 Accepted data connection
Status: Disposing FtpSocketStream...
Response: 226-File successfully transferred
Response: 226 0.039 seconds (measured here), 6.83 Kbytes per second
Status: Disposing FtpSocketStream...
# Rename("realtime.txttmp", "realtime.txt")
# GetWorkingDirectory()
Command: PWD
Response: 257 "/" is your current location
# GetWorkingDirectory()
Command: PWD
Response: 257 "/" is your current location
Command: RNFR /realtime.txttmp
Response: 350 RNFR accepted - file exists, ready for destination
Command: RNTO /realtime.txt
Response: 250 File successfully renamed or moved
2020-08-12 13:18:26.792FTP[245]: Completed uploading realtime.txt to realtime.txt
A backup plan is to potentially use the Cumulus web command call a remote URL with lots of webtags which then 'recreates' the realtime.txt or similar file. I may need to resort to this for better reliability.
Any thoughts would be most welcome.