BHuenke
Member.
621 views

Jenkins upload fpr fails

A Jenkins job (using the plugin) is failing when trying to upload the fpr file to SSC with the message below.  Interestingly, it does seem to actually upload the fpr and results are available when logging into the SSC.  Is there somewhere to configure a timeout parameter that would resolve this error?

Uploading FPR to SSC at https://fortify.domain.lab/ssc
Error uploading to SSC: https://fortify.domain.lab/ssc
com.fortify.ssc.restclient.ApiException: java.net.SocketTimeoutException: timeout
	at com.fortify.ssc.restclient.ApiClient.execute(ApiClient.java:846)
	at com.fortify.ssc.restclient.api.ArtifactOfProjectVersionControllerApi.uploadArtifactOfProjectVersionWithHttpInfo(ArtifactOfProjectVersionControllerApi.java:314)
	at com.fortify.ssc.restclient.api.ArtifactOfProjectVersionControllerApi.uploadArtifactOfProjectVersion(ArtifactOfProjectVersionControllerApi.java:298)
	at com.fortify.plugin.jenkins.fortifyclient.ApiClientWrapper.uploadFpr(ApiClientWrapper.java:516)
	at com.fortify.plugin.jenkins.fortifyclient.FortifyClient.uploadFPR(FortifyClient.java:147)
	at com.fortify.plugin.jenkins.steps.FortifyUpload$1.runWith(FortifyUpload.java:271)
	at com.fortify.plugin.jenkins.steps.FortifyUpload$1.runWith(FortifyUpload.java:268)
	at com.fortify.plugin.jenkins.steps.FortifyUpload.runWithFortifyClient(FortifyUpload.java:778)
	at com.fortify.plugin.jenkins.steps.FortifyUpload.uploadToSSC(FortifyUpload.java:267)
	at com.fortify.plugin.jenkins.steps.FortifyUpload.perform(FortifyUpload.java:194)
	at com.fortify.plugin.jenkins.steps.FortifyStep.perform(FortifyStep.java:122)
	at com.fortify.plugin.jenkins.FortifyPlugin.perform(FortifyPlugin.java:475)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
	at hudson.model.Build$BuildExecution.post2(Build.java:186)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
	at hudson.model.Run.execute(Run.java:1843)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Caused by: java.net.SocketTimeoutException: timeout
	at okio.Okio$3.newTimeoutException(Okio.java:207)
	at okio.AsyncTimeout.exit(AsyncTimeout.java:261)
	at okio.AsyncTimeout$2.read(AsyncTimeout.java:215)
	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:306)
	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:300)
	at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:196)
	at com.squareup.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:186)
	at com.squareup.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127)
	at com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:737)
	at com.squareup.okhttp.internal.http.HttpEngine.access$200(HttpEngine.java:87)
	at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:722)
	at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:576)
	at com.squareup.okhttp.Call.getResponse(Call.java:287)
	at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
	at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)
	at com.squareup.okhttp.Call.execute(Call.java:80)
	at com.fortify.ssc.restclient.ApiClient.execute(ApiClient.java:842)
	... 20 more
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(Unknown Source)
	at java.net.SocketInputStream.read(Unknown Source)
	at java.net.SocketInputStream.read(Unknown Source)
	at sun.security.ssl.InputRecord.readFully(Unknown Source)
	at sun.security.ssl.InputRecord.read(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
	at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
	at sun.security.ssl.AppInputStream.read(Unknown Source)
	at okio.Okio$2.read(Okio.java:139)
	at okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
	... 34 more

 

0 Likes
8 Replies
Highlighted
jburchhardt Contributor.
Contributor.

Re: Jenkins upload fpr fails

Did you find a resolution to this? We have the same problem, and I have been fighting it for days.

0 Likes
Contributor.. Ankit21 Contributor..
Contributor..

Re: Jenkins upload fpr fails

Anyone got the solution?

I am also facing the same issue.

0 Likes
MHuschenbett Respected Contributor.
Respected Contributor.

Re: Jenkins upload fpr fails

Hi BHuenke,

It may be a shot in the blue, but I see that you are using HTTPS. Do you use a self signed certificate? If so, please make sure that your jenkins master node has this certificate in its keystore.

Cheers,

Martin

0 Likes
Contributor.. Ankit21 Contributor..
Contributor..

Re: Jenkins upload fpr fails

No, I have deployed my ssc on http only 

but still i am getting the same issues.

I tried connecting  with the micro focus support but no luck in resolving this issue.

0 Likes
Trusted Contributor.. Parthiban Trusted Contributor..
Trusted Contributor..

Re: Jenkins upload fpr fails

@Ankit21 I had similar issue and was able to resolve it

Can you confirm how you're uploading from Jenkins to Fortify SSC. Is it via API or via Fortify Assessment build step?

 

0 Likes
Contributor.. Ankit21 Contributor..
Contributor..

Re: Jenkins upload fpr fails

 

Hi Parthiban,,

I am uploading from jenkins to fortify 

and it is  via Fortify Assessment build step

0 Likes
Trusted Contributor.. Parthiban Trusted Contributor..
Trusted Contributor..

Re: Jenkins upload fpr fails

@Ankit21 

Can you post the Jenkins Fortify Assessment config

Navigate to Manage Jenkins -> Configure System -> Fortify Assessment. If you had filled them already, please click on "Advanced Settings" for Fortify Assessment and check the connection to Fortify SSC

Parthiban_0-1575872514117.png

After testing the connection, if it throws error as Socket timed out, then try to include port number in the Fortify SSC URL. This cleared my issue and I hope it clears the issue for you as well

0 Likes
jburchhardt Contributor.
Contributor.

Re: Jenkins upload fpr fails

I got it to work, but not by using the gui plugin. Instead I made Jenkins pipeline scripts. They seem to work alright. You still need the Fortify plugin installed for the scripts to work. Simplified they look like below (any way to make this editor allow for code formatting and not trim every line?). The steps are in a Jenkins script file (groovy) checked in our SCM along with the rest of the code.

stages {
stage('Fortify Clean') {
steps {
fortifyClean buildID: 'fortify-server'
}
}
stage('Fortify Translate') {
steps {
fortifyTranslate buildID: 'fortify-server', debug: 'true',
projectScanType: fortifyMSBuild(dotnetProject:'fortify-server.sln', dotnetAddOptions: '/t:Restore,Rebuild /p:Configuration=Debug;Platform=x64')
}
}
stage('Fortify Scan') {
steps {
fortifyScan buildID: 'fortify-server',
resultsFile: 'fortify-server.fpr'
}
}
stage('Fortify Upload') {
steps {
fortifyUpload appName: 'Fortify Server', appVersion: '0.1',
resultsFile: 'fortify-server.fpr'
}
}
}

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.