我看到我的所有执行程序经常在我的Jenkins slave机器(Windows 2008 R2 SP2)中变为Dead状态。
Jenkins ver。 1.651.3
我重启了Jenkins服务器以及服务。
错误日志 -
Unexpected executor death
java.io.IOException: Failed to create a temporary file in /var/lib/jenkins/jobs/ABCD/jobs/EFGH/jobs/Build
at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:68)
at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:55)
at hudson.util.TextFile.write(TextFile.java:118)
at hudson.model.Job.saveNextBuildNumber(Job.java:293)
at hudson.model.Job.assignBuildNumber(Job.java:351)
at hudson.model.Run.<init>(Run.java:284)
at hudson.model.AbstractBuild.<init>(AbstractBuild.java:167)
at hudson.model.Build.<init>(Build.java:92)
at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:34)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at jenkins.model.lazy.LazyBuildMixIn.newBuild(LazyBuildMixIn.java:175)
at hudson.model.AbstractProject.newBuild(AbstractProject.java:1018)
at hudson.model.AbstractProject.createExecutable(AbstractProject.java:1209)
at hudson.model.AbstractProject.createExecutable(AbstractProject.java:144)
at hudson.model.Executor$1.call(Executor.java:364)
at hudson.model.Executor$1.call(Executor.java:346)
at hudson.model.Queue._withLock(Queue.java:1365)
at hudson.model.Queue.withLock(Queue.java:1230)
at hudson.model.Executor.run(Executor.java:346)
Caused by: java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1006)
at java.io.File.createTempFile(File.java:1989)
at hudson.util.AtomicFileWriter.<init>(AtomicFileWriter.java:66)
... 21 more
我在奴隶机上看到了这个错误日志
INFO: File download attempt 1
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient downloadFileToStreams
INFO: File download attempt 1
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.ws.runtime.client.SOAPService executeSOAPRequestInternal
INFO: SOAP method='UpdateLocalVersion', status=200, content-length=367, server-wait=402 ms, parse=0 ms, total=402 ms, throughput=913 B/s, gzip
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient downloadFileToStreams
INFO: File download attempt 1
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient downloadFileToStreams
INFO: File download attempt 1
Oct 17, 2017 10:32:00 AM com.microsoft.tfs.core.clients.versioncontrol.VersionControlClient downloadFileToStreams
INFO: File download attempt 1
答案 0 :(得分:1)
请检查路径/ var / lib / jenkins / jobs / ABCD / jobs / EFGH / jobs / Build的所有者吗?如果它是手动创建的,如果所有者不是Jenkins,您将获得权限被拒绝错误。还要检查服务器和代理上的可用磁盘空间,然后尝试重新启动从属代理。它有时帮助了它。
答案 1 :(得分:1)
ABCD
和EFGH
的真实职位名称有多长?
我之前在Windows 2008 R2上使用Jenkins遇到了260个字符的最大路径长度。
答案 2 :(得分:0)
路径:
java.io.IOException: Failed to create a temporary file in /var/lib/jenkins/jobs/ABCD/jobs/EFGH/jobs/Build
中有三个/jobs
对我来说似乎很奇怪。在詹金斯,它通常应该是:
+- /var/lib/jenkins/jobs
+- ABCD
| +- builds
| | +- ...
| +- ...
+- EFGH
| +- builds
| | +- ...
| +- ...
+- Build
+- builds
| +- ...
+- ...
可能有一些关于路径的错误配置,Jenkins尝试mkdir /var/lib/jenkins/jobs/ABCD/jobs/EFGH/jobs/Build
,Jenkins用户或运行作业的用户没有权限这样做。
另见File permissions and attributes:
|
w
| ...... |目录的内容可以修改(创建新文件或文件夹; [...]);要求也设置执行权限,否则此权限不起作用。 |
答案 3 :(得分:0)
在我的情况下,发生这种情况是因为服务器空间不足。从仪表板上单击“ Build Executor状态”,查看是否有磁盘空间不足或交换空间为0。尝试释放一些空间。然后重新启动Jenkins服务器/服务,然后重试。