MS build and SonarQube analysis from jenkins, unable to execute Sonar, E170001 -
i'm trying build .net project , start sonarqube code analysis jenkins. did following steps:
- download sonarqube
- start sonarqube server: c:...\sonarqube\bin\windows-x86-64\startsonar.bat
- install sonarqube 2.4.4 plugin on jenkins
go http://localhost:8080/configure , configure sonarqube server shown here:
go http://localhost:8080/configuretools/ , configure sonarqube scanner msbuild this:
- added job in jenkins, configured project build ms build, wrapped build step
sonarqube scanner msbuild - begin analysis
,sonarqube scanner msbuild - end analysis
:
my problem: jenkings checking out project files , building project analysis fails.
here relevant console output:
10:53:36.189 info - 113 files analyzed 10:53:36.805 info - 0/113 files analyzed info: ------------------------------------------------------------------------ info: execution failure info: ------------------------------------------------------------------------ total time: 17.443s final memory: 18m/404m info: ------------------------------------------------------------------------ error: error during sonar runner execution org.sonar.runner.impl.runnerexception: unable execute sonar @ org.sonar.runner.impl.batchlauncher$1.delegateexecution(batchlauncher.java:91) @ org.sonar.runner.impl.batchlauncher$1.run(batchlauncher.java:75) @ java.security.accesscontroller.doprivileged(native method) @ org.sonar.runner.impl.batchlauncher.doexecute(batchlauncher.java:69) @ org.sonar.runner.impl.batchlauncher.execute(batchlauncher.java:50) @ org.sonar.runner.api.embeddedrunner.doexecute(embeddedrunner.java:102) @ org.sonar.runner.api.runner.execute(runner.java:100) @ org.sonar.runner.main.executetask(main.java:70) @ org.sonar.runner.main.execute(main.java:59) @ org.sonar.runner.main.main(main.java:53) caused by: java.lang.illegalstateexception: error when executing blame file app_start/bundleconfig.cs @ org.sonar.plugins.scm.svn.svnblamecommand.blame(svnblamecommand.java:102) @ org.sonar.plugins.scm.svn.svnblamecommand.blame(svnblamecommand.java:59) @ org.sonar.batch.scm.scmsensor.execute(scmsensor.java:86) @ org.sonar.batch.sensor.sensorwrapper.analyse(sensorwrapper.java:57) @ org.sonar.batch.phases.sensorsexecutor.executesensor(sensorsexecutor.java:58) @ org.sonar.batch.phases.sensorsexecutor.execute(sensorsexecutor.java:50) @ org.sonar.batch.phases.abstractphaseexecutor.execute(abstractphaseexecutor.java:83) @ org.sonar.batch.scan.modulescancontainer.doafterstart(modulescancontainer.java:192) @ org.sonar.core.platform.componentcontainer.startcomponents(componentcontainer.java:142) @ org.sonar.core.platform.componentcontainer.execute(componentcontainer.java:127) @ org.sonar.batch.scan.projectscancontainer.scan(projectscancontainer.java:241) @ org.sonar.batch.scan.projectscancontainer.scanrecursively(projectscancontainer.java:236) @ org.sonar.batch.scan.projectscancontainer.scanrecursively(projectscancontainer.java:234) @ org.sonar.batch.scan.projectscancontainer.doafterstart(projectscancontainer.java:226) @ org.sonar.core.platform.componentcontainer.startcomponents(componentcontainer.java:142) @ org.sonar.core.platform.componentcontainer.execute(componentcontainer.java:127) @ org.sonar.batch.task.scantask.execute(scantask.java:47) @ org.sonar.batch.task.taskcontainer.doafterstart(taskcontainer.java:86) @ org.sonar.core.platform.componentcontainer.startcomponents(componentcontainer.java:142) @ org.sonar.core.platform.componentcontainer.execute(componentcontainer.java:127) @ org.sonar.batch.bootstrap.globalcontainer.executetask(globalcontainer.java:106) @ org.sonar.batch.bootstrapper.batch.executetask(batch.java:119) @ org.sonar.batch.bootstrapper.batch.execute(batch.java:79) @ org.sonar.runner.batch.isolatedlauncher.execute(isolatedlauncher.java:48) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ org.sonar.runner.impl.batchlauncher$1.delegateexecution(batchlauncher.java:87) ... 9 more caused by: org.tmatesoft.svn.core.svnauthenticationexception: svn: e170001: authentication required '<https://subversion.xyz:443> @ org.tmatesoft.svn.core.internal.wc.svnerrormanager.authenticationfailed(svnerrormanager.java:47) @ org.tmatesoft.svn.core.internal.wc.svnerrormanager.authenticationfailed(svnerrormanager.java:41) @ org.tmatesoft.svn.core.internal.wc.defaultsvnauthenticationmanager.getfirstauthentication(defaultsvnauthenticationmanager.java:203) @ org.tmatesoft.svn.core.internal.io.dav.http.httpconnection.request(httpconnection.java:716) @ org.tmatesoft.svn.core.internal.io.dav.http.httpconnection.request(httpconnection.java:398) @ org.tmatesoft.svn.core.internal.io.dav.http.httpconnection.request(httpconnection.java:386) @ org.tmatesoft.svn.core.internal.io.dav.davconnection.performhttprequest(davconnection.java:863) @ org.tmatesoft.svn.core.internal.io.dav.davconnection.exchangecapabilities(davconnection.java:699) @ org.tmatesoft.svn.core.internal.io.dav.davconnection.open(davconnection.java:118) @ org.tmatesoft.svn.core.internal.io.dav.davrepository.openconnection(davrepository.java:1049) @ org.tmatesoft.svn.core.internal.io.dav.davrepository.hascapability(davrepository.java:877) @ org.tmatesoft.svn.core.io.svnrepository.assertserverismergeinfocapable(svnrepository.java:787) @ org.tmatesoft.svn.core.io.svnrepository.getfilerevisions(svnrepository.java:756) @ org.tmatesoft.svn.core.internal.wc16.svnlogclient16.doannotate(svnlogclient16.java:1389) @ org.tmatesoft.svn.core.internal.wc16.svnlogclient16.doannotate(svnlogclient16.java:291) @ org.tmatesoft.svn.core.internal.wc2.old.svnoldannotate.run(svnoldannotate.java:45) @ org.tmatesoft.svn.core.internal.wc2.old.svnoldannotate.run(svnoldannotate.java:17) @ org.tmatesoft.svn.core.internal.wc2.svnoperationrunner.run(svnoperationrunner.java:21) @ org.tmatesoft.svn.core.wc2.svnoperationfactory.run(svnoperationfactory.java:1235) @ org.tmatesoft.svn.core.wc2.svnoperation.run(svnoperation.java:294) @ org.tmatesoft.svn.core.wc.svnlogclient.doannotate(svnlogclient.java:295) @ org.sonar.plugins.scm.svn.svnblamecommand.blame(svnblamecommand.java:100) ... 37 more error: error: re-run sonarqube runner using -x switch enable full debug logging. sonarqube scanner did not complete 10:53:37.058 creating summary markdown file... post-processing failed. exit code: 1 error: execution of sonarqube scanner msbuild failed (exit code 1) finished: failure
the error says:
caused by: org.tmatesoft.svn.core.svnauthenticationexception
but i'm able run sonarqube analysis on project outside jenkings sonar-scanner-2.6.1 , see results on http://localhost:9000/
and
jenkins builds fine project without analysis step, don't understand how svn authentication problem. credentials valid.
according official documentation http://docs.sonarqube.org/display/scan/from+jenkins have configure
msbuild sonarqube runner
but have section called
sonarqube scanner msbuild.
have missed something? diffrance between runner , scanner?
there several different things going on here.
when run analysis outside jenkins i'm going guess run user has cached svn credentials on machine. 'blame' portion of analysis implicitly runs you.
when check project out in jenkins, explicitly provide credentials job, , credentials explicitly used for portion of job.
when run analysis in jenkins, portion of job has no access cached credentials in use when run analysis outside of jenkins. nor have access credentials supplied jenkins checkout. instead. you'll need go sonarqube server , configure credentials project (you pass them analysis parameters, it's easier in long run add them project).
to this, navigate project home page, administration > general settings > scm > svn, , fill in credentials there.
Hey, thanks for the blog article.Really thank you! Great.
ReplyDeleteazure online training
azure training