java.lang.RuntimeException: java.io.IOException: Cannot run program "java" (in directory "/opt/Azkaban/jobs"): java.io.IOException: error=24, Too many open files

tip

This is a bug in some versions of the Arduino IDE. Try updating to the version 1.6.12 or further.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Two jobs were scheduled as below, job 1: type=java job.class=RunClass classpath=/tmp/benjamin/javaclass,/opt/Azkaban/java/bin/azkaban-common-0.10.jar The source code of RunClass.java is as below, import java.util.Properties; import azkaban.common.utils.Props; public class RunClass { public RunClass(String name, Properties props){} public RunClass(String name, Props props){} public void run() throws Exception { System.out.println("Hello, this is java job with run function."); } public double getProgress() throws Exception { return 0.0; } public void cancel() throws Exception{} } job 2: type=command command=./mainjob.run working.dir=/tmp/benjamin/scripts mainjob.run is a very simple script. jobs.schedule is as below, {"schedule": [ { "id": "runclass", "ignoreDependency": false, "recurrence": "1m", "time": "2011-11-15.05.30.00.000", "timezone": "Etc/GMT" }, { "id": "mainscript", "ignoreDependency": false, "recurrence": "1m", "time": "2011-11-15.05.30.00.000", "timezone": "Etc/GMT" } ]} When i started Azkaban, all works OK, both of the job succeeded every time been invoked. But about two hours later, both of the jobs failed, and i also can't connnect to the web page by Firefox. When i restart Azkaban, both of them run successfully again, and i can connect to the web page by Firefox. The following is the error log got from the web page. 14-11-2011 12:57:00 GMT runclass INFO - HADOOP_HOME not set, using default hadoop config. 14-11-2011 12:57:00 GMT runclass INFO - 1 commands to execute. 14-11-2011 12:57:00 GMT runclass INFO - Executing command: java -Xms64M -Xmx256M -cp /tmp/benjamin/javaclass:/opt/Azkaban/java/bin/azkaban-common-0.10.jar:/opt/Azkaban_01.00/java/bin/azkaban-0.10.jar:/opt/Azkaban_01.00/lib/log4j-1.2.15.jar azkaban.jobs.builtin.JavaJobRunnerMain 14-11-2011 12:57:00 GMT runclass ERROR - Fatal error occurred while running job 'runclass': java.lang.RuntimeException: java.io.IOException: Cannot run program "java" (in directory "/opt/Azkaban/jobs"): java.io.IOException: error=24, Too many open files at azkaban.jobs.builtin.ProcessJob.run(ProcessJob.java:78) at azkaban.app.LoggingJob.run(LoggingJob.java:93) at azkaban.flow.IndividualJobExecutableFlow$1.run(IndividualJobExecutableFlow.java:171) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Cannot run program "java" (in directory "/opt/Azkaban/jobs"): java.io.IOException: error=24, Too many open files at java.lang.ProcessBuilder.start(Unknown Source) at azkaban.jobs.builtin.ProcessJob.run(ProcessJob.java:75) ... 3 more Caused by: java.io.IOException: java.io.IOException: error=24, Too many open files at java.lang.UNIXProcess.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 5 more Please feel free to contact me at benjamin_wang@yahoo.cn. or +86 10 6476 1469.
    via by benjamin wang,
  • Two jobs were scheduled as below, job 1: type=java job.class=RunClass classpath=/tmp/benjamin/javaclass,/opt/Azkaban/java/bin/azkaban-common-0.10.jar The source code of RunClass.java is as below, import java.util.Properties; import azkaban.common.utils.Props; public class RunClass { public RunClass(String name, Properties props){} public RunClass(String name, Props props){} public void run() throws Exception { System.out.println("Hello, this is java job with run function."); } public double getProgress() throws Exception { return 0.0; } public void cancel() throws Exception{} } job 2: type=command command=./mainjob.run working.dir=/tmp/benjamin/scripts mainjob.run is a very simple script. jobs.schedule is as below, {"schedule": [ { "id": "runclass", "ignoreDependency": false, "recurrence": "1m", "time": "2011-11-15.05.30.00.000", "timezone": "Etc/GMT" }, { "id": "mainscript", "ignoreDependency": false, "recurrence": "1m", "time": "2011-11-15.05.30.00.000", "timezone": "Etc/GMT" } ]} When i started Azkaban, all works OK, both of the job succeeded every time been invoked. But about two hours later, both of the jobs failed, and i also can't connnect to the web page by Firefox. When i restart Azkaban, both of them run successfully again, and i can connect to the web page by Firefox. The following is the error log got from the web page. 14-11-2011 12:57:00 GMT runclass INFO - HADOOP_HOME not set, using default hadoop config. 14-11-2011 12:57:00 GMT runclass INFO - 1 commands to execute. 14-11-2011 12:57:00 GMT runclass INFO - Executing command: java -Xms64M -Xmx256M -cp /tmp/benjamin/javaclass:/opt/Azkaban/java/bin/azkaban-common-0.10.jar:/opt/Azkaban_01.00/java/bin/azkaban-0.10.jar:/opt/Azkaban_01.00/lib/log4j-1.2.15.jar azkaban.jobs.builtin.JavaJobRunnerMain 14-11-2011 12:57:00 GMT runclass ERROR - Fatal error occurred while running job 'runclass': java.lang.RuntimeException: java.io.IOException: Cannot run program "java" (in directory "/opt/Azkaban/jobs"): java.io.IOException: error=24, Too many open files at azkaban.jobs.builtin.ProcessJob.run(ProcessJob.java:78) at azkaban.app.LoggingJob.run(LoggingJob.java:93) at azkaban.flow.IndividualJobExecutableFlow$1.run(IndividualJobExecutableFlow.java:171) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Cannot run program "java" (in directory "/opt/Azkaban/jobs"): java.io.IOException: error=24, Too many open files at java.lang.ProcessBuilder.start(Unknown Source) at azkaban.jobs.builtin.ProcessJob.run(ProcessJob.java:75) ... 3 more Caused by: java.io.IOException: java.io.IOException: error=24, Too many open files at java.lang.UNIXProcess.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 5 more Please feel free to contact me at benjamin_wang@yahoo.cn. or +86 10 6476 1469.
    via by benjamin wang,
  • [JENKINS-1921] Too many open files - Jenkins JIRA
    via by Unknown author,
  • Too many open files with svn
    via GitHub by dhireng
    ,
  • 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
    via by pallan,
  • Too many open files
    via areca by nimdae
    ,
    • java.lang.RuntimeException: java.io.IOException: Cannot run program "java" (in directory "/opt/Azkaban/jobs"): java.io.IOException: error=24, Too many open files at azkaban.jobs.builtin.ProcessJob.run(ProcessJob.java:78) at azkaban.app.LoggingJob.run(LoggingJob.java:93) at azkaban.flow.IndividualJobExecutableFlow$1.run(IndividualJobExecutableFlow.java:171) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Cannot run program "java" (in directory "/opt/Azkaban/jobs"): java.io.IOException: error=24, Too many open files at java.lang.ProcessBuilder.start(Unknown Source) at azkaban.jobs.builtin.ProcessJob.run(ProcessJob.java:75) ... 3 more Caused by: java.io.IOException: java.io.IOException: error=24, Too many open files at java.lang.UNIXProcess.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 5 more

    Users with the same issue

    Unknown User
    Unknown User1 times, last one,
    zbalint
    zbalint16 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    122 more bugmates