[JIRA] (JENKINS-51352) Windows slave not getting connected

3 views
Skip to first unread message

gaurav.negi@gmail.com (JIRA)

unread,
May 15, 2018, 10:35:02 PM5/15/18
to jenkinsc...@googlegroups.com
Gaurav Negi created an issue
 
Jenkins / Bug JENKINS-51352
Windows slave not getting connected
Issue Type: Bug Bug
Assignee: Unassigned
Components: ssh-plugin
Created: 2018-05-16 02:34
Environment: Jenkins Master: Ubuntu
Jenkins Slave: Windows 10
Priority: Blocker Blocker
Reporter: Gaurav Negi

Dear All,

  I have got struck with an issue, I am seeing very 1st time with Jenkins. 

1. I am using Jenkins Master as Ubuntu VM and Jenkins slave on Windows 10. 

2. I have openssh running on window slave. 

3. I am not able to bring Jenkins window slave online. It can authenticate, but running command

 cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar slave.jar

 

fails

[05/15/18 19:23:50] [SSH] Copied 745,674 bytes. Expanded the channel window size to 4MB [05/15/18 19:23:50] [SSH] Starting slave process: cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar slave.jar <===[JENKINS REMOTING CAPACITY]===>Error: Unable to access jarfile slave.jar Slave JVM has terminated. Exit code=1 [05/15/18 19:23:50] Launch failed - cleaning up connection [05/15/18 19:23:50] [SSH] Connection closed.

4. I can reproduce the same by  manually run following command from Jenkins master

Command 
cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar slave.jar
 
Fails
But If I run (with full path of slave.jar) it works. 
cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar D:\jenkins\slave.jar
 
 
Can I please know what can I do to fix it? How can I change the command that Jenkins master is running to connect to slave? 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

gaurav.negi@gmail.com (JIRA)

unread,
May 15, 2018, 10:39:01 PM5/15/18
to jenkinsc...@googlegroups.com
Gaurav Negi updated an issue
Change By: Gaurav Negi
Dear All,

  I have got struck with an issue, I am seeing very 1st time with Jenkins. 

1. I am using Jenkins Master as Ubuntu VM and Jenkins slave on Windows 10. 

2. I have openssh running on window slave. 

3. I am not able to bring Jenkins window slave online. It can authenticate, but running command

 cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar slave.jar
"

 

fails

[05/15/18 19:23:50] [SSH] Copied 745,674 bytes. Expanded the channel window size to 4MB [05/15/18 19:23:50] [SSH] Starting slave process: cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar slave.jar <===[JENKINS REMOTING CAPACITY]===>Error: Unable to access jarfile slave.jar Slave JVM has terminated. Exit code=1 [05/15/18 19:23:50] Launch failed - cleaning up connection [05/15/18 19:23:50] [SSH] Connection closed.

4. I can reproduce the same by  manually run following command from Jenkins master

Command 
ssh user@jenkinsslave " cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar slave.jar "
 
Fails
But If I run (with full path of slave.jar) it works. 
ssh user@jenkinsslave " cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar D:\jenkins\slave.jar "
 
 
Can I please know what can I do to fix it? How can I change the command that Jenkins master is running to connect to slave?

 

gaurav.negi@gmail.com (JIRA)

unread,
May 15, 2018, 10:48:01 PM5/15/18
to jenkinsc...@googlegroups.com
Gaurav Negi updated an issue

Attached is the log

Change By: Gaurav Negi
Attachment: Error_log.txt

o.v.nenashev@gmail.com (JIRA)

unread,
May 16, 2018, 4:15:01 AM5/16/18
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Component/s: _unsorted
Component/s: ssh-plugin

o.v.nenashev@gmail.com (JIRA)

unread,
May 16, 2018, 4:18:05 AM5/16/18
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Bug JENKINS-51352
 
Re: Windows slave not getting connected

From what I see in the output it firstly copies slave.jar to the remoteDir defined in agent settings, but then your script switches to the directory and likely just fails to find the file there.

Please provide your agent configuration XML.

o.v.nenashev@gmail.com (JIRA)

unread,
May 16, 2018, 4:18:06 AM5/16/18
to jenkinsc...@googlegroups.com
Oleg Nenashev updated an issue
Change By: Oleg Nenashev
Component/s: ssh-slaves-plugin

ifernandezcalvo@cloudbees.com (JIRA)

unread,
Jul 20, 2018, 7:07:01 AM7/20/18
to jenkinsc...@googlegroups.com
Change By: Ivan Fernandez Calvo
Status: Open Fixed but Unreleased
Resolution: Incomplete
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

nedyalkor@gmail.com (JIRA)

unread,
Nov 14, 2018, 2:05:02 PM11/14/18
to jenkinsc...@googlegroups.com
Ned Radev commented on Bug JENKINS-51352
 
Re: Windows slave not getting connected

Gaurav Negi I found a workaround for this. It's related to the different drive you are using - in your case D: You can fix it by prefixing slave start command with "D: && ". You can find it in Advanced settings of SSH launch method. Your start command should look like this after the change - "D: && cd "D:\jenkins" && java -Xms2048m -Xmx4096m -jar slave.jar"

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

pfeuffer@informatik.uni-tuebingen.de (JIRA)

unread,
Jun 18, 2019, 7:18:02 AM6/18/19
to jenkinsc...@googlegroups.com

Thanks, the workaround solved it for me, too. When will this be released? The status says fixed.

kuisathaverat@gmail.com (JIRA)

unread,
Feb 1, 2020, 12:11:04 PM2/1/20
to jenkinsc...@googlegroups.com
Status: Fixed but Unreleased Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

shubham.aggarwal@devfactory.com (JIRA)

unread,
Apr 10, 2020, 3:49:04 PM4/10/20
to jenkinsc...@googlegroups.com
Shubham Aggarwal commented on Bug JENKINS-51352
 
Re: Windows slave not getting connected

Looks like it still isn't released. After a lot of trial-and-error, I ended up here and this workaround worked for me.

 

This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages