-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
jenkins 2.164.2 LTS
SSH Slaves plugin 1.29.4
Master using OpenJDK 1.8.0_151 on Mac OS X Mojave 10.14.4
Agent is an EC2 instance running Windows Server 2012 R2 and Oracle JRE 1.8.0_201
For the Windows agent, I installed https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v7.9.0.0p1-Beta
as per the section "On earlier versions of Windows" and also "Configuring SSH server" from https://winscp.net/eng/docs/guide_windows_openssh_server
Note: I did not install Cygwin on this WIndows agent.jenkins 2.164.2 LTS SSH Slaves plugin 1.29.4 Master using OpenJDK 1.8.0_151 on Mac OS X Mojave 10.14.4 Agent is an EC2 instance running Windows Server 2012 R2 and Oracle JRE 1.8.0_201 For the Windows agent, I installed https://github.com/PowerShell/Win32-OpenSSH/releases/tag/v7.9.0.0p1-Beta as per the section "On earlier versions of Windows" and also "Configuring SSH server" from https://winscp.net/eng/docs/guide_windows_openssh_server Note: I did not install Cygwin on this WIndows agent.
I was able to successfully connect the Windows machine with PowerShell/Win32-OpenSSH using the "SSH Build Agents Plugin for Jenkins" using the "Remote root directory" of "C:\jenkins-agent", and I'm able to run Windows builds on this agent.
The issue occurs when I change the "Remote root directory" to "D:\jenkins-agent", then the agent fails to launch:
[04/20/19 09:21:28] [SSH] Remote file system root D:\jenkins-agent does not exist. Will try to create it...
[04/20/19 09:21:28] [SSH] Copying latest remoting.jar...
[04/20/19 09:21:29] [SSH] Copied 789,283 bytes.
Expanded the channel window size to 4MB
[04/20/19 09:21:29] [SSH] Starting agent process: cd "D:\jenkins-agent" && "C:\Program Files (x86)\Java\jre1.8.0_201\bin\java.exe" -jar remoting.jar -workDir D:\jenkins-agent
Error: Unable to access jarfile remoting.jar
Slave JVM has terminated. Exit code=1
[04/20/19 09:21:29] Launch failed - cleaning up connection
[04/20/19 09:21:29] [SSH] Connection closed.
The root cause appears to be that the command 'cd "D:\jenkins-agent"' does not successfully change to the D:\ drive, because when using Windows command prompt, you need to add the '/d' argument to the 'cd' command to change the drive:
/d : Changes the current drive or the current directory for a drive.
- duplicates
-
JENKINS-55362 Support command profiles
- Open
- links to