使用node参数运行Jenkins作业失败到mkdirs [英] Running a Jenkins job with a node parameter fails to mkdirs

查看:167
本文介绍了使用node参数运行Jenkins作业失败到mkdirs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 我在Jenkins中添加了一个Android Node.
  • 现在我正在尝试使用Node作为参数运行作业
  • 它无法在工作空间中创建mkdirs
  • 如果我删除节点"作为参数,则作业运行正常

请找到我创建的节点的屏幕截图.

Plese find the screenshot for the Node I created.

日志: -Loading node environment variables. Building remotely on Android in workspace /var/lib/jenkins/workspace/AndroidT [WS-CLEANUP] Deleting project workspace... java.io.IOException: Failed to mkdirs: /var/lib/jenkins/workspace/AndroidT at hudson.FilePath.mkdirs(FilePath.java:1191) at hudson.model.AbstractProject.checkout(AbstractProject.java:1267) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE

Log: - Loading node environment variables. Building remotely on Android in workspace /var/lib/jenkins/workspace/AndroidT [WS-CLEANUP] Deleting project workspace... java.io.IOException: Failed to mkdirs: /var/lib/jenkins/workspace/AndroidT at hudson.FilePath.mkdirs(FilePath.java:1191) at hudson.model.AbstractProject.checkout(AbstractProject.java:1267) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Finished: FAILURE

推荐答案

我终于找到了解决方案.

I finally found the solution.

Jenkins使用' jenkins '用户进行签名,但是我已经运行了Java命令java -jar slave.jar -jnlpUrl http://IP/computer/Android/slave-agent.jnlp -secret dadasdasdasd来与另一个用户一起启动节点.

Jenkins is using 'jenkins' user for auomation, but i had run the java command java -jar slave.jar -jnlpUrl http://IP/computer/Android/slave-agent.jnlp -secret dadasdasdasd tostart the node with another user.

我将用户切换为jenkins,运行了命令,问题已解决.

I switched the user to jenkins, ran the command and the issue is fixed.

这篇关于使用node参数运行Jenkins作业失败到mkdirs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