java.io.IOException: error=24, Too many open files

Jenkins JIRA | pallan | 6 years ago
  1. 0

    [JENKINS-8244] "Too Many Open files", Git and SSH slave - Jenkins JIRA

    jenkins-ci.org | 1 year ago
    java.io.IOException: error=24, Too many open files
  2. 0

    We have a hudson instance that is failing after only a few builds with the "Too Many Open file error". Here are the vitals: Hudson 1.386 Git Plugin 1.1.4 The system is building a Rails test suite using the Rake plugin. Git is configured to build all available branches and there are about 12 right now, but regular activity only occurs on 2. All builds are being done on a slave machine using Unix SSH. We used the instructions on the wiki related to the "too many open files" error, ls -la /proc/PID/fd shows 2500 files and GC does not clean them up. It essentially makes the slave useless until we disconnect and reconnect to it. If we don't have git configured to use all the branches then we don't get the problem. Here is a full backtrace The Git error at the top can vary /usr/bin/git checkout -f 7e42dcecfc5a792e9865d01916cb1e8942jkfc35 FATAL: Could not checkout 7e42dcecfc5a792e9865d01916cb1e8942jkfc35 hudson.plugins.git.GitException: Could not checkout 7e42dcecfc5a792e9865d01916cb1e8942jkfc35 at hudson.plugins.git.GitAPI.checkout(GitAPI.java:450) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:981) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:972) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1899) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: hudson.plugins.git.GitException: Error performing /usr/bin/git checkout -f 7e42dcecfc5a792e9865d01916cb1e8942jkfc35 Cannot run program "/usr/bin/git" (in directory "/home/web/workspace/MyProject"): java.io.IOException: error=24, Too many open files at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:379) at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:344) at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:354) at hudson.plugins.git.GitAPI.checkout(GitAPI.java:448) ... 12 more Caused by: java.io.IOException: Cannot run program "/usr/bin/git" (in directory "/home/web/workspace/MyProject"): java.io.IOException: error=24, Too many open files at java.lang.ProcessBuilder.start(ProcessBuilder.java:475) at hudson.Proc$LocalProc.<init>(Proc.java:192) at hudson.Proc$LocalProc.<init>(Proc.java:164) at hudson.Launcher$LocalLauncher.launch(Launcher.java:638) at hudson.Launcher$ProcStarter.start(Launcher.java:273) at hudson.Launcher$ProcStarter.join(Launcher.java:280) at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:368) ... 15 more Caused by: java.io.IOException: java.io.IOException: error=24, Too many open files at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) at java.lang.ProcessImpl.start(ProcessImpl.java:81) at java.lang.ProcessBuilder.start(ProcessBuilder.java:468) ... 21 more

    Jenkins JIRA | 6 years ago | pallan
    java.io.IOException: error=24, Too many open files
  3. 0

    We have a hudson instance that is failing after only a few builds with the "Too Many Open file error". Here are the vitals: Hudson 1.386 Git Plugin 1.1.4 The system is building a Rails test suite using the Rake plugin. Git is configured to build all available branches and there are about 12 right now, but regular activity only occurs on 2. All builds are being done on a slave machine using Unix SSH. We used the instructions on the wiki related to the "too many open files" error, ls -la /proc/PID/fd shows 2500 files and GC does not clean them up. It essentially makes the slave useless until we disconnect and reconnect to it. If we don't have git configured to use all the branches then we don't get the problem. Here is a full backtrace The Git error at the top can vary /usr/bin/git checkout -f 7e42dcecfc5a792e9865d01916cb1e8942jkfc35 FATAL: Could not checkout 7e42dcecfc5a792e9865d01916cb1e8942jkfc35 hudson.plugins.git.GitException: Could not checkout 7e42dcecfc5a792e9865d01916cb1e8942jkfc35 at hudson.plugins.git.GitAPI.checkout(GitAPI.java:450) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:981) at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:972) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:1899) at hudson.remoting.UserRequest.perform(UserRequest.java:114) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: hudson.plugins.git.GitException: Error performing /usr/bin/git checkout -f 7e42dcecfc5a792e9865d01916cb1e8942jkfc35 Cannot run program "/usr/bin/git" (in directory "/home/web/workspace/MyProject"): java.io.IOException: error=24, Too many open files at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:379) at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:344) at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:354) at hudson.plugins.git.GitAPI.checkout(GitAPI.java:448) ... 12 more Caused by: java.io.IOException: Cannot run program "/usr/bin/git" (in directory "/home/web/workspace/MyProject"): java.io.IOException: error=24, Too many open files at java.lang.ProcessBuilder.start(ProcessBuilder.java:475) at hudson.Proc$LocalProc.<init>(Proc.java:192) at hudson.Proc$LocalProc.<init>(Proc.java:164) at hudson.Launcher$LocalLauncher.launch(Launcher.java:638) at hudson.Launcher$ProcStarter.start(Launcher.java:273) at hudson.Launcher$ProcStarter.join(Launcher.java:280) at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:368) ... 15 more Caused by: java.io.IOException: java.io.IOException: error=24, Too many open files at java.lang.UNIXProcess.<init>(UNIXProcess.java:164) at java.lang.ProcessImpl.start(ProcessImpl.java:81) at java.lang.ProcessBuilder.start(ProcessBuilder.java:468) ... 21 more

    Jenkins JIRA | 6 years ago | pallan
    java.io.IOException: error=24, Too many open files
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    "hg" can not be found when invoked by the Jenkins Mercurial plugin

    Stack Overflow | 5 years ago | Teo Klestrup Röijezon
    java.io.IOException: Cannot run program "hg" (in directory "/var/lib/jenkins/workspace/My-Repository"): java.io.IOException: error=2, No such file or directory
  6. 0

    Gradle installer Permission Error

    GitHub | 2 years ago | atomi
    java.io.IOException: Cannot run program "/var/jenkins_home/tools/hudson.plugins.gradle.GradleInstallation/Gradle_2.1/bin/gradle" (in directory "/var/jenkins_home/jobs/mustash/workspace"): error=13, Permission denied

  1. eti22 1 times, last 1 month ago
  2. asdasd 24 times, last 3 months ago
  3. rexgreenza 8 times, last 3 months ago
  4. Benj-AD 1 times, last 4 months ago
  5. Akshay 4 times, last 6 months ago
95 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.IOException

    java.io.IOException: error=24, Too many open files

    at java.lang.UNIXProcess.<init>()
  2. Java RT
    ProcessBuilder.start
    1. java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
    2. java.lang.ProcessImpl.start(ProcessImpl.java:81)
    3. java.lang.ProcessBuilder.start(ProcessBuilder.java:468)
    4. java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
    4 frames
  3. Hudson
    Launcher$ProcStarter.join
    1. hudson.Proc$LocalProc.<init>(Proc.java:192)
    2. hudson.Proc$LocalProc.<init>(Proc.java:164)
    3. hudson.Launcher$LocalLauncher.launch(Launcher.java:638)
    4. hudson.Launcher$ProcStarter.start(Launcher.java:273)
    5. hudson.Launcher$ProcStarter.join(Launcher.java:280)
    5 frames
  4. Hudson GIT plugin
    GitAPI.checkout
    1. hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:368)
    2. hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:379)
    3. hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:344)
    4. hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:354)
    5. hudson.plugins.git.GitAPI.checkout(GitAPI.java:448)
    5 frames