Jenkins - Free Swap Space 0
Posted 程序员牧码
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jenkins - Free Swap Space 0相关的知识,希望对你有一定的参考价值。
Run the following command to see if your host has a swap file configured:
free|grep -i Swap
Swap: 0 0 0
If you get "Swap: 0 0 0" like you see above your host has no swap configured.
Configure a swap file on your host
dd if=/dev/zero of=swapfile bs=1M count=1K
mkswap swapfile
sudo chown root:root swapfile
sudo chmod 600 swapfile
sudo swapon swapfile
Verify your swap is configured:
free|grep -i Swap
Swap: 1048572 0 1048572
Good, we have a swap on the host.
Run your Jenkins docker by typing
docker run --privileged -p 8080:8080 --name jenkins -p 50000:50000 jenkins
Notice you must run the docker in privileged mode.
When you run your Jenkins docker in privileged mode the host's swap will be available inside the docker, so your Jenkins master will have a working swap.
If your host already has a working swap in place, all you will need to do is run the Jenkins docker in privileged mode.
以上是关于Jenkins - Free Swap Space 0的主要内容,如果未能解决你的问题,请参考以下文章
Lack of free swap space on Zabbix server
搭建完zabbix报警 Lack of free swap space on zabbix
Zabbix监控报警Lack of free swap space on Zabbix server解决办法
Zabbix监控报警Lack of free swap space on Zabbix server解决办法