Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
+1 vote
364 views
in CompleteFTP by (240 points)
reopened by

Hello,
Sometimes, but it is rare, if communication fails when user is uploading a picture file to the server, that the file stays locked.

How can I release the lock on that file so the user can retrieve to upload it?

Here is the exception thrown when user tries to upload a file that is locked on the server:
Site:XXXXXX:178.XXX.226.XXX] Failed to open /SFTP/035 - XXXX XXX/Pictures/XXXX/XXXX/XXXX/XXXX/9ed014c6-398c-4144-a970-e661b10b56e7.jpg
EnterpriseDT.Net.FtpServer.Core.ServerErrorException: Le processus ne peut pas accéder au fichier 'F:\XXXXXXXXX\Pictures\XXXX\XXXX\XXXX\XXXX\9ed014c6-398c-4144-a970-e661b10b56e7.jpg', car il est en cours d'utilisation par un autre processus. [WindowsPath= F:\XXXXXXXXX\Pictures\XXXX\XXXX\XXXX\XXXX\9ed014c6-398c-4144-a970-e661b10b56e7.jpg, FileMode=Create, FileAccess=Write, FileShare=Read, User=Système] ---> System.IO.IOException: Le processus ne peut pas accéder au fichier F:\XXXXXXXXX\Pictures\XXXX\XXXX\XXXX\XXXX\9ed014c6-398c-4144-a970-e661b10b56e7.jpg ', car il est en cours d'utilisation par un autre processus.
   à System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   à System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   à System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   à EnterpriseDT.Net.FtpServer.Utility.EncryptStream.PossiblyEncryptedFileStream..ctor(String path, Boolean encryptionOn, String password, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   à EnterpriseDT.Net.FtpServer.FileSystem.Windows.WindowsAdapter.GetStream(ISession session, IFileSystemNode node, String path, Boolean encrypted, FileMode mode, FileAccess access, FileShare share)
   --- Fin de la trace de la pile d'exception interne ---
   à EnterpriseDT.Net.FtpServer.FileSystem.Windows.WindowsAdapter.GetStream(ISession session, IFileSystemNode node, String path, Boolean encrypted, FileMode mode, FileAccess access, FileShare share)
   à EnterpriseDT.Net.FtpServer.FileSystem.Windows.WindowsArchiveAdapter.GetStream(ISession session, IFileSystemNode node, String path, Boolean encrypted, FileMode mode, FileAccess access, FileShare share)
   à EnterpriseDT.Net.FtpServer.FileSystem.Windows.WindowsAdapter.GetWriteStream(ISession session, IFileSystemNode node, String path, Boolean encrypted, VirtualFileMode mode)
   à EnterpriseDT.Net.FtpServer.FileSystem.Windows.WindowsAdapter.GetWriteStream(ISession session, IFileSystemNode node, String path, VirtualFileMode mode)
   à XUWZblN8DwwfmyMK0PW.FcpjWfNAM2KqblfhJns.LwpKAZaCBS(ISession , VirtualFileMode )
   à lOx0wYOFNMZeKsualAB.Xie7i7OK3qN5JSTw3xc.dL1bg0MOVTG(Dmeq6Jxx98Cj2uUOGkS )

Using Process Explorer, I can see the file is locked by CompleteFTP process:

I already tried to restart CompleteFTP server using CompleteFTP Manager without success.
 

by (161k points)
If a file gets locked you might need to restart the CompleteFTP service via the Windows service manager. But make sure you are running the latest version of CompleteFTP, as there was a locking bug in earlier versions.
by (240 points)
Thank you for the fast answer !
Restart service from Windows service manager did release the lock on the file, great!
For information, I use the last version (13.0.0)
May I close the question?
by (161k points)
Sure. But if you could email support your diagnostics.log file with the error we'd like to take a look at it to see how it happened and try to prevent it again. (see C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Logs)
by (240 points)
OK,
I will close the question and send you the log file.

Thank you

1 Answer

0 votes
by (161k points)
 
Best answer
We identified a scenario where locking could occur, and released a fix in version 13.0.1. If anyone is experiencing this issue, please upgrade to 13.0.1.

Categories

...