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

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

磁盘空间

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节点
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

哈德森建立日志
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$3.invoke(GitSCM.java:887)
        at hudson.plugins.git.GitSCM$3.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)

最佳答案

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

这由您的df输出验证:

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

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

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

但是,如果您不了解文件系统的概念,那么也许更容易找到其他人来为您执行此操作。

08-26 21:08