Did some further investigating on our end and found this issue was being caused by the labels on our JDK Installers.

Jobs that were consistently failing were set to use an installer with the label "linux" (as seen in jdk-installations.jpg, attached). However, none of our slaves were actually labeled "linux" in Jenkins. When a build would start, Jenkins would check the prescribed JDK, look over its installers, see that none of them match its labels, and move on to the default JDK setting: /bin/java

We've fixed the label misalignment on our Jenkins instance and all builds are accepting these JDKs without incident.

This said:

  • While the problem was on our end, there were no errors or warnings to point us in the right direction. Something along the lines of "Label Mismatch: ${yourDesiredJDKSetting} has no valid JDK installers for ${thisSlave}. Using default JDK settings." would have been fantastic. Even something as simple as "No valid JDK installers found. Using default JDK settings." would have been a clue.
  • I found this label mismatch was killing Maven jobs and Freeform jobs using the "Invoke Maven 3" Build Task, but Freeform jobs using the "Invoke top-level Maven targets" step were running fine. I'm not sure what JDK they were using, though. Certainly not the JDK we set (which the mismatch should ignore) or the default /bin/java (which doesn't exist). This could be a nasty bug to people who use that build step and want to control the version of Java on a per-job basis.
  • I think the bin/java/ problem "after a slave is started", as mentioned in the description, is a separate-but-related issue. Fresh after a restart, a slave has some but not all of its labels set. It has hardcoded labels we use to state "Yes, this slave can do maven builds", but lacks environment-based labels that are used by our JDK installers. We generate those labels with the platformlabeler plugin, so I believe this plugin occasionally 'takes too long' to trigger and any builds that run in the meantime are doomed to fail. (Note: I haven't verified this bad-label state, but it seems likely now that we understand the JDK issue explored here.)
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to