Problem with cache directory in sonar runner and jenkins

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem with cache directory in sonar runner and jenkins

thundr

Hi,

 

With a Jenkins deployed in a tomcat6 package in centos 6.x x64, and running with a tomcat user and with home /usr/share/tomcat6

 

I have a problem with the working directory in my instalation of sonar runner, i configure sonar runer with sonar.working.directory=/srv/sonar-runner, when post-process task is launched this is the error:

 

INFO: Runner configuration file: /srv/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/Sonar_Runner/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "es_ES", source code encoding: "UTF-8"
INFO: Work directory: /srv/sonar-3.6
INFO: Sonar Server 3.6
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.095s
Final Memory: 0M/117M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to create user cache/usr/share/tomcat6/.sonar/cache
ERROR: Caused by: Unable to create directory /usr/share/tomcat6/.sonar/cache

 

I workaround that creating a simbolic link /usr/share/tomcat6/.sonarà/srv/sonar-runner but, is any variable or property i can configure to prevent this error?

 

Thanks in advance

 

Carlos León

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with cache directory in sonar runner and jenkins

David Racodon-2
Hi Carlos,

You can change the working directory thanks to the "sonar.working.directory" property. See http://docs.codehaus.org/display/SONAR/Analysis+Parameters.

You can also change the cache directory by setting the "SONAR_USER_HOME" environment variable. See http://docs.codehaus.org/display/SONAR/Frequently+Asked+Questions.

Regards,


David RACODON | SonarSource
Senior Consultant


On 1 July 2013 19:39, Carlos León <[hidden email]> wrote:

Hi,

 

With a Jenkins deployed in a tomcat6 package in centos 6.x x64, and running with a tomcat user and with home /usr/share/tomcat6

 

I have a problem with the working directory in my instalation of sonar runner, i configure sonar runer with sonar.working.directory=/srv/sonar-runner, when post-process task is launched this is the error:

 

INFO: Runner configuration file: /srv/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/Sonar_Runner/conf/sonar-runner.properties
INFO: Project configuration file: NONE
INFO: Default locale: "es_ES", source code encoding: "UTF-8"
INFO: Work directory: /srv/sonar-3.6
INFO: Sonar Server 3.6
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.095s
Final Memory: 0M/117M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to create user cache/usr/share/tomcat6/.sonar/cache
ERROR: Caused by: Unable to create directory /usr/share/tomcat6/.sonar/cache

 

I workaround that creating a simbolic link /usr/share/tomcat6/.sonarà/srv/sonar-runner but, is any variable or property i can configure to prevent this error?

 

Thanks in advance

 

Carlos León


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with cache directory in sonar runner and jenkins

thundr
I have both properties configured in sonar-runner.properties, and doesn´t work:

sonar.userHome=/srv/sonar-3.6
sonar.working.directory=/srv/sonar-runner

In sonar (sonar server, not sonar runner) configuration on jenkins, i have added aditional property:  -Dsonar.userHome=/srv/sonar-3.6, and works perfectly, but in sonnar runner don´n work.

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem with cache directory in sonar runner and jenkins

thundr
In reply to this post by David Racodon-2
This problem resolved when i define globally in jenkins:

SONAR_USER_HOME=/srv/sonar-3.6

Thanks for the response :)
Loading...