[JIRA] (JENKINS-39987) Unable to run the Build job on a slave node that has SSH key authenticaton enabled

0 views
Skip to first unread message

Jimmy.Vo@itcinfotech.com (JIRA)

unread,
Dec 1, 2016, 12:08:02 PM12/1/16
to jenkinsc...@googlegroups.com
Jimmy Vo updated an issue
 
Jenkins / Bug JENKINS-39987
Unable to run the Build job on a slave node that has SSH key authenticaton enabled
Change By: Jimmy Vo
Summary: Unable to run the Build job on a slave node that has SSH key authenticaton enabled
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

Jimmy.Vo@itcinfotech.com (JIRA)

unread,
Dec 1, 2016, 12:21:01 PM12/1/16
to jenkinsc...@googlegroups.com
Jimmy Vo updated an issue
1. Jenkins can connect to this slave node when I setup 'admin' user with adding the private key.
{quote}[12/01/16 09:00:44] [SSH] Opening SSH connection to 192.168.177.157:22.
[12/01/16 09:00:44] [SSH] Authentication successful.
[12/01/16 09:00:44] [SSH] The remote users environment is:
BASH=/bin/bash
----------------------
<===[JENKINS REMOTING CAPACITY]===>channel started
Slave.jar version:
2. 62
This is a Unix agent
Evacuated stdout
Agent successfully connected and online{quote}

2.
To create a Build job, in the Manage Jenkins --> Configure System --> SSH remote hosts, I add in the 'admin' user and hostname. After that I use this 'admin' user and hostname to set up connection to the slave node in the Build Job. In this setup user and hostname section, it doesn't have an option to add in the private key for the 'admin' user. So it shows "Authentication fail" when I run the Build job using "Execute shell script on remote host using ssh".

3. I try to use the SSH Agent Plugin and follow steps in the Jenkins wiki page to install the "Apache Tomcat Native libraries" on the slave node:
https://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin

After I install the Apache Tomcat Native libraries on the slave node, it still shows "Authentication fail".

{quote}[ssh-agent] Looking for ssh-agent implementation...
[ssh-agent]   Java/JNR ssh-agent
[ssh-agent] Registered BouncyCastle on the remote agent
[ssh-agent] Started.
....
[SSH] Exception:Auth fail
com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:452)
at com.jcraft.jsch.Session.connect(Session.java:150)
at org.jvnet.hudson.plugins.SSHSite.createSession(SSHSite.java:141)
at org.jvnet.hudson.plugins.SSHSite.executeCommand(SSHSite.java:151)
at org.jvnet.hudson.plugins.SSHBuilder.perform(SSHBuilder.java:60)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.Build$BuildExecution.build(Build.java:205)
at hudson.model.Build$BuildExecution.doRun(Build.java:162)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1720)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Build step 'Execute shell script on remote host using ssh' marked build as failure
{quote}

Please give your advice,
Thank you

Jimmy.Vo@itcinfotech.com (JIRA)

unread,
Dec 22, 2016, 1:06:01 PM12/22/16
to jenkinsc...@googlegroups.com
Jimmy commented on Bug JENKINS-39987
 
Re: Unable to run the Build job on a slave node that has SSH key authenticaton enabled

I searched and tried some solutions online, but it still didn't work.

I copy the bcprov-jdk15on-1.47.jar and bcpkix-jdk15on-1.47.jar from /var/lib/jenkins/plugins/ssh-agent/WEB-INF/lib to the /opt/jdk1.7.0_79/jre/lib/ext, but it still have the same error:

"Caused by: java.lang.VerifyError: (class: org/bouncycastle/openssl/PEMReader$EncryptedPrivateKeyParser, method: parseObject signature: (Lorg/bouncycastle/util/io/pem/PemObject;)Ljava/lang/Object Incompatible argument to function"

Jenkins ver. 2.19.1 which is installed on a CentOS 6.6 server with bouncycastle API Plugin: 2.16.0. The slave node is a CentOS 7 server.

Note: I installed the Tomcat-Library-native on both Slave node and Jenkins. Jenkins can connect to the Slave node successfully, but it fails to use the Build job using "Execute shell script on remote host using ssh". Therefore, I cannot use Jenkins to automate the tasks in the Slave node. I appreciate if you have any advice.

Jimmy.Vo@itcinfotech.com (JIRA)

unread,
Dec 22, 2016, 1:37:01 PM12/22/16
to jenkinsc...@googlegroups.com
Jimmy edited a comment on Bug JENKINS-39987
I searched and tried some solutions online, but it still didn't work.

I copy the bcprov-jdk15on-1.47.jar and bcpkix-jdk15on-1.47.jar from /var/lib/jenkins/plugins/ssh-agent/WEB-INF/lib to the /opt/jdk1.7.0_79/jre/lib/ext, but it still have the same error:

"Caused by: java.lang.VerifyError: (class: org/bouncycastle/openssl/PEMReader$EncryptedPrivateKeyParser, method: parseObject signature: (Lorg/bouncycastle/util/io/pem/PemObject;)Ljava/lang/Object ;) Incompatible argument to function"


Jenkins ver. 2.19.1 which is installed on a CentOS 6.6 server with bouncycastle API Plugin: 2.16.0. The slave node is a CentOS 7 server.

Note: I installed the Tomcat-Library-native on both Slave node and Jenkins. Jenkins can connect to the Slave node successfully, but it fails to use the Build job using "Execute shell script on remote host using ssh". Therefore, I cannot use Jenkins to automate the tasks in the Slave node. I appreciate if you have any advice.

Reply all
Reply to author
Forward
0 new messages