How to Resolve Common Jenkins Plugin and Maven Pipeline Errors in China
This guide walks through fixing Jenkins plugin update timeouts by switching to domestic mirrors, troubleshooting Maven pipeline failures caused by missing JVM libraries or disk space limits, clearing Git config lock files, and adjusting file‑descriptor limits and Docker ulimit settings to prevent out‑of‑resource errors.
1. Replace Jenkins plugin update source with a domestic mirror
When accessing Manage Jenkins → Manage Plugins → Updates , the Updates tab may show no data and report a SocketTimeoutException: connect timed out error because the default update site https://updates.jenkins.io/update-center.json is unreachable from China.
Switch to the Advanced tab, locate the Update Site setting, and verify connectivity from the Jenkins server. Replace the URL with a reachable domestic source, such as:
https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.jsonor
http://mirror.xmission.com/jenkins/updates/update-center.jsonAfter saving, click Submit and then Check now. If possible, restart Jenkins to apply the changes.
2. Maven pipeline error: missing server JVM
The pipeline fails with:
+ mvn clean deploy
Error: missing `server' JVM at `/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7.i386/jre/lib/i386/server/libjvm.so'.
Please install or use the JRE or JDK that contains these missing components.
script returned exit code 4The issue was not caused by recent Jenkins or source changes. Investigation showed the build node runs on CentOS 7 with an XFS‑formatted data disk larger than 1 TB, which caused the JVM library to be inaccessible.
Solution: move the build workload to a node whose Docker data disk is smaller than 1 TB. After relocating, the pipeline builds successfully.
3. Jenkins pipeline Git config lock error
Pipeline fails with a Git error:
returned status code 255:
stdout:
stderr: error: could not lock config file .git/config: File exists
... (stack trace) ...
Finished: FAILUREInspecting /var/jenkins_home/caches/git-*/.git/config reveals a lingering .git/config.lock file.
Solution: locate and delete the lock file, e.g.:
find / -name "config.lock" -type f
rm /path/to/.git/config.lock4. Maven pipeline out‑of‑file‑descriptors error
The pipeline reports “unable to allocate file descriptor table – out of …”.
Solution steps:
Check the current limit on the build node: ulimit -n If the limit is low, increase it by editing /etc/security/limits.conf and adding:
* soft nofile 65535
* hard nofile 65535Then apply the new limit: ulimit -n 65535 Configure Docker’s default ulimit in /usr/lib/systemd/system/docker.service: --default-ulimit nofile=65535:65535 Reload systemd and restart Docker:
systemctl daemon-reload
systemctl restart dockerSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Raymond Ops
Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
