Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-73492

java.io.FileNotFoundException is raised when trying to publish artifacts from remote agents

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • defectdojo-plugin
    • None

      Hi team,

      Thanks to your wonderful plugin for the integration with DefectDojo, it's very helpful.

       

      When I tried to use the plugin to publish the artifacts/reports generated by security scanner tools such as gitleaks, Grype from remote agents, I got the following errors.

       

      ...
      
      java.io.FileNotFoundException: <**REDACTED**>/build/gitleaks.json (No such file or directory)
      	at java.base/java.io.FileInputStream.open0(Native Method)
      	at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
      	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
      	at okio.Okio__JvmOkioKt.source(JvmOkio.kt:181)
      	at okio.Okio.source(Unknown Source)
      	at okhttp3.RequestBody$Companion$asRequestBody$1.writeTo(RequestBody.kt:167)
      	at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.kt:157)
      	at okhttp3.MultipartBody.writeTo(MultipartBody.kt:93)
      	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:62)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
      	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
      	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
      	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
      	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
      	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
      	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
      	at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
      	at io.jenkins.plugins.DefectDojo.ApiClient.lambda$upload$2(ApiClient.java:238)
      	at io.jenkins.plugins.DefectDojo.ApiClient.lambda$executeWithRetry$8(ApiClient.java:468)
      	at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:329)
      	at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:209)
      	at io.jenkins.plugins.DefectDojo.ApiClient.executeWithRetry(ApiClient.java:468)
      	at io.jenkins.plugins.DefectDojo.ApiClient.upload(ApiClient.java:237)
      	at io.jenkins.plugins.DefectDojo.DefectDojoPublisher.perform(DefectDojoPublisher.java:251)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:101)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:71)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:840)
      Finished: FAILURE

      My environment is as below:

       

      • DefectDojo Plugin, version 1.049.v8272429d864a_
      • Jenkins controller, version 2.440.1
      • Jenkins agent, version 3148.v532a_7e715ee3

      It would be great if you could take a look at this error and help me to solve the problem. Thank you so much!

            eu_david Eugeniu
            yutayamate Yuta
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: