FTP errors, database file question

Get help for specific problems
Posts: 8
Joined: 25 Dec 2024

haneek

re FTP errors
I am using the FFS Donation edition 13.9 64 bit on a W10 Pro desktop to synchronize music files via FTP. I am getting errors:
2:30:33 PM Error Cannot read directory "ftp://myusername@IP_of_remote_machine/my_folder_paths/MP3/Classical/Haydn/String Quartets (Kodaly Quartet)/Op.17 1,2,4".
CURLE_RECV_ERROR: Recv failure: Connection was reset [curl_easy_perform]
2:30:34 PM Error Cannot read directory "ftp://myusername@IP_of_remote_machine/my_folder_paths/MP3/Classical/Haydn/String Quartets (Kodaly Quartet)/Op.50 4-6".
CURLE_RECV_ERROR: Recv failure: Connection was reset [curl_easy_perform]

I have the job set to ignore errors and using two Parallel file operations for the local folder and two for the remote folder. I have tried the automatic retry but it extends the scan time considerably as it seems to pause the thread for the timeout (currently 120 sec).

The remote server is running a fairly current filezilla ftp server.

Any suggestions?

re database files

I set the jobs to use database files but I have more than one FFS job accessing the same local folders, this seems to be a problem as I get this warning "2:46:28 PM Warning Database file is not available: Setting default directions for synchronization." and this is after running the job more than once. It may be that I am only getting this warning on the sync jobs that have the errors, I need to investigate this further but any suggestions would be welcome.
Posts: 8
Joined: 25 Dec 2024

haneek

Addendum - as I am using the mirror option I have removed the "use database.." option. I generally don't move music folders, just add to them and sometimes delete.
User avatar
Posts: 4866
Joined: 11 Jun 2019

xCSxXenon

Connection reset leads to a connection issue. Could be literally anything between your machine and the FTP server, hardware or software
Posts: 8
Joined: 25 Dec 2024

haneek

@xCSxXenon
Thank you for your comment. It made me realize I may not have been clear in my first post. To clarify - the FFS job connects to the remote ftp server & starts comparison. It goes along quite quickly (there are some 70-80k files) but when it hits the error(s) shown above it skips over the file it was comparing so that no comparison is done. That is expected because I have set "Ignore errors". Initially I tried with up to 10 threads locally & 10 threads on the server and retry on error(s). It too ran along quickly but when it hit the "Connection was reset " it paused for the time I had set before retrying. Practically this slowed the job to hours. I dropped the threads to two & used ignore errors and it gets through the job but with some connection reset errors.
In summary 90-99% of the comparisons/connections go quickly & smoothly but I am looking for a way to avoid those errors.
User avatar
Posts: 4866
Joined: 11 Jun 2019

xCSxXenon

Well my response is still applicable, as something in between is causing the error(s). Dropped packets, stack overflow, missed SYN/ACK packets, RAM issues on server, FTP server issues, etc
I would start reading logs from the server
Posts: 8
Joined: 25 Dec 2024

haneek

@xCSxXenon
Thank you (again) for your suggestions. I think I solved it thanks to you.

The server log reported "Failed new_session_ticket() on the control socket. Reason: ECONNABORTED - Connection aborted. Closing the session now."

I asked ChatGPT about it and I'll paste the full answer below but it suggested changing settings (mainly) on the client. So I looked at what settings I could change on FFS and noticed that I had chosen "Explicit SSL/TLS" for the encryption setting. I changed it to "Disabled" and it ran through the some 60,000 items (actually 29,331 files, FFS seems to count both sides and maybe folders too?) WITHOUT ERRORS! Hooray and Thank you!

I hope this answer will provide help to any others who have this problem.

FWIW Here is the full ChatGPT response I received:
Question: "how do I avoid this FTP server error "Reason: ECONNABORTED - Connection aborted." ?""
Answer:
The ECONNABORTED error (short for Connection Aborted) typically occurs during FTP sessions when the server unexpectedly terminates the connection. Below are potential reasons for this error and the steps to resolve it:
1. Causes of ECONNABORTED

Timeouts: The server is configured to disconnect idle connections after a certain time.
Firewall/Antivirus Interference: Security software may block or terminate FTP connections.
Passive vs Active Mode Mismatch: Incorrect FTP mode configuration can cause connection issues.
Network Interruptions: Unstable internet or network problems can lead to aborted connections.
Server-Side Issues: The FTP server may have restrictions, be overloaded, or misconfigured.

2. Fixes for ECONNABORTED
A. Adjust FTP Timeout Settings

Check your FTP client settings (e.g., FileZilla) and increase the timeout value.
In FileZilla:
Go to Edit > Settings > Connection > Timeout.
Set a higher timeout value (e.g., 60 seconds or more).
Save the changes and try reconnecting.

B. Use Passive FTP Mode

If the server or your client is configured incorrectly for active mode, it can cause connection drops.
In FileZilla:
Go to Edit > Settings > FTP.
Select Passive (recommended) under Transfer Mode.
Save and reconnect.

C. Disable Firewalls or Antivirus Temporarily

Your local firewall or antivirus may block FTP traffic:
Temporarily disable the firewall or antivirus and check if the error persists.
If disabling helps, add your FTP client (e.g., FileZilla) or FTP server's IP address to the allowed list in your firewall/antivirus settings.

D. Switch to SFTP

If your server supports it, switch to SFTP (FTP over SSH). SFTP uses a more secure protocol and is less likely to be interrupted by firewalls.

E. Check Internet Stability

Ensure your internet connection is stable. Unstable or intermittent connections can lead to aborted FTP sessions. You can:
Test your internet connection with a tool like ping or traceroute.
Switch to a wired connection if you’re using Wi-Fi.

F. Server-Side Solutions

If you have access to the FTP server:
Increase the idle timeout setting on the server to avoid premature disconnections.
Check server logs for additional details about why the connection is aborted.
If the server is overloaded, restart or optimize it to handle more connections.

G. Use Keep-Alive

Some FTP servers disconnect idle connections. Enable Keep-Alive in your client to maintain the session.
In FileZilla:
Go to Edit > Settings > Connection.
Enable Send FTP Keep-Alive commands.

3. Testing and Monitoring

If the above steps don't resolve the issue:

Use an alternate FTP client to see if the problem is client-specific.
Try connecting from a different network to rule out ISP-related issues.
Reach out to the server administrator for assistance, as the problem might be server-side.

Let me know how it goes or if you need further guidance!

END OF CHATGPT REPLY.