With a job in Jenkins we're trying to update the Dependencies.
Considering that this update job fail, every deploy on Sonarqube is blocked (before sonar:sonar we made the dependency check).
OWASP Dependency-Check Plugin v4.0.2
I've followed the suggest of Steve in the others issues and I've created the log file.
You can see attached the log file with ALL and ERROR.
This is the job result:
Building in workspace /data/jenkins/workspace/QA-update NVID
[DependencyCheck] OWASP Dependency-Check Plugin v4.0.2
[DependencyCheck] Executing Dependency-Check with the following options:
[DependencyCheck] -name = QA-update NVID
[DependencyCheck] -outputDirectory = /data/jenkins/workspace/QA-update NVID
[DependencyCheck] -dataDirectory = /data/jenkins/nvid
[DependencyCheck] -dataMirroringType = none
[DependencyCheck] -isQuickQueryTimestampEnabled = true
[DependencyCheck] -jarAnalyzerEnabled = false
[DependencyCheck] -nodePackageAnalyzerEnabled = false
[DependencyCheck] -nodeAuditAnalyzerEnabled = false
[DependencyCheck] -retireJsAnalyzerEnabled = true
[DependencyCheck] -composerLockAnalyzerEnabled = false
[DependencyCheck] -pythonDistributionAnalyzerEnabled = false
[DependencyCheck] -pythonPackageAnalyzerEnabled = false
[DependencyCheck] -rubyBundlerAuditAnalyzerEnabled = false
[DependencyCheck] -rubyGemAnalyzerEnabled = false
[DependencyCheck] -cocoaPodsAnalyzerEnabled = false
[DependencyCheck] -swiftPackageManagerAnalyzerEnabled = false
[DependencyCheck] -archiveAnalyzerEnabled = false
[DependencyCheck] -assemblyAnalyzerEnabled = false
[DependencyCheck] -msBuildProjectAnalyzerEnabled = false
[DependencyCheck] -nuGetConfigAnalyzerEnabled = false
[DependencyCheck] -nuspecAnalyzerEnabled = false
[DependencyCheck] -centralAnalyzerEnabled = false
[DependencyCheck] -nexusAnalyzerEnabled = false
[DependencyCheck] -artifactoryAnalyzerEnabled = false
[DependencyCheck] -autoconfAnalyzerEnabled = false
[DependencyCheck] -cmakeAnalyzerEnabled = false
[DependencyCheck] -opensslAnalyzerEnabled = false
[DependencyCheck] -showEvidence = true
[DependencyCheck] -formats = XML
[DependencyCheck] -autoUpdate = true
[DependencyCheck] -updateOnly = true
[DependencyCheck] Performing update only
[DependencyCheck] Unable to connect to the Dependency-Check database
[DependencyCheck] org.h2.jdbc.JdbcSQLException: Column "CPE" not found; SQL statement:
[DependencyCheck] INSERT INTO cpeEntry (cpe, vendor, product) VALUES (?, ?, ?) [42122-196]
Build step 'Invoke Dependency-Check update only' changed build result to FAILURE
[QA-update NVID] $ /bin/sh -xe /data/jenkins/tmp/jenkins8240182815168663722.sh
0K .......... .......... .......... .......... ........ 100% 2.43M=0.02s
2019-03-05 12:30:08 (2.43 MB/s) - ‘jsrepository.json’ saved [49988/49988]
wget -U mozilla https://repo1.maven.org/maven2/org/owasp/dependency-check-maven/4.0.2/
--2019-03-05 12:30:08-- https://repo1.maven.org/maven2/org/owasp/dependency-check-maven/4.0.2/
Resolving repo1.maven.org (repo1.maven.org)... 151.101.120.209
Connecting to repo1.maven.org (repo1.maven.org)|151.101.120.209|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4948 (4.8K) [text/html]
Saving to: ‘index.html.13’
0K .... 100% 61.2M=0s
2019-03-05 12:30:12 (61.2 MB/s) - ‘index.html.13’ saved [4948/4948]
Expected behavior
The Dependencies are updated.
ERROR.txt
ALL.txt
Something is happening that caused the lock file to not be removed. Try deleting the files:
dc.h2.db
dc.lock.db
dc.trace.db
from the /data/jenkins/nvid/ directory and then running the update again.
Hi Jeremy,
seems work, many thanks.
Maybe it was corrupted.
You can close it.
I think this warrants further investigation. We have seen the same issues. Deleted the local cache, and the problem reoccurred within a few hours.
I think this warrants further investigation. We have seen the same issues. Deleted the local cache, and the problem reoccurred within a few hours.
I agree. Seeing the same problems. Same configuration but when the Jenkins job is rebuilt. Using clean docker containers currently and so there is always a new local database every time.
I've noticed that when I change the temp folder name it works once and then proceeds to fail afterwards
Same issue for us.
Setup is GitLab CI\CD -> TestKitche -> Vagrant -> VirtualBox
VM is recreated for each commit.
While I agree there is an issue - I almost question if in these cases one should be using a centralized database instead of re-creating the database.
I have got the same error.
I reproduced almost every time with the following procedure
Please find attached the logs:
dependency-check.log
In my case, I just figure out that it was the lake of disk space that generates this error. That's maybe something to check because the error printed is not self-explanatory.
You get the same error when you point your --data parameter to a readonly folder.
As @valentijnscholten mentioned
For me it was setting the permissions of dependency-check folders to non-root or allowed to the current user.
sudo chown -R youruser:youruser path-to-dependency-check
You get the same error when you point your --data parameter to a readonly folder.
And if you're not using the --data parameter, but you've installed this into a directory that needs Admin permissions, you'll see this failure as well. Once I moved dependency-check this resolved for me. Not likely helpful for this thread, but rather for people searching on this error.
Most helpful comment
You get the same error when you point your --data parameter to a readonly folder.