Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-66334

SSH agent not starting because of wrong cd command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.289.3
      SSH Agent Plugin 1.23

      When Jenkins tries to open connection to the SSH agent it uses the command "cd "D:\Jenkins" && java -jar remoting.jar -workDir D:\Jenkins -jar-cache D:\Jenkins/remoting/jarCache"

      If the working folder is not in C drive, the cd command will not work, as it needs to be:

      d:

      cd "D:\Jenkins"

       

      instead of just cd "D:\Jenkins"

       

      [08/09/21 10:22:24] [SSH] Checking java version of java
      [08/09/21 10:22:24] [SSH] java -version returned 1.8.0_301.
      [08/09/21 10:22:24] [SSH] Starting sftp client.
      [08/09/21 10:22:24] [SSH] Copying latest remoting.jar...
      Source agent hash is *************. Installed agent hash is *************
      Verified agent jar. No update is necessary.
      Expanded the channel window size to 4MB
      [08/09/21 10:22:24] [SSH] Starting agent process: cd "D:\Jenkins" && java -jar remoting.jar -workDir D:\Jenkins -jar-cache D:\Jenkins/remoting/jarCache
      Error: Unable to access jarfile remoting.jar
      Agent JVM has terminated. Exit code=1
      [08/09/21 10:22:24] Launch failed - cleaning up connection
      [08/09/21 10:22:24] [SSH] Connection closed.

            Unassigned Unassigned
            ioana ioana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: