I have problem with Jenkins bilds.
Sometimes my build hangs on operations "Checking out Revision". The problem is not constant. I can get this issue in 4-5 times of 10 bilds.
I am waiting 10-20 minutes and the abort this hangs bild.
Console log:
Started by upstream project "master" build number 737
originally caused by:
Started by user anonymous
Building in workspace /var/lib/jenkins/jobs/master/workspace/CI_BUILD/integration
Checkout:integration / /var/lib/jenkins/jobs/master/workspace/CI_BUILD/integration - hudson.remoting.LocalChannel#29b99c
Using strategy: Default
Last Built Revision: Revision e0963076406dd8bd6fcbd2d31ff37ad4ea60669a (origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from git#github.com:shaliko/shaliko.git
Commencing build of Revision e0963076406dd8bd6fcbd2d31ff37ad4ea60669a (origin/master)
Checking out Revisione 0963076406dd8bd6fcbd2d31ff37ad4ea60669a (origin/master)
In Jenkins config:
6 executors
Quiet period 10
SCM checkout retry count 10
I update Jenkins to version 1.500 and update "Jenkins GIT plugin" to version 1.1.26 - no effect.
What I should check or update?
Fixed issue by updating JDK to version 7u11.
Thanks for the advice!
Related
I'm using a Multibranch pipeline job to discover branches/tags/PRs and execute certain jobs. I got repos on GitHub and scan is able to discover all but not tags. I get below error. Also, when the Discover tags option is disabled in multibranch job configuration, I don't see this error and I miss the build when tags are created.
I tried to create multiple new repos but it did not help.
Jenkins version: 2.150.1
Getting remote tags...
ERROR: [Sun Jan 06 16:00:21 UTC 2019] Could not fetch branches from source 3f765a8f-ee7f-4c6d-a655-f9ca3b2b25d3
org.kohsuke.github.GHException: Failed to retrieve https://repourl/branch/git/refs/tags
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:529)
at org.kohsuke.github.Requester$PagingIterator.hasNext(Requester.java:494)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource$LazyTags$1$1.hasNext(GitHubSCMSource.java:2222)
at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1016)
at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:374)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:284)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1025)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
[Sun Jan 06 16:00:21 UTC 2019] Finished branch indexing. Indexing took 0.42 sec
FATAL: Failed to recompute children of Pipelines ยป bl-calibration-orchestrator-v1
org.kohsuke.github.GHException: Failed to retrieve https://repourl/branch/git/refs/tags
at org.kohsuke.github.Requester$PagingIterator.fetch(Requester.java:529)
at org.kohsuke.github.Requester$PagingIterator.hasNext(Requester.java:494)
at org.kohsuke.github.PagedIterator.fetch(PagedIterator.java:44)
at org.kohsuke.github.PagedIterator.hasNext(PagedIterator.java:32)
at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource$LazyTags$1$1.hasNext(GitHubSCMSource.java:2222)
at org.jenkinsci.plugins.github_branch_source.GitHubSCMSource.retrieve(GitHubSCMSource.java:1016)
at jenkins.scm.api.SCMSource._retrieve(SCMSource.java:374)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:284)
at jenkins.branch.MultiBranchProject.computeChildren(MultiBranchProject.java:634)
at com.cloudbees.hudson.plugins.folder.computed.ComputedFolder.updateChildren(ComputedFolder.java:277)
at com.cloudbees.hudson.plugins.folder.computed.FolderComputation.run(FolderComputation.java:165)
at jenkins.branch.MultiBranchProject$BranchIndexing.run(MultiBranchProject.java:1025)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
That looks like a recent Jenkins issue (JENKINS-52397) which is still pending:
Org Scan blows up when repository has no tags
Given a GitHub Organization Folder that has the "Discover Tags" behavior; the scan blows up on every repository that doesn't have any tags.
Workaround of adding a single tag confirmed to work
This is linked to the JENKINS/GitHub Branch Source Plugin, and is still seen in Jenkins 2.152.
From the release notes of the Jenkins GitHub Branch Source Plugin:
Version 2.4.2
Release date: 2019-01-16
* JENKINS-52397: Org Scan blows up when repository has no tags #191
* INFRA-1934: Stop publishing to jenkinsci/jenkins repo on Docker Hub
ref: https://github.com/jenkinsci/github-branch-source-plugi/blob/b26aba6136024d4dfaafb9e2c36317128ceb82dd/CHANGELOG.md
It might depend on various factors if you received those plugin already. A Jenkins version of 2.160 (2019-01-16) or higher might or might not be a safe indicator for the fixed version of the plugin being at least available at setup time.
This is our tool set:
jenkins: Open source Jenkins running on AWS server - 2.107.2
Github: 2.13.3 version
Requirement:
We need to create a GitHub hook in such a way that, if anyone merges the branch (create pull request and merge it), then it should trigger the Jenkins job.We do not use multibranch pipeline, we use just pipeline jobs i.e we use jenkisnfile to run our jobs.
so, i have enabled the "PullRequestEvent" in github webhooks. Then i have enabled scm polling in Jenkins job for that particular job.But, the issue is the job is getting triggered for a commit to the xyz branch and also if we merge the pull request. But, the expected behavior is, the job should be triggered only for the merge.
polling log :
This page captures the polling log that triggered this build.
Started on Jul 17, 2018 2:04:00 PM
Using strategy: Default
[poll] Last Built Revision: Revision xyzz (origin/development)
> /app/digital/tools/git/bin/git --version # timeout=10
using GIT_ASKPASS to set credentials Githubread id generated on 20th Jan 2017
> /app/digital/tools/git/bin/git ls-remote -h https://github.xyz.net /abc/Test-SourceCode-Jenkins # timeout=10
Found 3 remote heads on https://github.xyz.net/abc/Test-SourceCode-Jenkins
[poll] Latest remote head revision on refs/heads/development is: xyzz
Done. Took 1.8 sec
Changes found
jenkins configuration:
I am using Jenkins with multiple tools (node, maven etc) and some of build versions are basing on build number. Jobs configured with Pipeline (Bitbucket Team Project).
Sometimes Jenkins just removes most of builds from branches, and restarts building (like first-time Branch Indexing happens).
Some logs:
Sep 7 07:50:07 jenkins-1 nice[21775]: INFO: Skipping job "blablabla" with type org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject
Sep 7 07:50:44 jenkins-1 nice[21775]: WARNING: Failed to load Owner[blablabla/blablabla/initial/13:blablabla/blablabla/initial #13]. Unregistering
Sep 7 07:50:44 jenkins-1 nice[21775]: java.io.IOException: blablabla/blablabla/initial #13 did not yet start
Jenkins version: 2.73.2
Any ideas why it's happening?
I use GitHub as CSV. I want my Jenkins job to be built each time I trigger it regardless revision.
Unfortunately, if there are no any new pushes my job refuses to build:
[poll] Latest remote head revision on
refs/heads/My_Brench is:
f405ced00e0e64ece71658a1b179ef4ed0db2deb - already built by 13.
Job status: [My Job] subjob has no changes since last build. Using strategy:
Default
How can I avoid this skipping already built by 13 and build it anyway?
It seems that you're using https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin
With that plugin you can define boolean parameter hudson.scm.multijob.build.always in your parent job and if the value of this parameter is true all your sub-projects will be built regardless of SCM changes.
When executing a job I made I got an error before the execute shell had been executed (so this error must come from Jenkins or Git).
Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/Deploy example.com master branch
Checkout:Deploy example.com master branch / /var/lib/jenkins/workspace/Deploy example.com master branch - hudson.remoting.LocalChannel#51a745fc
Using strategy: Default
Last Built Revision: Revision 133257b4b34f8c0a90bf5ce11c634ebc9587d20d (origin/master)
Fetching changes from 1 remote Git repository
Fetching upstream changes from https://joachimroeleveld:fod4xvo0#bitbucket.org/joachimroeleveld/exofes_profiler.git
Commencing build of Revision 133257b4b34f8c0a90bf5ce11c634ebc9587d20d (origin/master)
Checking out Revision 133257b4b34f8c0a90bf5ce11c634ebc9587d20d (origin/master)
Triggering default
default completed with result FAILURE
Finished: FAILURE
What does ' default' mean in this case? Clicking on it results in a page with the links 'Workspace' and 'Recent changes'. Does this error come from a misconfiguration in Git (I use BitBucket for my remote repo's) or Jenkins?
You might be using multi-configuration job.
If this is the case try to configure "a free-style software project" first. The log will look like the following:
Started by an SCM change
Checkout:...
Using strategy: Default
Last Built Revision: Revision ...
Fetching changes from 1 remote Git repository
Fetching upstream changes from ...
Commencing build of Revision ...
Checking out Revision ...
[job-name] $ /bin/sh -xe /tmp/hudson7227596484536996852.sh