JetBrains / teamcity-deployer-plugin

Deployer plugin for TeamCity CI server

Home Page:http://confluence.jetbrains.net/display/TW/Deployer+plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NPE in FtpBuildProcessAdapter

nskvortsov opened this issue · comments

Caused by: java.lang.NullPointerException
at jetbrains.buildServer.deployer.agent.ftp.FtpBuildProcessAdapter.dirExists(FtpBuildProcessAdapter.java:386)
at jetbrains.buildServer.deployer.agent.ftp.FtpBuildProcessAdapter.createPath(FtpBuildProcessAdapter.java:358)
at jetbrains.buildServer.deployer.agent.ftp.FtpBuildProcessAdapter.access$400(FtpBuildProcessAdapter.java:32)
at jetbrains.buildServer.deployer.agent.ftp.FtpBuildProcessAdapter$1.run(FtpBuildProcessAdapter.java:221)

Used the build that's linked and got a success in TP. The issue is thought that nothing was changed on the server. Upload took time and shows that multiple files were uploaded but FileZilla shows otherwise.

Put the newest version up and now get a new error 0
[2015-11-12 07:31:24,696] ERROR - jetbrains.buildServer.AGENT - Failed to upload artifacts via FTP. Reply was: 501 Server cannot accept argument.

jetbrains.buildServer.RunBuildException: Failed to upload artifacts via FTP. Reply was: 501 Server cannot accept argument.

at jetbrains.buildServer.deployer.agent.ftp.InterruptibleUploadProcess.dirExists(InterruptibleUploadProcess.java:162)
at jetbrains.buildServer.deployer.agent.ftp.InterruptibleUploadProcess.createPath(InterruptibleUploadProcess.java:124)
at jetbrains.buildServer.deployer.agent.ftp.InterruptibleUploadProcess.run(InterruptibleUploadProcess.java:68)
at java.lang.Thread.run(Thread.java:745)

@vladkosarev apologize for this. Looks like there is something special about the server.
I have prepared a new build of plugin for you: https://teamcity.jetbrains.com/guestAuth/repository/download/bt402/624162:id/deploy-runner.zip?guest=1
Please install it, open FTP deployer settings, enable "Debug" check box and run the build once again. Then attach the part of log with failure here.

[09:16:24][Step 1/1] > USER *******
[09:16:24]
[Step 1/1] < 331 Password required
[09:16:24][Step 1/1] > PASS *******
[09:16:25]
[Step 1/1] < 230 User logged in.
[09:16:25][Step 1/1] Starting upload via FTP to ftp://omitted.ftp.azurewebsites.windows.net/site/wwwroot
[09:16:25]
[Step 1/1] > PWD
[09:16:25]
[Step 1/1] < 257 "/" is current directory.
[09:16:25]
[Step 1/1] > PORT 10,210,184,115,245,181
[09:16:25]
[Step 1/1] < 501 Server cannot accept argument.
[09:16:25]
[Step 1/1] Exception while uploading files: Failed to upload artifacts via FTP. Reply was: 501 Server cannot accept argument.
[09:16:25]
[Step 1/1] Failed to upload artifacts via FTP. Reply was: 501 Server cannot accept argument.

Do you use any secure settings? (like FTPS or FTPES)

No, but I can try and point to a secure ftp and try again (that still wouldn't explain why plan didn't work).

No, you should not. I think, there is something wrong about active/passive ftp mode. I will try to implement it soon.

So it is ready.
Try this build: https://teamcity.jetbrains.com/guestAuth/repository/download/bt402/624450:id/deploy-runner.zip?guest=1
There is an additional option of "FTP Mode": Active or Passive, with default to passive (it was active before). Give it a try (use Passive mode)

Set it to active and it failed. Set it to passive and it worked!
Thank you!

I'm having this same issue where i get the error
Exception while uploading files: Failed to upload artifacts via FTP. Reply was: 501 Server cannot accept argument.
Can i try the active/passive mode option? That link is dead

Thanks for this @nskvortsov! I had the same 501 error using FTPES and needed that build to specify the passive mode. However, with that build I now receive a 534 error. I can see in the FTP server logs the control channel authenticating, but when an upload message is sent, the response in the logs reads "534 SSL Policy requires SSL for data channel". Is there an additional configuration required to force the SSL over the data channel?

@nskvortsov: You can ignore me! This turned out to be an IIS configuration issue. If the FTP Security settings for the certificate is assigned to the FTP site, but not at the root level of the IIS server, this error is received when SSL is required.

Jason,
Thank you for the follow up!
4 марта 2016 г. 1:16 пользователь "Jason St-Cyr" notifications@github.com
написал:

@nskvortsov https://github.com/nskvortsov: You can ignore me! This
turned out to be an IIS configuration issue. If the FTP Security settings
for the certificate is assigned to the FTP site, but not at the root level
of the IIS server, this error is received when SSL is required.


Reply to this email directly or view it on GitHub
#68 (comment)
.