Page 1 of 3

FTP server communication

Posted: 15 Oct 2021, 02:27
by alexandrecps
Hello, I'm having trouble configuring FTPS, I've been trying for a long time, it's showing the following error message:

2021-10-14 21:14:13 A backup has started...
2021-10-14 21:14:13 Calculating the number of files. This could take a while...
2021-10-14 21:14:20 Backing up the task "Accessories"
2021-10-14 21:14:20 Requesting the creation of a Volume Shadow Copy image for the source...
2021-10-14 21:14:46 The Volume Shadow Copy image has been successfully created.
2021-10-14 21:14:46 Starting the copy. The user running the task is: SYSTEM
ERR 2021-10-14 21:14:46 An error occurred while loading the client certificate: The specified file is not a valid PVK file.
2021-10-14 21:14:46 Connecting to jainfo.duckdns.org:2027...
ERR 2021-10-14 21:14:46 Couldn't connect to jainfo.duckdns.org:2027: Socket closed before handshake is complete (2)
2021-10-14 21:14:46 * Backup part for task "Accessories" ended. Number of backed up files: 0. Backup part size: 0 bytes. *
2021-10-14 21:14:46 ** Backup for task "Accessories" ended. Number of backed up files: 0. Created folders: 0. Backup size: 0 bytes. **
2021-10-14 21:14:47 Deleting the Volume Shadow Copy image...
2021-10-14 21:14:48 The Volume Shadow Copy image has been successfully deleted.
2021-10-14 21:14:48 The backup has ended. There are errors. Consult the log file.
2021-10-14 21:15:58 The list "MainList.lst" has been successfully saved.

Re: FTP server communication

Posted: 15 Oct 2021, 09:27
by cobian
* What type of server are you using?
* Are you only using a certificate or are certificate plus user name and password?

The supported certificates are in CER, PEM or PFX format. The private keys must be stored on a PVK format.

Re: FTP server communication

Posted: 16 Oct 2021, 17:27
by alexandrecps
Hi Cobian, how are you?

I can't communicate with my FTP Server at all using certificate. Can you help me?

I generated the certificate through OpenSSL, with the following commands:

E:\OpenSSL\bin\openssl req -x509 -sha256 -newkey rsa:2048 -keyout certificate.key -out certificate.crt -days 1024
E:\OpenSSL\bin\openssl pkcs12 -export -out Certificate.pfx -inkey Certificate.key -in Certificate.crt
E:\OpenSSL\bin\openssl pkcs12 -in certificate.pfx -clcerts -nokeys -out certificate.crt
E:\OpenSSL\bin\openssl pkcs12 -in certificate.pfx -nocerts -nodes -out private.key
E:\OpenSSL\bin\openssl pkcs12 -in Certificate.pfx -nocerts -nodes -out Private.pem
E:\OpenSSL\bin\pvk -in Private.pem -topvk -out Private.pvk
E:\OpenSSL\bin\openSSL x509 -in Certificate.crt -out Certificate.pem

On the FTP Server (Filezilla), the certificate looked like this, in:

Private Key File: Private.pem
Certificate File: Certificate.pem
Key password: the password I used to generate the certificate

In Cobian Reflector, the certificate looked like this, in:

Private Key: Private.pem
Client Certificate: Certificate.pem
Server validation certificate: Private.pvk
Password for client keys: the password I used to generate the certificate.

Here's an error log:

ERR 2021-10-16 00:28:51 An error occurred while loading the client certificate: The specified file is not a valid PVK file.

ERR 2021-10-16 00:28:51 Couldn't connect to jainfo.duckdns.org:2027: The certificate could not be verified: UntrustedRoot - A certification chain processed correctly but terminated in a root certificate not trusted by the trust provider .

I appreciate if you can help me.
alexander

Re: FTP server communication

Posted: 17 Oct 2021, 23:37
by cobian
Will take a look at that. Need to install Filezilla server to test, but the private key on reflector should be Private.pvk

Re: FTP server communication

Posted: 19 Oct 2021, 17:24
by alexandrecps
Cobian,

The only way I found for Cobian reflector to communicate with FileZilla Server was changing the Server Validation field to No validation. However, all files were corrupted for the Server, in the Reflector LOG the following message was displayed: ERR 2021-10-19 08:19:48 An error occurred while uploading the file "F:\Origin\00e1bddb-0dd2-46d3- 8eed-f503984a830a.pdf" to "/Source 2021-10-19 08;19;23": Failed to create output stream.

Thank you very much for your attention.

Alexander

Re: FTP server communication

Posted: 19 Oct 2021, 17:32
by cobian
Does it work if you connect without the certificate (but using SSL as well?

Re: FTP server communication

Posted: 19 Oct 2021, 23:56
by alexandrecps
Yes, I connected, see the LOG. But when the transfer starts, the error occurs.


2021-10-19 18:45:35 A backup has started...
2021-10-19 18:45:35 Calculating the number of files. This could take a while...

2021-10-19 18:45:35 Backing up the task "Acessorias"
2021-10-19 18:45:35 Requesting the creation of a Volume Shadow Copy image for the source...
2021-10-19 18:45:41 The Volume Shadow Copy image has been successfully created.
2021-10-19 18:45:41 Starting the copy. The user running the task is: SISTEMA
2021-10-19 18:45:41 Connecting to jainfo.duckdns.org:2027...
2021-10-19 18:45:42 Connected to jainfo.duckdns.org:2027.
2021-10-19 18:45:42 Logged in into the remote server.
2021-10-19 18:45:42 The remote directory "/ftp/Origem 2021-10-19 18;45;42" has been successfully created.
2021-10-19 18:45:42 Uploading the directory "F:\Origem" to "/ftp/Origem 2021-10-19 18;45;42"...
ERR 2021-10-19 18:45:43 An error occurred while uploading the file "F:\Origem\000a226b-245d-4b5b-acdd-68f1beeed135.pdf" to "/ftp/Origem 2021-10-19 18;45;42": Failed to create output stream
ERR 2021-10-19 18:45:44 An error occurred while uploading the file "F:\Origem\000a8905-7003-4fa4-8225-4036c9838f27.pdf" to "/ftp/Origem 2021-10-19 18;45;42": Failed to create output stream
ERR 2021-10-19 18:45:44 An error occurred while uploading the file "F:\Origem\000b0d8e-801b-4425-bf71-d995ffec7971.pdf" to "/ftp/Origem 2021-10-19 18;45;42": Failed to create output stream

2021-10-19 18:46:02 The directory "F:\Origem" has been uploaded to "/ftp/Origem 2021-10-19 18;45;42".
2021-10-19 18:46:03 Disconnected from jainfo.duckdns.org.
2021-10-19 18:46:03 * Backup part for task "Acessorias" ended. Number of backed up files: 0. Backup part size: 0 bytes. *
2021-10-19 18:46:03 ** Backup for task "Acessorias" ended. Number of backed up files: 0. Created folders: 0. Backup size: 0 bytes. **
2021-10-19 18:46:03 *** Number of errors: 92. Time elapsed for this task: 0 hours, 0 minutes, 27 seconds. ***

2021-10-19 18:46:03 Deleting the Volume Shadow Copy image...
2021-10-19 18:46:04 The Volume Shadow Copy image has been successfully deleted.
2021-10-19 18:46:04 The backup has ended. There are errors. Consult the log file.

Re: FTP server communication

Posted: 20 Oct 2021, 00:09
by cobian
Failed to create output stream is a typical firewall error. Is the connection passive? If no, give it a try.

Re: FTP server communication

Posted: 20 Oct 2021, 01:45
by alexandrecps
Yes, it is set to passive mode.
I really don't know what's happening, I configured the legacy version, in this case, Gravity and it worked perfectly with the same FTP Server.

Re: FTP server communication

Posted: 20 Oct 2021, 01:54
by cobian
What is the data port you are using?