Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SFTP connection timeout issue

Edited

I have configured the pipeline as below.

 

- pipe: atlassian/sftp-deploy:0.5.7
variables:
USER: 'oracle'
SERVER: '120.139.9.213'
REMOTE_PATH: "/home/oracle/testDeploy"
LOCAL_PATH: '$BITBUCKET_CLONE_DIR/release_package/*'
PASSWORD: 'xxxxxx'
DEBUG: 'true'
EXTRA_ARGS: '-P 2232'
#EXTRA_ARGS: ["-P", "2232"]

I am able to SFTP using winscp to the host with password

 

Please find the logs below.

--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \ --env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \ --env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \ --env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \ --env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \ --env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \ --env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \ --env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \ --env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \ --env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \ --env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \ --env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \ --env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \ --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/sftp-deploy" \ --env=DEBUG="true" \ --env=EXTRA_ARGS="-P 2232" \ --env=LOCAL_PATH="$BITBUCKET_CLONE_DIR/release_package/*" \ --env=PASSWORD="" \ --env=REMOTE_PATH="/home/oracle/testDeploy" \ --env=SERVER="120.139.9.213" \ --env=USER="oracle" \ --add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \ bitbucketpipelines/sftp-deploy:0.5.7Unable to find image 'bitbucketpipelines/sftp-deploy:0.5.7' locally0.5.7: Pulling from bitbucketpipelines/sftp-deploy31603596830f: Pulling fs layer5223754e1462: Pulling fs layere082d8591f92: Pulling fs layer11c53ae80555: Pulling fs layer3dc58ede5d22: Pulling fs layer3dc58ede5d22: Waiting11c53ae80555: Waitinge082d8591f92: Verifying Checksume082d8591f92: Download complete31603596830f: Verifying Checksum31603596830f: Download complete5223754e1462: Verifying Checksum5223754e1462: Download complete11c53ae80555: Verifying Checksum11c53ae80555: Download complete31603596830f: Pull complete3dc58ede5d22: Verifying Checksum3dc58ede5d22: Download complete5223754e1462: Pull completee082d8591f92: Pull complete11c53ae80555: Pull complete3dc58ede5d22: Pull completeDigest: sha256:4767af0e7706ae28565f2903e28a7747e098284eb0b6324430ada075469c4023Status: Downloaded newer image for bitbucketpipelines/sftp-deploy:0.5.7+ SFTP_DEBUG_ARGS=-v+ [[ -z  ]]+ info 'Using PASSWORD.'INFO: Enabling debug mode.INFO: Using PASSWORD.+ echo -e '\e[36mINFO: Using PASSWORD.\e[0m'+ setup_ssh_dir+ INJECTED_SSH_CONFIG_DIR=/opt/atlassian/pipelines/agent/ssh+ IDENTITY_FILE=/opt/atlassian/pipelines/agent/ssh/id_rsa_tmp+ KNOWN_HOSTS_FILE=/opt/atlassian/pipelines/agent/ssh/known_hosts+ mkdir -p /root/.ssh+ touch /root/.ssh/authorized_keys+ [[ -z ]]+ '[' '!' -f /opt/atlassian/pipelines/agent/ssh/known_hosts ']'+ cat /opt/atlassian/pipelines/agent/ssh/known_hosts+ '[' -f /root/.ssh/config ']'+ [[ -z  ]]+ chmod -R go-rwx /root/.ssh/+ run_pipe+ info 'Starting SFTP deployment to 120.139.9.213:/home/oracle/testDeploy...'+ echo -e '\e[36mINFO: Starting SFTP deployment to 120.139.9.213:/home/oracle/testDeploy...\e[0m'+ set +e+ [[ -z 3 ]]INFO: Starting SFTP deployment to 120.139.9.213:/home/oracle/testDeploy...+ debug Executing echo '"mput' '/opt/atlassian/pipelines/agent/build/release_package/*"' '|' sshpass -p ######@123 sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@120.139.9.213:/home/oracle/testDeploy+ [[ true == \t\r\u\e ]]+ echo -e '\e[37mDEBUG: Executing echo "mput /opt/atlassian/pipelines/agent/build/release_package/*" | sshpass -p  sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@120.139.9.213:/home/oracle/testDeploy\e[0m'DEBUG: Executing echo "mput /opt/atlassian/pipelines/agent/build/release_package/*" | sshpass -p #######@123 sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@120.139.9.213:/home/oracle/testDeploy+ echo 'mput /opt/atlassian/pipelines/agent/build/release_package/*'+ sshpass -p  sftp -o PubkeyAuthentication=no -rp -v -P 2232 oracle@120.139.9.213:/home/oracle/testDeployOpenSSH_7.9p1, OpenSSL 1.1.1g 21 Apr 2020debug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to 120.139.9.213 [120.139.9.213] port 2232.debug1: connect to address 120.139.9.213 port 2232: Operation timed outssh: connect to host 120.139.9.213 port 2232: Operation timed outConnection closed+ STATUS=255+ set -e

 

 

Capture.PNG

2 answers

1 accepted

0 votes
Answer accepted

Hi @Rahul Johny ,

Thank you for your question!

IMPORTANT!
Please, try to avoid post debugged output with your sensitive data.
We're highly recommend to change your service password as soon as possible.


Is provided port 2232 accessible?

yes its accessible. when connecting via WinSCP

@Oleksandr Kyrdan  yes the port is accessible

Connection timed out. Perhaps the remote system is not reachable? For example behind a Firewall?

What are the IP addresses to configure a corporate firewall? 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

570 views 15 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you