This was the strange error we kept seeing today on the Jenkins server when using Fortify to scan projects. All the jobs which were running successfully failed miserably.
Even having the source code for the Maven plug-in didn’t help much.
Spent a few hours trying various things, and at one point I decided to just run the translate command. The translate was running fine, which made me wonder that something isn’t right here.
Fortify kept complaining that the Build ID doesn’t exist. Translate also requires the use of Build ID which made we wonder something was going wrong. When I just ran the translate, and looked at the log file it generates, the culprit was hidden there. “No space left on device”. See screen shot below:
Fortify was configured to use the default working directory and project root. The disk was full, and translate didn’t throw an exception. The stack trace was hidden in the log file. Once the default working folder was changed, all jobs started running successfully.
There are basically two options available:
1. Change the values to a mount which has more space.
com.fortify.WorkingDirectory=/your/tmp/dir/fortify
com.fortify.sca.ProjectRoot=/your/tmp/dir/fortify
2. Use the Jenkins workspace folder, so you can clear the workspace at regular intervals
com.fortify.WorkingDirectory=.yourjenkinsworkspace
com.fortify.sca.ProjectRoot=.yourjenkinsworkspace
Thanks Meera. This really helped! Also running translate and scan commands one after another can work in some cases.
ReplyDeleteFor example:
mvn sca:translate sca:scan
Thanks Meera. That really helped!
ReplyDeleteAlternatively we can also run translate and scan commands simultaneouly. This can also work in some cases.
For example:
sca:translate sca:scan
-Samruddhi
Yes, translate once, and scan next.
ReplyDeleteHi Meera,
ReplyDeleteI am using Fortify 4.21 version. While performing the scan , I get " unable to build session with id " error. Please help me
Is there a space in your buidl ID or the file path? Fortify doesn't handle spaces well in file path or build ID.
DeleteIs there a space in your buidl ID or the file path? Fortify doesn't handle spaces well in file path or build ID.
Delete