git Hudson:返回状态代码 141:致命:写入错误:设备上没有剩余空间

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14681774/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:07:13  来源:igfitidea点击:

Hudson: returned status code 141: fatal: write error: No space left on device

linuxgithudson

提问by Manish Devraj

I copied one of the existing project and created a new project in Hudson. While running build it says "returned status code 141: fatal: write error: No space left on device"

我复制了一个现有项目并在 Hudson 中创建了一个新项目。运行构建时,它说“返回状态代码 141:致命:写入错误:设备上没有剩余空间”

Like suggested in other forums I checked free space and inode used in file system and nothing seems problematic here. Hudson is running as service and Hudons user has been given sudo privilege. Older job can be run so nothing different in new cloned job.

就像其他论坛中建议的那样,我检查了文件系统中使用的可用空间和 inode,这里似乎没有任何问题。Hudson 作为服务运行,Hudons 用户已被授予 sudo 权限。可以运行旧作业,因此在新克隆作业中没有什么不同。

Disk Space

磁盘空间

bash-4.1$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_dev-lv_root
                       20G   19G   28K 100% /
tmpfs                 1.9G  192K  1.9G   1% /dev/shm
/dev/sda1             485M   83M  377M  19% /boot
/dev/mapper/vg_dev-lv_home
                       73G   26G   44G  38% /home

i-nodes used

使用的索引节点

bash-4.1$ df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/mapper/vg_dev-lv_root
                     1310720  309294 1001426   24% /
tmpfs                 490645       4  490641    1% /dev/shm
/dev/sda1             128016      46  127970    1% /boot
/dev/mapper/vg_dev-lv_home
                     4833280  117851 4715429    3% /home

Hudson build log

哈德森构建日志

bash-4.1$ cat log
Started by user anonymous
Checkout:workspace / /var/lib/hudson/jobs/Demo/workspace - hudson.remoting.LocalChannel@1d4ab266
Using strategy: Default
Checkout:workspace / /var/lib/hudson/jobs/Demo/workspace - hudson.remoting.LocalChannel@1d4ab266
Fetching changes from the remote Git repository
Fetching upstream changes from ssh://[email protected]:20/home/git-repos/proj.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=ERROR:  (Underlying report) : Error performing command: git fetch -t ssh://[email protected]:20/home/git-repos/proj.git +refs/heads/*:refs/remotes/origin/*
Command "git fetch -t ssh://[email protected]:20/home/git-repos/proj.git +refs/heads/*:refs/remotes/origin/*" returned status code 141: fatal: write error: No space left on device

ha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=ERROR: Could not fetch from any repository
ha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=FATAL: Could not fetch from any repository
ha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=hudson.plugins.git.GitException: Could not fetch from any repository
        at hudson.plugins.git.GitSCM.invoke(GitSCM.java:887)
        at hudson.plugins.git.GitSCM.invoke(GitSCM.java:845)
        at hudson.FilePath.act(FilePath.java:758)
        at hudson.FilePath.act(FilePath.java:740)
        at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:845)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:622)
        at hudson.model.AbstractProject.checkout(AbstractProject.java:1483)
        at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507)
        at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
        at hudson.model.Run.run(Run.java:1366)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
        at hudson.model.ResourceController.execute(ResourceController.java:88)
        at hudson.model.Executor.run(Executor.java:145)

回答by michas

Your error message is quite clear: There is no space left on device.

您的错误消息非常清楚:设备上没有剩余空间。

This is verified by your dfoutput:

这由您的df输出验证:

Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/vg_dev-lv_root     20G   19G   28K 100% /

This tells you, you have a root partition /with a total size of 20GB which is use by 100%. 20GB is probably a bit small in your case. As this "partition" is managed by LVM (/dev/mapper/vg...) it is possible to extend it to create more space for your data.

这告诉您,您有一个/总大小为 20GB的根分区,已被 100% 使用。在您的情况下,20GB 可能有点小。由于此“分区”由 LVM (/dev/mapper/vg...) 管理,因此可以对其进行扩展以为您的数据创建更多空间。

Otherwise you have to check, if there is some "garbage" laying around which can be removed. You can use something like xdiskusage /to find out, what is occupying your precious disk space.

否则,您必须检查周围是否有一些可以清除的“垃圾”。您可以使用类似的xdiskusage /方法找出占用您宝贵磁盘空间的内容。

But if you don't understand the concept of a file system, maybe it is easier to find someone else to do it for you.

但是如果你不了解文件系统的概念,也许找人帮你做会更容易一些。

回答by golden-contact-computing

I had a very similar issue, it turned out to be a 40 gig log file from a "neverending" build which had been running for 8 hours

我有一个非常相似的问题,结果是一个 40 gig 的日志文件来自一个“永无止境”的构建,它已经运行了 8 个小时