Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the shortage of temporary space in Jenkins

Shulou Source: shulou.com Published: 2022-06-01 13:39:50 11月07日 Update

This article mainly introduces the relevant knowledge of "how to solve the shortage of temporary space in Jenkins". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope this article "how to solve the shortage of temporary space in Jenkins" can help you solve the problem.

Environment:

Jenkins version jenkins-2.89.4 Jenkins master and slave are all on one host os version redhat7.2

Install jenkins using yum

Found that installed on 7.2, the remaining temporary space is very small, check through the login host

The remaining temporary space is taken from the temporary file system / tmp directory. The swap space is swap space.

The remaining temporary space is small, causing the node to fail to start. The default minimum available for Jenkins is 1G, which fails to start less than 1G.

It can be solved through configuration and space restrictions.

The above-mentioned treatment methods deal with the symptoms, but not the capital. It will affect the efficiency of using jenkins.

You can assign larger disks to the tmp directory when you size the file system at the beginning of the machine installation.

Or create a soft link to the tmp directory. But all of these methods involve rebooting the computer.

Reassign the temporary space directory for jenkins by modifying the configuration file and parameters. Jenkins-mater configuration file / etc/sysconfig/jenkinsJENKINS_HOME= "/ data/opssino/jenkins" JENKINS_JAVA_OPTIONS= "- Djava.awt.headless=true-Djava.io.tmpdir=/var/tmp"

After the modification is completed, restart jenkins and the configuration of the primary node is complete.

Jenkins-slave does not have a configuration file

Log in to the Jenkins web end node configuration interface

Add JVM options as shown below

* * Note: verify the permissions of the tmp** directory.

This is the end of the content about "how to solve the shortage of temporary space in Jenkins". Thank you for your reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.

Tags: Space configuration files directories knowledge nodes remaining host method version system industry login different practical minimum master-slave content parameters can be passed through Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Microsoft macOS Docker Shulou Technology