Solved 3CX - Backup issue via FTP - returning error message

Status
Not open for further replies.

Benoit C.

Free User
Joined
Apr 20, 2018
Messages
8
Reaction score
2
Hi,

We are currently having issues with the 3CX FTP backups. It worked well in the past and the last few days we have following message:

3CX Phone System tried to backup but failed due to the following reason(s):
System.Exception: System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FtpClient.FtpSocketStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.FtpClient.FtpDataStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at _3cxNetBackupAndRestore._3cxBackup.FinishingTask()
at _3cxBackupRestoreImpl.BackupRestoreUtils.Backup(IFilesystem filesystem, String instanceId, String cfgPath, String dbConnectionString, BackupConfig options, String fullpathFilename, Boolean sendEmail)
at BackupRestoreSchedule.BackupJob.Execute(IJobExecutionContext context)

-------------
FTP session timeouts were both extended to 1800 seconds for control and data channels but did not solve the issue.
3CX server version: 15.5.15502

If you have any idea or already faced this issue, thanks for your inputs and help :)

Best regards.

Benoit.
 

Attachments

  • screenshot20190719-09h25-.png
    screenshot20190719-09h25-.png
    27.3 KB · Views: 40
  • screenshot20190719-09h27-.png
    screenshot20190719-09h27-.png
    14 KB · Views: 39
  • FTP_Logs_190719.log
    FTP_Logs_190719.log
    37.6 KB · Views: 14
Hi Benoit

As a test, if you untick recordings voicemail etc (the large files) and the backup becomes small - will it work ok and complete successfully?
 
Hi John,
Thank you for your answer.
I just gave it a try by disabling "voicemails" and "recordings".
The FTP backup works fine.
File is 1.53GB instead of around 4.80GB.
Best regards.
Benoit.
 

Attachments

Ok so at least we know the connection is still possible and will work.

As the logs suggest, the remote side (FTP Server) seems to terminate the connection after a while.

You didn't mention which one you use, but this may be due to a restriction on the FTP Server, or stability of the connection over a long period of time. Can the FTP server write files larger than 4GB? Is it writing to a FAT32 partition scheme or something that limits file size perhaps?
 
Hi John,

Thanks for your reply.

OS:
windows Server 2016 Datacenter
Version: 10.0.14393 Build 14393
Filesystem C:\ is NTFS

FTP:
IIS 10.0.14393.0

It can write files larger then 4GB, yes and old backups of around 4.5GB already worked in the past.

The last working one via FTP was from 16.07.2019.

For information, the FTP server is running locally on the same machine as 3CX.

Best regards.

Benoit.
 
Ok I did some tests here, and was able to replicate this on one FTP Server which disconnects in the time it takes my PBX machine to zip the large file.

You will have to set the FTP timeout to zero on your FTP server, or run a different FTP server that allows zero timout.
 
Thank you John.
I set an FTP timeout of 0 on IIS but it still fails.
Which FTP server would you recommend for use with 3CX or which one is officially supported by 3CX?
Best regards.
Benoit.
 
Hi John,

Thank you very much. I was able to reproduce the same issue on FileZilla Server which clearly closes the connection after 120 seconds by default and produces the error message generated by 3CX.

Instead of 0 seconds, I set 1800 seconds and the transfer is working fine now.

There is no more error message for the backup procedure via FTP.

Thank you so much for your great support. I appreciate.

Benoit.
 
You're welcome, I'm glad you found a solution that works
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,932
Messages
589,805
Members
164,804
Latest member
fcentral