Background description:
The project adopts the gitlab runner function that will be triggered automatically after the code is submitted, and then compile the project, make it into a docker image and upload it to the nexus warehouse.
There is a problem after using it for a period of time. An error is reported in the jar package generated after the project is compiled. The specific information is as follows:
This error message is the error message of the gitlab runner tool
ERROR: Could not create cache adapter error=cache factory not found: factory for cache adapter "" was not registere
The gitlab compilation page will also display relevant error messages. I forgot to save the screenshot here.
After investigation, I learned that it was not the problem of gitlab runner, but the problem of gitlab
The specific problems are as follows:
The jar package generated after compiling the project will be provided to the dockerfile file for use. Here, artifacts are used
However, after each compilation, a directory will be generated in the corresponding directory of gitlab to store the jar package. The default path is: /var/opt/gitlab/gitlab rails/shared/artifacts
The directory inside is randomly generated to store the jar package generated after compiling with gitlab runner every time.
After a long time, this directory will occupy a large disk space. When the disk space is insufficient, the above error will be reported when compiling again.
Automatic solutions
Log in to gitlab with the administrator account, find the CI/CD in the settings, and set the validity period of the artifacts. In this way, you don’t have to delete them manually. When they expire, they will be deleted automatically
The solution here is to delete all folders except the tmp folder in this directory, that is, delete the existing folder for storing jar packages, and then use the gitlab runner tool to compile again
Similar Posts:
- java.io.StreamCorruptedException: invalid stream header: 00000000
- Gitlab Docker Auto Deploy Error: /bin/bash: line 118: docker: command not found
- Summary of WebKit compiling on Windows platform
- How to Solve Oracle ORA-09925 error: Unable to create audit trail file
- CentOS Yum download package error: invalid space in download directory
- How to Solve OpenCV3.4 error: ‘time’ was not declared in this scope
- How to Solve Error: The project description file (.project) for i…
- [Solved] Springboot Error: found character ‘@’ that cannot start any token. (Do not use @ for indentation)
- arm-linux-gnueabihf-g++: error trying to exec ‘cc1plus’: execvp: No such file or directory
- All tap-windows6 adapters on this system are currently in use or disabled.