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

Incomplete fix for issue with Java installed into a path with spaces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: ssh-slaves-plugin
    • Labels:
      None
    • Environment:
      Jenkins Jenkins ver 2.263.1
      ssh-slaves-plugin 1.31.4
      Windows Node using cygwin
      JAVA_HOME set on node to : C:\Program Files\Java\jre8
    • Similar Issues:
    • Released As:
      ssh-slaves-1.31.5

      Description

      Fix for PR https://github.com/jenkinsci/ssh-slaves-plugin/pull/183 is incomplete.

      The fix have resolved the check version issue we had before :

      Couldn't figure out the Java version of c:\Program Files\Java\jre8/bin/java
      bash: c:Program: command not found

      But now the agent start is failing :

      [12/09/20 11:54:29] [SSH] Starting agent process: cd "e:\jenkins-p" && C:/Program Files/Java/jre8/bin/java -jar remoting.jar -workDir e:\jenkins-p -jar-cache e:\jenkins-p/remoting/jarCache
      bash: C:/Program: No such file or directory

        Attachments

          Issue Links

            Activity

            merlindam Damien Merlin created issue -
            merlindam Damien Merlin made changes -
            Field Original Value New Value
            Description Fix for PR [https://github.com/jenkinsci/ssh-slaves-plugin/pull/183] is incomplete.

            The fix have resolved the check version issue we had before :

             {{Couldn't figure out the Java version of c:\Program Files\Java\jre8/bin/java
            bash: c:Program: command not found}}

            But now the agent start is failing :

            {{12/09/20 11:54:29] [SSH] Starting agent process: cd "e:\jenkins-p" && C:/Program Files/Java/jre8/bin/java -jar remoting.jar -workDir e:\jenkins-p -jar-cache e:\jenkins-p/remoting/jarCache
            bash: C:/Program: No such file or directory}}{{}}
            Fix for PR [https://github.com/jenkinsci/ssh-slaves-plugin/pull/183] is incomplete.

            The fix have resolved the check version issue we had before :

            _Couldn't figure out the Java version of c:\Program Files\Java\jre8/bin/java_
             _bash: c:Program: command not found_

            But now the agent start is failing :

            _[12/09/20 11:54:29] [SSH] Starting agent process: cd "e:\jenkins-p" && C:/Program Files/Java/jre8/bin/java -jar remoting.jar -workDir e:\jenkins-p -jar-cache e:\jenkins-p/remoting/jarCache_
             _bash: C:/Program: No such file or directory_
            merlindam Damien Merlin made changes -
            Priority Minor [ 4 ] Major [ 3 ]
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment -

            could you copy the configuration of the agent here? the log contains a JSON file with all the parameters, I think that the problem is the double quotes you have in the java command, but I need your configuration to replicate the issue.

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - could you copy the configuration of the agent here? the log contains a JSON file with all the parameters, I think that the problem is the double quotes you have in the java command, but I need your configuration to replicate the issue.
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Assignee Ivan Fernandez Calvo [ ifernandezcalvo ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Priority Major [ 3 ] Minor [ 4 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Component/s ssh-slaves-plugin [ 15578 ]
            Component/s ssh-agent-plugin [ 17509 ]
            merlindam Damien Merlin made changes -
            Environment Jenkins Jenkins ver 2.263.1
            ssh-agent-plugin 1.31.4
            Windows Node using cygwin
            JAVA_HOME set on node to : C:\Program Files\Java\jre8
            Jenkins Jenkins ver 2.263.1
            ssh-slaves-plugin 1.31.4
            Windows Node using cygwin
            JAVA_HOME set on node to : C:\Program Files\Java\jre8
            Hide
            merlindam Damien Merlin added a comment -

            Ivan Fernandez Calvo Not sure what you mean by 'the log contains a JSON file with all the parameters'

            Here is our config.xml :

            $cat config.xml
            <?xml version='1.1' encoding='UTF-8'?>
            <slave>
            <name>test-w10-64-test-template</name>
            <description>Windows 10 64bit</description>
            <remoteFS>e:\jenkins-p</remoteFS>
            <numExecutors>2</numExecutors>
            <mode>EXCLUSIVE</mode>
            <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
            <launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="ssh-slaves@1.31.4">
            <host>mytestwindowsmachine.com</host>
            <port>22</port>
            <credentialsId>KEY-jenkins</credentialsId>
            <launchTimeoutSeconds>60</launchTimeoutSeconds>
            <maxNumRetries>10</maxNumRetries>
            <retryWaitTime>15</retryWaitTime>
            <sshHostKeyVerificationStrategy class="hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy"/>
            <tcpNoDelay>true</tcpNoDelay>
            </launcher>
            <label>test windows windows10 x64</label>
            <nodeProperties>
            <hudson.slaves.EnvironmentVariablesNodeProperty>
            <envVars serialization="custom">
            <unserializable-parents/>
            <tree-map>
            <default>
            <comparator class="hudson.util.CaseInsensitiveComparator"/>
            </default>
            <int>3</int>
            <string>ENV_PROPERTIES</string>
            <string>e:\jenkins-p\environmentProperties</string>
            <string>JAVA_HOME</string>
            <string>C:/Program Files/Java/jre8</string>
            <string>JROOT</string>
            <string>e:\jenkins-p</string>
            </tree-map>
            </envVars>
            </hudson.slaves.EnvironmentVariablesNodeProperty>
            </nodeProperties>

            Show
            merlindam Damien Merlin added a comment - Ivan Fernandez Calvo Not sure what you mean by 'the log contains a JSON file with all the parameters' Here is our config.xml : $cat config.xml <?xml version='1.1' encoding='UTF-8'?> <slave> <name>test-w10-64-test-template</name> <description>Windows 10 64bit</description> <remoteFS>e:\jenkins-p</remoteFS> <numExecutors>2</numExecutors> <mode>EXCLUSIVE</mode> <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/> <launcher class="hudson.plugins.sshslaves.SSHLauncher" plugin="ssh-slaves@1.31.4"> <host>mytestwindowsmachine.com</host> <port>22</port> <credentialsId>KEY-jenkins</credentialsId> <launchTimeoutSeconds>60</launchTimeoutSeconds> <maxNumRetries>10</maxNumRetries> <retryWaitTime>15</retryWaitTime> <sshHostKeyVerificationStrategy class="hudson.plugins.sshslaves.verifiers.NonVerifyingKeyVerificationStrategy"/> <tcpNoDelay>true</tcpNoDelay> </launcher> <label>test windows windows10 x64</label> <nodeProperties> <hudson.slaves.EnvironmentVariablesNodeProperty> <envVars serialization="custom"> <unserializable-parents/> <tree-map> <default> <comparator class="hudson.util.CaseInsensitiveComparator"/> </default> <int>3</int> <string>ENV_PROPERTIES</string> <string>e:\jenkins-p\environmentProperties</string> <string>JAVA_HOME</string> <string>C:/Program Files/Java/jre8</string> <string>JROOT</string> <string>e:\jenkins-p</string> </tree-map> </envVars> </hudson.slaves.EnvironmentVariablesNodeProperty> </nodeProperties>
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Attachment screenshot-1.png [ 53570 ]
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited

            you have to use the javaPath setting (on advanced settings) to pass the correct version of Java to run the remoting process, there you can set your java command to "C:/Program Files/Java/jre8/bin/java" with the quotes.

             

            The recommended way to grab the Java to run the remoting process if to take the java command you have in your path, to change it the recommended way is to set the javaPath setting.

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - - edited you have to use the javaPath setting (on advanced settings) to pass the correct version of Java to run the remoting process, there you can set your java command to "C:/Program Files/Java/jre8/bin/java" with the quotes.   The recommended way to grab the Java to run the remoting process if to take the java command you have in your path, to change it the recommended way is to set the javaPath setting.
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Remote Link This issue links to "PR (Web Link)" [ 26360 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Link This issue causes JENKINS-64420 [ JENKINS-64420 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Remote Link This issue links to "PR2 (Web Link)" [ 26361 ]
            Hide
            merlindam Damien Merlin added a comment -

            As stated in the PR this issue is corrected by : https://github.com/jenkinsci/ssh-slaves-plugin/pull/202

            Ivan Fernandez Calvo should I moved the issue to Resolve myself ?

            Any ETA for a 1.31.5 delivery ?

             

            Show
            merlindam Damien Merlin added a comment - As stated in the PR this issue is corrected by : https://github.com/jenkinsci/ssh-slaves-plugin/pull/202 Ivan Fernandez Calvo should I moved the issue to Resolve myself ? Any ETA for a 1.31.5 delivery ?  
            Hide
            ifernandezcalvo Ivan Fernandez Calvo added a comment -

            I will release a new version this weekend, then I will Resolve all related issues

            Show
            ifernandezcalvo Ivan Fernandez Calvo added a comment - I will release a new version this weekend, then I will Resolve all related issues
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Released As ssh-slaves-1.31.5
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            ifernandezcalvo Ivan Fernandez Calvo made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              Assignee:
              ifernandezcalvo Ivan Fernandez Calvo
              Reporter:
              merlindam Damien Merlin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: