FATAL: Invalid id: Process leaked file descriptors - Jenkins (github) - github

I am getting following error in jenkins with github.
Using strategy: Default
Last Built Revision: Revision 8d7d3f0898bc4583a80848033d6e0d27cc3e2096 (origin/master, origin/HEAD)
Fetching changes from 1 remote Git repository
Fetching upstream changes from origin
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Seen branch in repository origin/svn
Seen 3 remote branches
Commencing build of Revision 8d7d3f0898bc4583a80848033d6e0d27cc3e2096 (origin/master, origin/HEAD)
Checking out Revision 8d7d3f0898bc4583a80848033d6e0d27cc3e2096 (origin/master, origin/HEAD)
FATAL: Invalid id: Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
java.lang.IllegalArgumentException: Invalid id: Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
at org.eclipse.jgit.lib.ObjectId.fromString(ObjectId.java:232)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.doRevList(CliGitAPIImpl.java:959)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revList(CliGitAPIImpl.java:945)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.isCommitInRepo(CliGitAPIImpl.java:970)
at hudson.plugins.git.GitAPI.isCommitInRepo(GitAPI.java:181)
at hudson.plugins.git.GitSCM.computeChangeLog(GitSCM.java:1292)
at hudson.plugins.git.GitSCM.access$1300(GitSCM.java:58)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1257)
at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1211)
at hudson.FilePath.act(FilePath.java:909)
at hudson.FilePath.act(FilePath.java:882)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1211)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1408)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
at hudson.model.Run.execute(Run.java:1603)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:247)
Normally it works fine during the day and when I start my system again on next day, it gives this error and can only be resolved by re-installing the github in Jenkins. The link in the error message says about Spawning process from build but I don't understand what does that mean (I run 1-2 builds only; on windows).
Thanks.

Related

"push" takes very long time and never seems to end when I push some changes to Github remote repo from VSCode local repo

I'm coding something in python and tried to push them but it took very very long time and never seems to end, so I raised this issue.
What I succeeded are below;
Created a new remote repo in Github
Cloned the repo into local repo by VSCode
Created a file and saved it in local env
Staged all the changes and pushed them into local repo by VSCode
Then, I pushed them into remote repo by pressing button below;
This button which shows 0 pull and 4 pushes
Spec and logs that I found are below;
Windows Specifications
Edition Windows 10 Home
Version 20H2
OS build 19042.1052
Experience Windows Feature Experience Pack 120.2212.2020.0
Output (Python)
Python interpreter path: ~\anaconda3\python.exe
Error 2021-07-06 21:34:56: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file 'c:\Users\81906\Documents\atcoder.vscode\settings.json' (Error: Unable to resolve non-existing file 'c:\Users\81906\Documents\atcoder.vscode\settings.json')
at _handleError (c:\Users\81906\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:84:155535)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async y.readText (c:\Users\81906.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:9:343940)
at async p.doesFileNeedToBeFixed (c:\Users\81906.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:59:581700)
at async c:\Users\81906.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:59:580827
at async Promise.all (index 1)
at async p.getFilesToBeFixed (c:\Users\81906.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:59:580773)
at async p.updateTestSettings (c:\Users\81906.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:59:580400)] {
code: 'FileNotFound'
}
Output (Git)
git remote --verbose
Warning: Failed to watch ref 'c:\Users\81906\Documents\atcoder.git\refs\remotes\origin\main', is most likely packed.
Output (Log (Setting Sync))
[2021-07-06 21:34:54.005] [settingssync] [info] Using settings sync service https://vscode-sync.trafficmanager.net/
[2021-07-06 21:34:54.005] [settingssync] [info] Auto Sync is disabled.

jenkins -github build issue

I have been facing issues while trying to build a project in jenkins which fetches the files from github .
Below is the error log i got :
p.s: for security reason i have removed the ssh url of git .I can able to clone from my locally but when im trying it from jenkins it fails . I have generated ssh key in linux server and its able to connect to github .Can anyone please help me on this
Building in workspace /var/lib/jenkins/jobs/tr-data-events-testing/workspace
> /usr/local/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> /usr/local/bin/git config remote.origin.url git#github.url---------git # timeout=10
Fetching upstream changes from git#github.url-----------s.git
> /usr/local/bin/git --version # timeout=10
using GIT_SSH to set credentials jenkins dxc key
> /usr/local/bin/git fetch --tags --progress git#----url--------------.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from git#---url-------.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:766)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1022)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1053)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381)
Caused by: hudson.plugins.git.GitException: Command "/usr/local/bin/git fetch --tags --progress git#github.-------events.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: error: The requested URL returned error: 503 while accessing https://--url-----------/info/refs
fatal: HTTP request failed
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1693)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1441)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:764)
... 11 more
ERROR: null
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE
Help us localize this page
i resolved this issue by un setting the proxy in .gitconfig file . thank you for your answers
First, make sure Jenkins is running with the same user account you have created your ssh keys with.
It it does not, it would search for ~/.ssh/id_rsa in its own $HOME.
Second, to debug, you can launch Jenkins with this environment variable set first:
export GIT_SSH_COMMAND='ssh -Tv'
That way, any time it will try a git command involving ssh, you will see exactly where Jenkins/git tries to look for ssh keys, and what is the error.
Make sure you Git is recent enough to support this (Git 2.3+, Q4 2015).
But your logs show:
The requested URL returned error: 503 while accessing https://
So this has nothing to do with ssh. As mentioned, a proxy can interfere.

Jenkins Git Plugin

I am getting the below error when attempting a Jenkins build of a project from a GitHub repository for a poc. Jenkins is a local install and I am using the https address for git with thge username and password I use to login to GitHub. Can anyone offer me some pointers here as I am new to both Jenkins and GitHub
Building in workspace C:\Program Files (x86)\Jenkins\workspace\AdventureWorks2014 - 1. Build
Cloning the remote Git repository
Cloning repository https://github.com/h020905a/AdventureWorks2014.git
> git.exe init C:\Program Files (x86)\Jenkins\workspace\AdventureWorks2014 - 1. Build # timeout=10
Fetching upstream changes from https://github.com/h020905a/AdventureWorks2014.git
> git.exe --version # timeout=10
using GIT_ASKPASS to set credentials
> git.exe fetch --tags --progress https://github.com/h020905a/AdventureWorks2014.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Error performing git command
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1793)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1513)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:64)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:315)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:512)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1057)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
at hudson.scm.SCM.checkout(SCM.java:495)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1278)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1728)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:404)
Caused by: org.jvnet.winp.WinpException: Failed to read RT_USER_PROCESS_PARAMETERS error=299 at envvar-cmdline.cpp:151
at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:126)
at org.jvnet.winp.WinProcess.getCommandLine(WinProcess.java:102)
at hudson.util.ProcessTree$Windows$1.getArguments(ProcessTree.java:444)
at hudson.plugins.msbuild.MsBuildKillingVeto.vetoProcessKilling(MsBuildKillingVeto.java:56)
at hudson.util.ProcessTree$OSProcess.getVeto(ProcessTree.java:242)
at hudson.util.ProcessTree$Windows$1.killRecursively(ProcessTree.java:425)
at hudson.util.ProcessTree.killAll(ProcessTree.java:145)
at hudson.Proc$LocalProc.destroy(Proc.java:380)
at hudson.Proc$LocalProc.join(Proc.java:353)
at hudson.Proc.joinWithTimeout(Proc.java:166)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1780)
... 15 more
ERROR: null
Finished: FAILURE
If your github login password has special characters, then the issue you are facing might be similar to the issue described in this ticket:
https://issues.jenkins-ci.org/browse/JENKINS-38655
You can try getting your job to use JGit. Quoting from Mark Waite's answer in the above mentioned ticket:
"If you're not using TFS, but have special characters in the password of the specific user (like caret or ampersand or single quote or double quote), then this may be a duplicate of JENKINS-38194. The work around in that case may be to switch that job from using the command line git implementation to use the JGit implementation. The JGit implementation needs to be enabled globally first from "Manage Jenkins", "Global Tool Configuration", "Git", then there will be a pick list in each job which will allow you to choose whether that job should use command line git or JGit."
Resolved the issue by switching the branch in github to master and making the repo public.

