could not close the output stream for file

I'm using PhpStorm to develop my online website and using FTP Synchronization for that. everything was good but unfortunately now when i saving my file, php file not uploading and just print this error in file transfer window:

[3/4/2016 2:16 AM] Failed to transfer file 'C:\Users\hamid\PhpstormProjects\dlepersian.ir\engine\inc\hyvip.php': could not close the output stream for file "ftp://dlepersian.ir/engine/inc/hyvip.php".
3
34 comments

2022-11-22 14:18:16,582 [24719942]   INFO - #c.j.p.w.ftp - org.apache.commons.net.ftp.FTPConnectionClosedException: Connection closed without indication.
2022-11-22 14:18:24,461 [24727821]   WARN - #c.j.p.w.TransferTask - Parallel operations: [Speculative upload: file:///D:/.../file.php to ftps://domain.tld:1234/file.php] failed
com.jetbrains.plugins.webDeployment.TransferOperation$ParallelFilesUpload$CompositeFileSystemException: Unknown message with code "Could not copy "file:///D:/.../file.php" to "ftps://domain.tld:1234/file.php".".
    at com.jetbrains.plugins.webDeployment.TransferOperation$ParallelFilesUpload.lambda$execute$0(TransferOperation.java:381)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:241)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:214)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
    at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:203)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not copy "file:///D:/.../file.php" to "ftps://domain.tld:1234/file.php".
    at com.jetbrains.plugins.webDeployment.TransferOperation.copyFileFrom(TransferOperation.java:1654)
    at com.jetbrains.plugins.webDeployment.TransferOperation.copyFile(TransferOperation.java:1549)
    at com.jetbrains.plugins.webDeployment.TransferOperation$Copy.execute(TransferOperation.java:261)
    at com.jetbrains.plugins.webDeployment.TransferOperation$SpeculativeCreateRemoteDirectoryAndResolveChildren.executeNestedOperation(TransferOperation.java:746)
    at com.jetbrains.plugins.webDeployment.TransferOperation$SpeculativeFileUpload.execute(TransferOperation.java:456)
    at com.jetbrains.plugins.webDeployment.TransferOperation$ParallelFilesUpload.lambda$execute$0(TransferOperation.java:375)
    ... 12 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not close the output stream for file "ftps://domain.tld:1234/file.php".
    at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:613)
    at com.jetbrains.plugins.webDeployment.FileTransferUtil.copyContent(FileTransferUtil.java:44)
    at com.jetbrains.plugins.webDeployment.TransferOperation.copyFileFrom(TransferOperation.java:1651)
    ... 17 more
Caused by: org.apache.commons.vfs2.FileSystemException: Could not put FTP file "ftps://domain.tld:1234/file.php".
    at org.apache.commons.vfs2.provider.ftp.FtpFileObject$FtpOutputStream.onClose(FtpFileObject.java:668)
    at org.apache.commons.vfs2.util.MonitorOutputStream.close(MonitorOutputStream.java:108)
    at org.apache.commons.vfs2.util.MonitorOutputStream.close(MonitorOutputStream.java:101)
    at org.apache.commons.vfs2.provider.DefaultFileContent$FileContentOutputStream.close(DefaultFileContent.java:611)
    ... 19 more

0

Help | Edit Custom VM Options:

-Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"

Helps :)

0

Thanks for sharing!
Since one of the versions (a couple of years ago), the official support for TLS less than 1.2 has been dropped:
https://youtrack.jetbrains.com/issue/WI-60318/FTPS-for-ProFTPD-doesnt-work-TLS-1.0-TLS-1.1-support-is-dropped-in-JBR

0

Same here. One file upload is good, sibling file - error that described above.

PhpStorm 2023.2
Build #PS-232.8660.205, built on July 28, 2023

Fixed this way:

1. Copy contents and name of file
2. Delete local file
3. Create new local file, put contents, change name
4. Upload new local file
5. No error

0

Please sign in to leave a comment.