FTP deployer fails on existing target directory

Christian Schmitt avatarChristian Schmitt created an issue

When the target directory already exists FTP deployer throws an exception resulting in the stacktrace below:

[12:16:28] [Step 3/4] it.sauronsoftware.ftp4j.FTPException [code=521, message= "/home/ideeadm8/tmp" directory exists] it.sauronsoftware.ftp4j.FTPException [code=521, message= "/home/ideeadm8/tmp" directory exists] at it.sauronsoftware.ftp4j.FTPClient.createDirectory(FTPClient.java:1934) at jetbrains.buildServer.deployer.agent.ftp.FtpBuildProcessAdapter.createDirSkipExisting(FtpBuildProcessAdapter.java:148) at jetbrains.buildServer.deployer.agent.ftp.FtpBuildProcessAdapter.createPath(FtpBuildProcessAdapter.java:139) at jetbrains.buildServer.deployer.agent.ftp.FtpBuildProcessAdapter.start(FtpBuildProcessAdapter.java:107) at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:58) at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:25) at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37) at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:43) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.doProcessNextStep(StepExecutor.java:89) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:44) at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:77) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78) at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37) at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24) at jetbrains.buildServer.agent.impl.BuildRunAction.doStages(BuildRunAction.java:70) at jetbrains.buildServer.agent.impl.BuildRunAction.runBuild(BuildRunAction.java:50) at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:243) at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:48) at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:216) at java.lang.Thread.run(Thread.java:662) [12:16:28][Step 3/4] Step FTP test (FTP Deployer) failed with unexpected error

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.