No such file or directory - FTP finished but not deployed
Asked by cljayashan:

I'm trying to deploy a simple NodeJS app into 000webhost thorugh a Pipeline.

Here is my code :

![yml.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/268754i2B6D3ACB147EDE88/image-size/large?v=v2&px=999 "yml.JPG")

I'm ablt to download artifact like below image:

![yml2.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/268755i0409759D6F62B645/image-size/large?v=v2&px=999 "yml2.JPG")

But I get an error **"mirror: Access failed: /opt/atlassian/pipelines/agent/build/application.zip: No such file or directory"**

comple log like below:

+ docker container run \\  
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \\  
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \\  
--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \\  
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \\  
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/ftp-deploy:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/ftp-deploy \\  
--workdir=$(pwd) \\  
--label=org.bitbucket.pipelines.system=true \\  
--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \\  
--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \\  
--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \\  
--env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \\  
--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \\  
--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \\  
--env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \\  
--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \\  
--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \\  
--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \\  
--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \\  
--env=BITBUCKET_PARALLEL_STEP_COUNT="$BITBUCKET_PARALLEL_STEP_COUNT" \\  
--env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \\  
--env=CI="$CI" \\  
--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \\  
--env=BITBUCKET_PARALLEL_STEP="$BITBUCKET_PARALLEL_STEP" \\  
--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \\  
--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \\  
--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \\  
--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \\  
--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \\  
--env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \\  
--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \\  
--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \\  
--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \\  
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \\  
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \\  
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/ftp-deploy" \\  
--env=DEBUG="true" \\  
--env=LOCAL_PATH="application.zip" \\  
--env=PASSWORD="***PASSWORD*** " \\  
--env=REMOTE_PATH="/public_html/" \\  
--env=SERVER="files.000webhost.com:21" \\  
--env=SET_ARGS="ssl:verify-certificate false" \\  
--env=USER="***USERNAME*** " \\  
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \\  
bitbucketpipelines/ftp-deploy:0.4.1  
Unable to find image 'bitbucketpipelines/ftp-deploy:0.4.1' locally  
0.4.1: Pulling from bitbucketpipelines/ftp-deploy  
f56be85fc22e: Pulling fs layer  
593f4bd9455f: Pulling fs layer  
fbf16d0592d2: Pulling fs layer  
8af59d63b818: Pulling fs layer  
8af59d63b818: Waiting  
fbf16d0592d2: Verifying Checksum  
fbf16d0592d2: Download complete  
f56be85fc22e: Verifying Checksum  
f56be85fc22e: Download complete  
593f4bd9455f: Verifying Checksum  
593f4bd9455f: Download complete  
f56be85fc22e: Pull complete  
8af59d63b818: Verifying Checksum  
8af59d63b818: Download complete  
593f4bd9455f: Pull complete  
fbf16d0592d2: Pull complete  
8af59d63b818: Pull complete  
Digest: sha256:b39b5661616e670dc595bb710198f1001e71ca3393f42c2ab0b7d4bd6d4aa16b  
Status: Downloaded newer image for bitbucketpipelines/ftp-deploy:0.4.1  
+ LFTP_DEBUG_ARGS=-vvv  
+ run_pipe  
+ info 'Starting FTP deployment to files.000webhost.com:21:/public_html/...'  
+ echo -e '\\e\[36mINFO: Starting FTP deployment to files.000webhost.com:21:/public_html/...\\e\[0m'  
+ set +e  
INFO: Enabling debug mode.  
INFO: Starting FTP deployment to files.000webhost.com:21:/public_html/...  
+ lftp -u ***USERNAME*** ,***PASSWORD*** -e 'set ssl:verify-certificate false; mirror --delete-first -vvv -R application.zip /public_html/;quit' files.000webhost.com:21  
mirror: Access failed: /opt/atlassian/pipelines/agent/build/application.zip: No such file or directory  
+ set -e  
+ STATUS=0  
+ \[\[ 0 == \\0 \]\]  
+ success 'Deployment finished.'  
+ echo -e '\\e\[32m? Deployment finished.\\e\[0m'  
+ exit 0  
? Deployment finished.

I can connect to the server using FileZilla using same FTP

how to figure this out?

Thanks in advance


Answers:
author: Mark C
body: Hi [@cljayashan](/t5/user/viewprofilepage/user-id/2412410),

Thank you for reaching out to the community.

It seems the file isn't being uploaded, I'd recommend trying to use a folder instead.  
For your script, would you be able to try to create a new folder "dist" and move the zip file there?

```
- ls -al- mkdir -p dist- mv application.zip ./dist/application.zip
```

After that, for your Pipes script (atlassian/ftp-deploy), change the **LOCAL_PATH** and use the "dist" folder instead.

```
Unable to find source-code formatter for language: java. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yamlLOCAL_PATH: 'dist/'
```

Regards,  
Mark C


Tags: bitbucket-cloud

cloud