bamboo SSH/SCP task failed to deploy a file into another server, but through CLI it works

Deleted user May 6, 2016

Hello,

I am going to deploy a war file from bamboo server to a different server by using SSH Task. When I run the plan it was showing...

Failed to connect to host
net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods

But if I am running the same command through putty it can deploy the war file to that particular server. 

I am using the below mentioned command.

scp /apps/bamboo.home/xml-data/build-dir/3604482/SCI-SER-JOB1/ServicehubV0.2/target/ServicehubV0.2-1.0.0-SNAPSHOT.war root@10.10.16.47:/apps/liferay-portal-6.2-ce-ga6/deploy/

 

Again,

If I perform the same job through a SCP Task it was showing " There were no files to upload." 

In SCP Task I am selecting Artifact- Local Files

Local File Path- /apps/bamboo.home/xml-data/build-dir/3604482/SCI-SER-JOB1/ServicehubV0.2/target/ServicehubV0.2

 

and remote path- /apps/liferay-portal-6.2-ce-ga6/deploy/

My bamboo version- 5.10.2

This is a Liferay Project

Project is maven build

Project repository GitLab.

Is there any idea why I am getting this error?

Thanks in advance.

1 answer

0 votes
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 6, 2016

Hello @Subhra Deep Das,

First of all you should look at destination host SSH logs. You can enable debug logs at /etc/ssh/sshd_config - LogLevel DEBUG

Then start failed task and look at your SSH server logs. As it was mentioned at https://jira.atlassian.com/browse/BAM-12694 issue maybe in your SSH server configuration or specific list of authorization protocols which SSH server and host where Bamboo agent runs

Deleted user May 9, 2016

@Alexey Chystoprudov

Hi,

Thanks for your reply. 

I am going to do this via SCP task. But SCP task was not working, nothing deployed in remote host, it complete successfully but in log it was showing " There were no files to upload." Its config are I am mentioning below.

Host- IP Address of the remote host

Username- root

Authentication- Password

Artifact- Local file

Now my question is that what is the local path. In my case the path is  " /apps/bamboo.home/xml-data/build-dir/3604482/SCI-SER-JOB1/ServicehubV0.2/target " under this dir I have the .war file what I need to upload.

So I am providing my local path like this way, " 3604482/SCI-SER-JOB1/ServicehubV0.2/target /ServicehubV0.2-1.0.0-SNAPSHOT.war " as in documentation it was mentioned that I need to provide the relative path and in bamboo.cfg.xml I have seen "buildWorkingDir">${bambooHome}/xml-data/build-dir. So I am providing the path relative to the bamboo working directory.

But still it was showing  " There were no files to upload." 

Do you have any idea how to resolve this????

I am using bamboo- 5.10.2

Both are CentOS 7

This is a Liferay Project

Project is maven build

Project repository GitLab.

 

Deleted user May 10, 2016

in var/log/secure of the remote host

 

May 10 06:23:22 psyce310 polkitd[799]: Registered Authentication Agent for unix-process:6117:187554339 (system bus name :1.1432 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
May 10 06:23:22 psyce310 sshd[1239]: Received signal 15; terminating.
May 10 06:23:22 psyce310 polkitd[799]: Unregistered Authentication Agent for unix-process:6117:187554339 (system bus name :1.1432, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
May 10 06:23:22 psyce310 sshd[6123]: Server listening on 0.0.0.0 port 22.
May 10 06:23:22 psyce310 sshd[6123]: Server listening on :: port 22.
May 10 06:23:27 psyce310 polkitd[799]: Registered Authentication Agent for unix-process:6124:187554758 (system bus name :1.1433 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
May 10 06:23:27 psyce310 sshd[6123]: Received signal 15; terminating.
May 10 06:23:27 psyce310 polkitd[799]: Unregistered Authentication Agent for unix-process:6124:187554758 (system bus name :1.1433, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
May 10 06:23:27 psyce310 sshd[6130]: Server listening on 0.0.0.0 port 22.
May 10 06:23:27 psyce310 sshd[6130]: Server listening on :: port 22.
May 10 06:24:55 psyce310 sshd[6195]: Accepted publickey for root from 10.10.16.39 port 56766 ssh2: RSA 77:b3:b2:01:1e:6e:29:ef:20:c4:5b:90:15:27:11:aa
May 10 06:24:55 psyce310 sshd[6195]: pam_unix(sshd:session): session opened for user root by (uid=0)
May 10 06:24:55 psyce310 sshd[6206]: Accepted publickey for root from 10.10.16.47 port 53390 ssh2: RSA 77:b3:b2:01:1e:6e:29:ef:20:c4:5b:90:15:27:11:aa
May 10 06:24:56 psyce310 sshd[6206]: pam_unix(sshd:session): session opened for user root by (uid=0)
May 10 06:24:56 psyce310 sshd[6206]: Received disconnect from 10.10.16.47: 11: disconnected by user
May 10 06:24:56 psyce310 sshd[6195]: Received disconnect from 10.10.16.39: 11:
May 10 06:24:56 psyce310 sshd[6195]: pam_unix(sshd:session): session closed for user root
May 10 06:24:56 psyce310 sshd[6206]: pam_unix(sshd:session): session closed for user root
May 10 06:27:53 psyce310 sshd[6217]: Accepted publickey for root from 10.10.16.39 port 56776 ssh2: RSA 77:b3:b2:01:1e:6e:29:ef:20:c4:5b:90:15:27:11:aa
May 10 06:27:53 psyce310 sshd[6217]: pam_unix(sshd:session): session opened for user root by (uid=0)
May 10 06:27:53 psyce310 sshd[6228]: Accepted publickey for root from 10.10.16.47 port 53397 ssh2: RSA 77:b3:b2:01:1e:6e:29:ef:20:c4:5b:90:15:27:11:aa
May 10 06:27:53 psyce310 sshd[6228]: pam_unix(sshd:session): session opened for user root by (uid=0)
May 10 06:27:53 psyce310 sshd[6228]: Received disconnect from 10.10.16.47: 11: disconnected by user
May 10 06:27:53 psyce310 sshd[6217]: Received disconnect from 10.10.16.39: 11:
May 10 06:27:53 psyce310 sshd[6228]: pam_unix(sshd:session): session closed for user root
May 10 06:27:53 psyce310 sshd[6217]: pam_unix(sshd:session): session closed for user root

Deleted user May 10, 2016

anyone have some idea???

Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2016

Well, nothing interesting in this logs from remote side. Looks like client decided to close connection. Can you please add log4j.logger.net.schmizz.sshj = DEBUG to Bamboo log4j settings to see logs from client side? https://confluence.atlassian.com/display/BAMBOO/Logging+in+Bamboo

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events