7

I installed a new Jenkins node on ubuntu server following the documentation on jenkins.io On my first deploy the console shows me this error:

Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/SIAL/SIAL_SVC
Checking OpenJDK installation...
FATAL: Node Jenkins doesn't seem to be running on RedHat-like distro
java.lang.IllegalArgumentException: Node Jenkins doesn't seem to be running on RedHat-like distro
    at org.jenkinsci.plugins.openjdk_native.OpenJDKInstaller.isInstalled(OpenJDKInstaller.java:96)
    at org.jenkinsci.plugins.openjdk_native.OpenJDKInstaller.performInstallation(OpenJDKInstaller.java:56)
    at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:70)
    at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:107)
    at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:220)
    at hudson.model.JDK.forNode(JDK.java:147)
    at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:339)
    at hudson.model.Run.getEnvironment(Run.java:2419)
    at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:943)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1290)
    at hudson.scm.SCM.checkout(SCM.java:505)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1213)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:637)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:509)
    at hudson.model.Run.execute(Run.java:1888)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:99)
    at hudson.model.Executor.run(Executor.java:432)
Finished: FAILURE

I don't find any similar error on internet, and I don't make any change on the server, somebody knows why I have this error?

martincito
  • 389
  • 4
  • 10

2 Answers2

1

It has to do with the org.jenkinsci.plugins.openjdk_native plugin. You need to configure it inside of Jenkins to find a suitable JDK.

Go to Manage Jenkins -> Global Tool Configuration Down to the JDK section Add JDK -> Give it a name -> Add Installer and select OpenJDK Installer I don't have the newer ones available so I selected the java-1.8.0-openjdk

Save, and go try your job again.

JBB
  • 4,543
  • 3
  • 24
  • 25
0

I had the same issue, i change default jdk in Jenkins (upgrade). For me this problème appeared when i updated Jenkins.