SCM Stats Plugin - Fail to retrieve SCM info, svn: E170013, svn: E215004

116 views
Skip to first unread message

drta...@gmail.com

unread,
Feb 12, 2016, 5:35:17 AM2/12/16
to SonarQube, david....@seebyte.com
Hi all, first post here but hopefully this helps some people.

We have been struggling with the SCM Stats plugin in SonarQube 5.1.2 and above with the following error:

16:08:10.155 INFO  - Sensor ScmStatsSensor
16:08:10.155 INFO  - Collection SCM Change log for the last 0 days
16:08:10.326 INFO  - Executing: cmd.exe /X /C "svn --non-interactive --trust-server-cert log -v https://svn.xxxxxxx.com/Projects/xxxxx/Core/trunk"
16:08:10.327 INFO  - Working directory: C:\Jenkins\workspace\xxxxx\xxxxxx\xxxxx\DataAccess
16:08:10.614 WARN  - Fail to retrieve SCM info. Reason: The svn command failed.
svn: E170013: Unable to connect to a repository at URL 'https://svn.xxxxxx.com/Projects/xxxxxx/Core/trunk'
svn: E215004: No more credentials or we tried too many times.
Authentication failed

16:08:10.614 INFO  - Sensor ScmStatsSensor (done) | time=459ms


What we have found is that since SCM Activity has been deprecated (and removed from our install) we intermittently get this error on old projects and are guaranteed to get this error on new projects.  The developer of SCM stats has declared in https://jira.sonarsource.com/browse/SONARPLUGINS-2324 that they do not want to duplicate SCM Activity settings which would normally be a good practice.

Unfortunately this means now that SCM Activity is deprecate the SCM stats plugin no longer functions correctly.  After looking into the code on GitHub for the SCM Stats plugin (https://github.com/SonarQubeCommunity/sonar-scm-stats/blob/master/src/main/java/org/sonar/plugins/scmstats/ScmFacade.java) we discovered on line 89 that if the properties:

sonar.scm.user.secured
and 
sonar.scm.password.secured

are not defined then the plugin will perform svn calls without any credentials.  These properties used to be set by the SCM Activity plugin however we found that by adding these explicitly to our analysis properties we are able to use the SCM Stats plugin with SonarQube 5.1.2 and above.

I hope this helps some people with similar issues and keeps the SCM Stats alive for future versions of SonarQube.

Please if anyone knows of a reason we should not do this or any other reason why SCM Stats can't be used with more recent versions of SonarQube I am all ears!

SCM Stats developers, you guys rock, my company loves this plugin!  


Thanks!
Reply all
Reply to author
Forward
0 new messages