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

Incorrect warning for guessed Java path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • ssh-slaves-plugin
    • None
    • Jenkins v2.263.4
      ssh-slaves-plugin v1.31.5

      Starting with version 1.31.5 my team now sees a "WARNING" in "jenkins.log" for every build agent/"slave" that connects. This was introduced with the deprecation of "JavaVersionChecker", pull-request #203

      WARNING hudson.plugins.sshslaves.JavaVersionChecker resolveJava Java is not in the PATH nor configured with the javaPath setting, Jenkins will try to guess where is Java,this guess will be remove in the future.
      

      https://github.com/jenkinsci/ssh-slaves-plugin/pull/203

      It seems the warning is produced for every failed guess on the Java binary that is not just 'java' (the "PATH" possibility). As noted in the comments for issue #43779, the order of "resolution" of Java version implies that guesses are made in a particular order.

      https://issues.jenkins.io/browse/JENKINS-43779

      In my team's case the agents are set up with the desired Java version in their "PATH" and because of this we now see this warning. I believe it is an error to produce this warning when a guessed Java binary is not the actual Java binary on a particular system. As long as Java is successfully resolved, why produce a warning?

       

            ifernandezcalvo Ivan Fernandez Calvo
            lmarthorburn Lavina
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: