FileZilla Server Closing Connection After .pnc File Transfer

Discussions about CSEntry
EddieMu
Posts: 11
Joined: January 6th, 2015, 11:21 am

FileZilla Server Closing Connection After .pnc File Transfer

Post by EddieMu »

I am trying to set up FileZilla Server to sync files between Android devices and a PC. The FTP server is set up and CSEntry on the android device connects and manages to transfer the .PNC file from the server to the device.

However, immediately after the transfer of the .PNC file, the connection on the FileZilla server closes (a QUIT command is issued in FileZilla. See attached screenshot.) This means that when you try to sync, it fails because of the closed connection.

Is this a known problem between CSEntry and FileZilla Server?
Attachments
FZ Server closing connection after .pnc file transfer
FZ Server closing connection after .pnc file transfer
FZ_Server_CSEntry.jpg (116.83 KiB) Viewed 10762 times
shafique arif
Posts: 68
Joined: August 25th, 2013, 1:21 am

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by shafique arif »

I do not think you need to transfer .PNC files to android device.
EddieMu
Posts: 11
Joined: January 6th, 2015, 11:21 am

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by EddieMu »

@Shafique: You cannot do sync without the .PNC files.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by josh »

CSEntry always closes the connection to the FTP server after downloading the .pnc file. It will reopen the connection again when it runs the actualy sync. The connection closing that you are seeing is totally normal as CSEntry does not try to keep the connection open.

If the sync fails it is likely due to a problem with the instructions in the .pnc file itself. If you post your .pnc file I can take a look at it. Also please post any error message you get when the sync fails.

If you want to see a working example of FTP sync, I have set up a test server at ftp.teleyah.com. You can test it out yourself. The username is csprosync@teleyah.com and the password is CSProSync6.0. There is a test sync file on the site: SimpleCAPIFTP
EddieMu
Posts: 11
Joined: January 6th, 2015, 11:21 am

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by EddieMu »

[SyncFile]
Version=CSPro 6.0
AppName=SCS2

[Server]
Type=FTP
Host=ftp://192.168.168.58:10842/
Username=zack
Password=xxxxxxx

[Sync]
ServerPath=/SCS2

CreateClientPath=/SCS2
CreateClientPath=/SCS2/Data
ClientPath=/SCS2

Get=*.*
EddieMu
Posts: 11
Joined: January 6th, 2015, 11:21 am

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by EddieMu »

Attached is a screenshot of the error that is encountered when trying to sync...
Attachments
Sync Error Message
Sync Error Message
FZ_Server_CSEntry_Sync_Error.jpg (29.52 KiB) Viewed 10735 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by josh »

Unfortunately that error message is not helpful. Sync is encountering an error that causes the connection to be aborted and then it tries to disconnect and encoutners a second error but it only reports the second error rather than the real cause. We have fixed this and the fix will be in the next version.

Do you have the latest version of CSEntry from the Google Play store? It should be 6.0.4 (you can check by looking at About CSEntry from the options menu in the upper right corner). We made a few bug fixes to sync in the latest version that might fix your problem.

If that isn't it then make sure that you have the server url, username and password correct in the sync.

Also make sure that the folder /SCS2 exists on your server and that it is a subdirectory of the home directory of the FTP user. What I mean by this is that on your FTP server, for each FTP account you have to set a home directory. In FileZilla Server this is done in the user settings dialog by clicking on the "set as home dir" button. For example on my PC I have the home directory for all my users set C:\Users\Josh\Documents\FTPServer. So in my case when I do SERVERPATH=/SCS2 in the sync file the FTP server translates that as the SCS2 subdirectory of the home directory which in my case C:\Users\Josh\Documents\FTPServer\SCS2. If that directory doesn't exist then the sync will fail.

If none of the above work then you can try sending the FileZilla log to see if there are any errors coming from the server.

Otherwise I don't see anything wrong with the sync file. I took your sync file, changed the host, username and password to those of my server and it worked fine for me.

Josh
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by josh »

Unfortunately that error message is not helpful. Sync is encountering an error that causes the connection to be aborted and then it tries to disconnect and encoutners a second error but it only reports the second error rather than the real cause. We have fixed this and the fix will be in the next version.

Do you have the latest version of CSEntry from the Google Play store? It should be 6.0.4 (you can check by looking at About CSEntry from the options menu in the upper right corner). We made a few bug fixes to sync in the latest version that might fix your problem.

If that isn't it then make sure that you have the server url, username and password correct in the sync.

Also make sure that the folder /SCS2 exists on your server and that it is a subdirectory of the home directory of the FTP user. What I mean by this is that on your FTP server, for each FTP account you have to set a home directory. In FileZilla Server this is done in the user settings dialog by clicking on the "set as home dir" button. For example on my PC I have the home directory for all my users set C:\Users\Josh\Documents\FTPServer. So in my case when I do SERVERPATH=/SCS2 in the sync file the FTP server translates that as the SCS2 subdirectory of the home directory which in my case C:\Users\Josh\Documents\FTPServer\SCS2. If that directory doesn't exist then the sync will fail.

If none of the above work then you can try sending the FileZilla log to see if there are any errors coming from the server.

Otherwise I don't see anything wrong with the sync file. I took your sync file, changed the host, username and password to those of my server and it worked fine for me.

Josh
EddieMu
Posts: 11
Joined: January 6th, 2015, 11:21 am

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by EddieMu »

Josh, the FTP server folder structure that I have is as you have described (i.e. /SCS2 is a subdirectory in the home directory) and I have tested this using the latest version (6.0.4) with the same result. The url, user, password in the PNC file is correct as well.

I took a look at the FileZilla server log but don't see anything of interest. I have attached it here for you to take a look at.

It does appear that we shall have to wait for the next version that you alluded to that has some related bug fixes? How soon do you anticipate having this next version out?
Attachments
FileZilla Server.log
(14.93 KiB) Downloaded 358 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: FileZilla Server Closing Connection After .pnc File Tran

Post by josh »

Yes. The Filezilla Log is not very helpful. It doesn't look the sync itself is actually ever connecting to the server. All the entries seem related to sync setup (downloading the sync file) but I don't see it even trying to connect for the actual sync. That probably means that the url for the ftp server is not correct. In any case, without better error messages it is hard to tell.

I posted a new version of CSEntry with the latest sync bug fixes here:
https://www.dropbox.com/s/hzrl8ob90rxo8 ... d.apk?dl=0

Please do not use it for anything other than the purpose of figuring this problem as this is a totally unofficial debugging version that has a lot of untested code in it and will likely have other problems. It is a debug build so you will need to set "allow installation of apps from unknown sources" in your settings. You will also need to completely uninstall the existing CSEntry before installing this one (using Application manager in settings). To install go to the above link in your browser on your tablet/phone or copy the file to your phone/tablet and open it with a file explorer.

Let me know what if any error messages with this version.
Post Reply