SFTP Upstream Error during backup

Status
Not open for further replies.

Evolute IT

3CX MVP
Gold Partner
Advanced Certified
Joined
Feb 6, 2018
Messages
11,209
Reaction score
7,033
Hey guys,

We are currently exploring multiple cloud storage solutions and right now we are testing Files.com. It's pretty solid and offers FTP and SFTP support.

When trying the SFTP connection, the connection itself works (as well as in FileZilla) but backups are failing (FZ can upload/download files without issues).

Here's the error log we get:
Code:
System.Exception: Renci.SshNet.Common.SshException: Upstream Error During Data Transfer.
at Renci.SshNet.Sftp.SftpSession.RequestWrite(Byte[] handle, UInt64 serverOffset, Byte[] data, Int32 offset, Int32 length, AutoResetEvent wait, Action`1 writeCompleted)
at Renci.SshNet.Sftp.SftpFileStream.FlushWriteBuffer()
at Renci.SshNet.Sftp.SftpFileStream.Seek(Int64 offset, SeekOrigin origin)
at System.IO.Compression.ZipArchiveEntry.WriteCrcAndSizesInLocalHeader(Boolean zip64HeaderUsed)
at System.IO.Compression.ZipArchiveEntry.DirectToArchiveWriterStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Compression.WrappedStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at _3cxNetBackupAndRestore._3cxBackup.ZipFile(String dst, Stream src)
at _3cxNetBackupAndRestore.BackupTasks.BackupOMTask.BackupOM(BaseTask task)
at _3cxNetManagement.BaseTask.Run()
Renci.SshNet.Common.SshException: Upstream Error During Data Transfer.
at Renci.SshNet.Sftp.SftpSession.RequestWrite(Byte[] handle, UInt64 serverOffset, Byte[] data, Int32 offset, Int32 length, AutoResetEvent wait, Action`1 writeCompleted)
at Renci.SshNet.Sftp.SftpFileStream.FlushWriteBuffer()
at Renci.SshNet.Sftp.SftpFileStream.Seek(Int64 offset, SeekOrigin origin)
at System.IO.Compression.ZipArchiveEntry.WriteCrcAndSizesInLocalHeader(Boolean zip64HeaderUsed)
at System.IO.Compression.ZipArchiveEntry.DirectToArchiveWriterStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.Compression.WrappedStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at _3cxNetBackupAndRestore._3cxBackup.ZipFile(String dst, Stream src)
at _3cxNetBackupAndRestore.BackupTasks.BackupMappingTable.BackupTable(BaseTask task)
at _3cxNetManagement.BaseTask.Run()
Renci.SshNet.Common.SshException: Upstream Error During Data Transfer.
at Renci.SshNet.Sftp.SftpSession.RequestWrite(Byte[] handle, UInt64 serverOffset, Byte[] data, Int32 offset, Int32 length, AutoResetEvent wait, Action`1 writeCompleted)
at Renci.SshNet.Sftp.SftpFileStream.FlushWriteBuffer()
at Renci.SshNet.Sftp.SftpFileStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at _3cxFilesystemImplementations.SFTP.FixedSftpFileStream.Close()
at System.IO.Compression.ZipArchive.CloseStreams()
at System.IO.Compression.ZipArchive.Dispose(Boolean disposing)
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)

We opened a ticket with 3CX but unfortunately so far the only thing they said is "it's supposed to work, it works for everyone else" (which I agree) but why us?

We tried multiple protocols (FTP, FTPS, FTPES, SFTP) and none works. FTP(es) gives an error about invalid configuration.

The SFTP is using credentials (no public key) and the path is fairly simple: sftp://company.files.com/BackUp.

Any ideas?

This is on our 3CX Pro v16 U4.
 
  • Like
Reactions: DavidRostoker
This is either a problem with the SFTP server or with the SSH library used by 3CX for the SFTP connection.
The library throws that exception in response to the server having completed a write action, so my guess is that the problem is on the SFTP server.

I've found some related tickets online with the same error message, their problem was a full disk on the server. Did you try to upload a large file using FileZilla or WinSCP? Maybe the disk isn't full but it's a user-quota imposed on the server?

If your server has enough space and you can upload a file larger than your usual backup size, try might try to open a ticket on the library's GitHub repo: https://github.com/sshnet/SSH.NET/issues
(Don't expect too much help there, GitHub Issues are meant for reporting known software flaws only)
 
This is either a problem with the SFTP server or with the SSH library used by 3CX for the SFTP connection.
The library throws that exception in response to the server having completed a write action, so my guess is that the problem is on the SFTP server.

I've found some related tickets online with the same error message, their problem was a full disk on the server. Did you try to upload a large file using FileZilla or WinSCP? Maybe the disk isn't full but it's a user-quota imposed on the server?

If your server has enough space and you can upload a file larger than your usual backup size, try might try to open a ticket on the library's GitHub repo: https://github.com/sshnet/SSH.NET/issues
(Don't expect too much help there, GitHub Issues are meant for reporting known software flaws only)
We decided to go with another solution since this one didn't work. Couchdrop seems to be the best for us at the moment.

By the way, I am used to GitHub, I had already done research without finding anything.
 
Status
Not open for further replies.

Forum statistics

Threads
111,935
Messages
589,823
Members
164,818
Latest member
Guriqbal Singh