Git FTP pipeline stopped working - Bad PASV/EPSV response: 452

Mohammad Ali September 16, 2019

I had a couple of pipelines set up and it was working perfectly for over a month now when all of a sudden for the last 3 days I've been unable to successfully do a deploy. Here is my deployment code:

 

 deploy-demo:
- step:
caches:
- composer
script:
- git ftp push -u "$FTP_DEMO_USERNAME" -p "$FTP_DEMO_PASSWORD" ftp://$FTP_DEMO_THEME_HOST -vv --force

Here is the breakdown when I run the pipeline:

 

curl: (13) Bad PASV/EPSV response: 452
* Found bundle for host myhost.com: 0x1de70b0
* Re-using existing connection! (#0) with host myhost.com
* Connected to myhost.com (184.xxx.xxx.xxx) port 21 (#0)
* Request has same path as previous transfer
> PASV
* Connect data stream passively
* ftp_perform ends with SECONDARY: 0
< 452 Can't open data connection.
* Bad PASV/EPSV response: 452
* Remembering we are in dir "my-dir/"
* Uploaded unaligned file size (0 out of 113987 bytes)* Connection #0 to host mysite.com left intact
curl: (13) Bad PASV/EPSV response: 452
Mon Sep 16 18:50:06 UTC 2019: fatal: Could not upload files., exiting...

 

I can connect using filezilla or any other ftp client with the same credentials - plus this was working perfectly until a few days back.

I can guarantee that its definitely not an issue with any of my variables and also my server doesn't have any issues because I'm unable to deploy to any server all of a sudden. How do I get this sorted. Nothing is literally working here and I'm stuck with pipelines that are literally useless at the moment. It was working fine then all of a sudden its as though bitbucket stopped working on me.

1 answer

1 vote
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2019

Hello @Mohammad Ali,

452 FTP status code means:

Requested action not taken. Insufficient storage space in system. File unavailable (e.g., file busy).

So I believe there's no space left on the remote, or one of the files can't be updated.

Hope this helps.

Cheers,
Daniil

Mohammad Ali September 16, 2019

I doubt that - cos I have two different destinations set up and deployments to both don't work. Also if one file isn't being uploaded - how do I find out which file it is. Theres nothing in the output that suggests anything.

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2019

Well, I can't tell much about specifics of FTP. 452 is the return code in the output, and I quoted its meaning. I guess you need to check the remote side.

I don't think it is an issue with your pipeline configuration or Pipelines engine because the error message and return code definitely look related to FTP: Bad PASV/EPSV response: 452, i.e. returned by the FTP server.

Mohammad Ali September 16, 2019

I don't think that is the issue - I have pipelines set on another repository - to another server. That also doesn't work. Gives me this error:

+ git ftp push -u "$FTP_STAGE_USERNAME" -p "$FTP_STAGE_PASSWORD" ftp://$FTP_STAGE_PLUGIN --forcefatal: Could not get last commit. Network down? Wrong URL? Use 'git ftp init' for the initial push., exiting...

 

It doesn't matter what the destination is - the deployment is not working at all.

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2019

So you seem to be using this extension for FTP commands. Can you please add -vv option to your command and run the pipeline again to see the debug output?

Pipelines are running a container of the  Docker image specified in your configuration and executing commands specified in the script section within that container. So all in all, Pipelines don't really have much control of what is happening inside of the container, besides restricting resources it can consume (like CPU and RAM). Hence any errors are very likely introduced by the software running in the container or by the remote side if the commands in your script establish any connections with the outer world. Pipelines basically provide connectivity, the rest is on the software inside the Docker image you specified. Does this make sense?

To summarise, you can verify that connection to your remote FTP server can be established by adding a command like

telnet <your_remote_host> 21

and checking its output. The rest is really up to the git ftp extension within the container.

Having that said, I believe debug output of the git ftp extension might shed some light on what's happening.

Cheers,
Daniil

Mohammad Ali September 16, 2019

You're right that I'm using the same extension. The issue is why has it stopped working all of a sudden. I did try to rewrite the pipeline to use the ftp pipe but it was so slow that it wasn't of any practical use. Anyway I've run the pipeline again using git ftp -vv and the output you can see on this gist link:

 

https://gist.github.com/maliakmal/c67c207ca1e79b487cc8fd9499e52dbe

 

Its claiming that git ftp init has to be run - init was already run. And if I try to run git ftp init again it gives again a similar error.

Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 17, 2019

Thanks for posting verbose log!

It suggests running init as a fallback after failing to establish a connection. Which, in turn, is caused by a response from FTP server:

> PASV
< 452 Can't open data connection.
* Bad PASV/EPSV response: 452

Have you tried running your pipeline locally? Does that work?

Do raw commands work from your local machine?

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events