You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Docker容器部署Jenkins启动失败:磁盘空间不足问题求助

问题:Docker容器部署的Jenkins因磁盘空间问题无法启动

报错日志

2022-09-17 21:41:32.567+0000 [id=32]    INFO    hudson.slaves.SlaveComputer#tryReconnect: Attempting to reconnect V3LOCITY-SLAVE-02
/usr/local/bin/jenkins.sh: line 38: cannot create temp file for here-document: No space left on device
Running from: /usr/share/jenkins/jenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
Exception in thread "main" java.io.IOException: Jenkins has failed to create a temporary file in /tmp
        at Main.extractFromJar(Main.java:498)
        at Main._main(Main.java:310)
        at Main.main(Main.java:151)
Caused by: java.io.IOException: No space left on device
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createTempFile(File.java:2063)
        at Main.extractFromJar(Main.java:495)
        ... 2 more

当前Docker资源使用情况

TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              1                   1                   572.5MB             0B (0%)
Containers          1                   0                   9.467GB             9.467GB (100%)
Local Volumes       0                   0                   0B                  0B
Build Cache         0                   0                   0B                  0B

已执行的排查操作

在/etc/docker/daemon.json中添加以下配置,将容器基础空间扩容至40GB,随后重建容器,但重启Jenkins后问题仍存在:

{
        "storage-driver": "devicemapper",
        "storage-opts": [
                "dm.basesize=40G"
        ]
}

Docker环境信息

Client:
 Debug Mode: false

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 1
 Server Version: 19.03.11-ol
 Storage Driver: devicemapper
  Pool Name: docker-249:0-1140851221-pool
  Pool Blocksize: 65.54kB
  Base Device Size: 42.95GB
  Backing Filesystem: xfs
  Udev Sync Supported: true
  Data file: /dev/loop0
  Metadata file: /dev/loop1
  Data loop file: /var/lib/docker/devicemapper/devicemapper/data
  Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
  Data Space Used: 10.82GB
  Data Space Total: 107.4GB
  Data Space Available: 96.56GB
  Metadata Space Used: 6.877MB
  Metadata Space Total: 2.147GB
  Metadata Space Available: 2.141GB
  Thin Pool Minimum Free Space: 10.74GB
  Deferred Removal Enabled: true
  Deferred Deletion Enabled: true
  Deferred Deleted Device Count: 0
  Library Version: 1.02.170-RHEL7 (2020-03-24)
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7eba5930496d9bbe375fdf71603e610ad737d2b2
 runc version: 52de29d
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.1.12-124.65.1.2.el7uek.x86_64
 Operating System: Oracle Linux Server 7.9
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 6.56GiB
 Name: vm-app-docker-jenkinsqa
 ID: TAII:OWLM:Y3BU:65DC:A3SK:SSJQ:H6H2:BLA2:HQA5:ODCP:Y7S5:KCJ2
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: the devicemapper storage-driver is deprecated, and will be removed in a future release.
WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
         Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
Registries:

内容的提问来源于stack exchange,提问作者Santosh kumar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 16:55:46