jenkins生成allure控制台出现java_home设置无效情况

jenkins生成allure控制台出现java_home设置无效情况

![img](

ERROR: JAVA_HOME is set to an invalid directory: /usr/local/openjdk-8

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
ERROR: Build step failed with exception
ru.yandex.qatools.allure.jenkins.exception.AllurePluginException: Can not generate Allure Report, exit code: 1
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.generateReport(AllureReportPublisher.java:314)
at ru.yandex.qatools.allure.jenkins.AllureReportPublisher.perform(AllureReportPublisher.java:231)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:806)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:755)
at hudson.model.Build$BuildExecution.post2(Build.java:178)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:699)
at hudson.model.Run.execute(Run.java:1913)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:99)
at hudson.model.Executor.run(Executor.java:432)
Build step 'Allure Report' marked build as failure
Finished: FAILURE

java_home路径查看是正确的

类似的问题,参考下:https://www.cnblogs.com/fireblackman/p/15927457.html

上图问题解决方式
在对应节点-->选择配置从节点-->节点属性中勾选环境变量(在键值对列表中对应输入建JAVA_HOME,值中输入电脑上jdk所在的位置)-->保存即可