hudson.plugins.git.GitException: Could not fetch from any repository

I want to configure hudson+git and want to create a build. But I am getting following exception:
Started by user nitish
Checkout:workspace / /root/.hudson/jobs/NightlyGit/workspace - hudson.remoting.LocalChannel#dd7efd
Using strategy: Default
Checkout:workspace / /root/.hudson/jobs/NightlyGit/workspace - hudson.remoting.LocalChannel#dd7efd
Fetching changes from the remote Git repository
Fetching upstream changes from https://github.com/test/eng.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
ERROR: (Underlying report) : Error performing command: /usr/bin/git fetch -t https://github.com/test/eng.git +refs/heads/nightly:refs/remotes/origin/nightly
Command "/usr/bin/git fetch -t https://github.com/test/engile.git +refs/heads/nightly:refs/remotes/origin/nightly" returned status code 128: error: The requested URL returned error: 401 while accessing https://github.com/test/eng.git/info/refs
fatal: HTTP request failed
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:887)
at hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:845)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:845)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:622)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1483)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:507)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:424)
at hudson.model.Run.run(Run.java:1366)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
I am newbie to the git ,I dont know what is the exact problem is there any creadentials required while using git with hudson?. Right now I have created the hudson job and providing the git repository link but it throws above exception. can somebody help me to sort out this issue.
Try this:
Go to the job's "Configure" page.
Under Source Code Management → Git → Additional Behaviors, add a behavior "Wipe out repository & force clone":
Click on Save button.
Try to Build again.
I have created the SSH key on hudson server and added it to my github account that solved my issue.
Sometimes the permission of the workspace also can cause the same error.
sudo chown -R jenkins: <workspace>

Jenkins pulling source code from GitHub private repo

I'm trying to set Jenkins up for my project in my server.
I uploaded my build script in GitHub private repo. I've established a SSH key, and deployed it through GitHub.
But when I try to build, Jenkins fails to pull successfully from my private repo
here is the console output:
Started by user anonymous
Building in workspace /Users/Shared/Jenkins/Home/jobs/moai-test/workspace
Checkout:workspace / /Users/Shared/Jenkins/Home/jobs/moai-test/workspace - hudson.remoting.LocalChannel#15e6e48b
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from https://github.com/****/****.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
hudson.plugins.git.GitException: Error performing command: git fetch -t https://github.com/****/****.git +refs/heads/*:refs/remotes/origin/*
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:862)
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:817)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:197)
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:1063)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:812)
at hudson.plugins.git.GitSCM.access$100(GitSCM.java:90)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1096)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
at hudson.FilePath.act(FilePath.java:842)
at hudson.FilePath.act(FilePath.java:824)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1502)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Caused by: java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.lang.UNIXProcess.waitFor(UNIXProcess.java:115)
at hudson.Proc$LocalProc.join(Proc.java:319)
at hudson.Launcher$ProcStarter.join(Launcher.java:345)
at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:843)
... 18 more
ERROR: Could not fetch from any repository
FATAL: Could not fetch from any repository
hudson.plugins.git.GitException: Could not fetch from any repository
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1103)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1064)
at hudson.FilePath.act(FilePath.java:842)
at hudson.FilePath.act(FilePath.java:824)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1064)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1256)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:589)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:494)
at hudson.model.Run.execute(Run.java:1502)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
Looking at your build log
Using strategy: Default
Fetching changes from 1 remote Git repository
Fetching upstream changes from https://github.com/****/****.git
ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
You are using the HTTPS URI for the github repo.
The HTTPS URI uses username/password to authenticate and not the SSH key.
To use the SSH key you need to checkout the SSH URI instead, e.g.
git#github.com:****/****.git
And that should fix your issue.
Alternatively you could give Jenkins the username/password (though that is a bigger security risk)