I have inherited a Jenkins system. It was recently patched, and some java configs were tweaked.
All of a sudden, all my Build Executors are gone!
Any tips for troubleshooting this?
Related
We have observed that the Jenkins Pipeline Workspace project folder getting deleted. We have not configured any cleanup plugin for this as well as not configured any cleanup module in the pipeline.
This behavior is random and it's deleting Old as well as new jobs.
We can see the workspace deletion traces in /var/lib/jenkins/logs/tasks under Workspace clean-up.log. Please let me know if anybody is facing the same issue and how to fix this issue? Our Jenkins version is 2.289.2
Try disabling the workspace cleanup. There are two ways to achieve this. I was facing the same issue and I've just tried the first approach and monitoring the workspaces to see if this works.
Add -Dhudson.model.WorkspaceCleanupThread.disabled=true to the Jenkins system properties.
If Jenkins is running through terminal:
java -Dhudson.model.WorkspaceCleanupThread.disabled=true -jar jenkins.war
If Jenkins is running as a Linux service:
Stop Jenkins (service jenkins stop). You will need root privileges.
Edit the /etc/defaults/jenkins file.
Add an additional line for the JAVA_ARGS or add to it if it already exists.
JAVA_ARGS="-Dhudson.model.WorkspaceCleanupThread.disabled=true"
Start Jenkins (service jenkins start).
Disable or uninstall the Workspace Cleanup plugin. (I haven't tried this)
We're using Jenkins to orchestrate our builds from GitLab using a Multibranch Pipeline strategy. Recently, something changed somewhere, and now Jenkins is no longer ignoring projects archived in GitLab.
We're using the following stack (not all may be relevant to the problem at hand, and certainly not the complete list of plugins, which would take many pages, if there are other items that I can provide, happy to do so):
Jenkins: 2.263.3
Git Plugin 4.5.1
GitLab Enterprise Edition: 13.7.9-ee
GitLab API Plugin for Jenkins: 1.0.6
GitLab Plugin for Jenkins: 1.5.13
GitLab Branch Source Plugin for Jenkins: 1.5.3
We have our projects organized into groups (with no subgroups) in GitLab, and have used a strategy to archive them when they're no longer needed (instead of deleting them). In Jenkins, we have set up a GitLab Group as an "organization folder", which configures itself to autoscan the GitLab group, searching for projects that have a file named "Jenkinsfile" (configured via project recognizer).
I haven't been able to correlate any recent changes to the behavior I'm seeing, but am still searching. Does anyone have any ideas of where to look to fix this, or is this a known issue?
Thanks!
Any plugins or default behavior in Jenkins that I could configure to force a build to be done on a different node if the previous build on a node was a failure?
To answer my own question, it appears there are not many plugins that allow you control over jobs running on Jenkins slaves and none that do this.
We have lost jenkins build history for all the jobs after jenkins downgrade. No related errors in the logs. Any suggestions how I can get it back ?
In the job post build action, am archiving the artifacts. 90% of the time, when the jenkins job reaches this step, the slave on which it is running hangs (or) goes offline (or) the job hangs and if I kill the job it throws a "Caused by: java.lang.OutOfMemoryError: Java heap space" error.
Am running Jenkins ver 1.560.
Has anyone seen this or is aware of a fix for this? Any help is appreciated.
Thanks
It looks like you're running into https://issues.jenkins-ci.org/browse/JENKINS-22734 which started in version 1.560 and will be fixed in 1.563.
It's always a good idea to browse the Jenkins change log, especially the Community Ratings section, when you install a new version.
Whenever Hudson master will run out of space, slaves will disconnect and will have to be restarted.
You need to check Hudson master box and see how much space is allocated to the drive where hudson is running.
Another thing to note is that even if a job is running on slave, artifacts are archived always on master. So space allocation on master should be done properly.
I ran into this issue with 1.560v of Jenkins. Right now I have disabled the archiving of the maven artifacts from the "Build" section.