java.io.FileNotFoundException: /home/sonar/.jenkins/jobs/PJ-PORT_PCPLS/workspace/proj/target/test-classes/generated/RESPONSE$DATA$CPLCOMANDOPL.class (Too many open files)

Jenkins JIRA | fabio farronato | 2 years ago
  1. 0

    During scan of workspace, with a large number of files, ClamAvRecorder abort scan whith Error: ERROR: Publisher org.jenkinsci.plugins.clamav.ClamAvRecorder aborted due to exception java.io.FileNotFoundException: /home/sonar/.jenkins/jobs/PJ-PORT_PCPLS/workspace/proj/target/test-classes/generated/RESPONSE$DATA$CPLCOMANDOPL.class (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at hudson.FilePath.read(FilePath.java:1739) at org.jenkinsci.plugins.clamav.ClamAvRecorder.perform(ClamAvRecorder.java:117) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683) at hudson.model.Run.execute(Run.java:1784) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) I analyzed the source code and suggest you to manage the file's close() at ClamAvScanner.java:97 with insert a finally block. public ScanResult scan(InputStream file) { if (file == null) { throw new IllegalArgumentException("file is null."); } String response; try { response = instream(file); } catch (IOException e) { return new ScanResult(Status.WARNING, e.getMessage()); } finally { ... file.close(); ... } if (response.contains("FOUND\0")) { String sig = response.substring("stream: ".length(), response.lastIndexOf("FOUND") - 1); return new ScanResult(Status.INFECTED, sig); } return new ScanResult(Status.PASSED); }

    Jenkins JIRA | 2 years ago | fabio farronato
    java.io.FileNotFoundException: /home/sonar/.jenkins/jobs/PJ-PORT_PCPLS/workspace/proj/target/test-classes/generated/RESPONSE$DATA$CPLCOMANDOPL.class (Too many open files)
  2. 0

    [JENKINS-27954] Scan fail for "Too many open files" - Jenkins JIRA

    jenkins-ci.org | 4 months ago
    java.io.FileNotFoundException: /home/sonar/.jenkins/jobs/PJ-PORT_PCPLS/workspace/proj/target/test-classes/generated/RESPONSE$DATA$CPLCOMANDOPL.class (Too many open files)
  3. 0

    During scan of workspace, with a large number of files, ClamAvRecorder abort scan whith Error: ERROR: Publisher org.jenkinsci.plugins.clamav.ClamAvRecorder aborted due to exception java.io.FileNotFoundException: /home/sonar/.jenkins/jobs/PJ-PORT_PCPLS/workspace/proj/target/test-classes/generated/RESPONSE$DATA$CPLCOMANDOPL.class (Too many open files) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:146) at hudson.FilePath.read(FilePath.java:1739) at org.jenkinsci.plugins.clamav.ClamAvRecorder.perform(ClamAvRecorder.java:117) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683) at hudson.model.Run.execute(Run.java:1784) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) I analyzed the source code and suggest you to manage the file's close() at ClamAvScanner.java:97 with insert a finally block. public ScanResult scan(InputStream file) { if (file == null) { throw new IllegalArgumentException("file is null."); } String response; try { response = instream(file); } catch (IOException e) { return new ScanResult(Status.WARNING, e.getMessage()); } finally { ... file.close(); ... } if (response.contains("FOUND\0")) { String sig = response.substring("stream: ".length(), response.lastIndexOf("FOUND") - 1); return new ScanResult(Status.INFECTED, sig); } return new ScanResult(Status.PASSED); }

    Jenkins JIRA | 2 years ago | fabio farronato
    java.io.FileNotFoundException: /home/sonar/.jenkins/jobs/PJ-PORT_PCPLS/workspace/proj/target/test-classes/generated/RESPONSE$DATA$CPLCOMANDOPL.class (Too many open files)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [#JENKINS-10626] Task scanner dies on bad symlink (unhandled java.io.FileNotFoundException) - Jenkins JIRA

    jenkins-ci.org | 2 years ago
    java.io.FileNotFoundException: "symlink source" (No such file or directory)
  6. 0

    If a file in the workspace is a symlink whose target path isn't retrievable (say its absolute and isn't completely contained (relatively) in the workspace, then the task scanner plugin dies. [TASKS] Scanning workspace files for tasks... ERROR: Publisher hudson.plugins.tasks.TasksPublisher aborted due to exception java.io.FileNotFoundException: "symlink source" (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:137) at hudson.FilePath.read(FilePath.java:1250) at hudson.plugins.tasks.parser.WorkspaceScanner.invoke(WorkspaceScanner.java:140) at hudson.plugins.tasks.parser.WorkspaceScanner.invoke(WorkspaceScanner.java:26) at hudson.FilePath.act(FilePath.java:758) at hudson.FilePath.act(FilePath.java:740) at hudson.plugins.tasks.TasksPublisher.perform(TasksPublisher.java:206) at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:310) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657) at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635) at hudson.model.Build$RunnerImpl.post2(Build.java:161) at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604) at hudson.model.Run.run(Run.java:1400) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:175) [ClearCase] Restored the original build steps. Finished: FAILURE Suggest Tasks Plugin just log something non fatal to console and continue in such circumstances.

    Jenkins JIRA | 5 years ago | Greg Moncreaff
    java.io.FileNotFoundException: "symlink source" (No such file or directory)

  1. r1chjames 1 times, last 2 days ago
  2. richard77 1 times, last 1 week ago
  3. gehel 2 times, last 2 weeks ago
  4. Kialandei 100 times, last 2 weeks ago
  5. Reich 1 times, last 2 weeks ago
45 more registered users
50 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.FileNotFoundException

    /home/sonar/.jenkins/jobs/PJ-PORT_PCPLS/workspace/proj/target/test-classes/generated/RESPONSE$DATA$CPLCOMANDOPL.class (Too many open files)

    at java.io.FileInputStream.open()
  2. Java RT
    FileInputStream.<init>
    1. java.io.FileInputStream.open(Native Method)
    2. java.io.FileInputStream.<init>(FileInputStream.java:146)
    2 frames
  3. Hudson
    FilePath.read
    1. hudson.FilePath.read(FilePath.java:1739)
    1 frame
  4. org.jenkinsci.plugins
    ClamAvRecorder.perform
    1. org.jenkinsci.plugins.clamav.ClamAvRecorder.perform(ClamAvRecorder.java:117)
    1 frame
  5. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
    3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
    4. hudson.model.Build$BuildExecution.post2(Build.java:183)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
    6. hudson.model.Run.execute(Run.java:1784)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    8. hudson.model.ResourceController.execute(ResourceController.java:89)
    9. hudson.model.Executor.run(Executor.java:240)
    9 frames