Quantcast

Multiple Instances in Sonar 3.0

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multiple Instances in Sonar 3.0

Mario
I have two instances of Sonar V. 3.0 on the same server (Tomcat), each instance has its own installation folder and every file "sonar.properties" I made the following changes:

Instance 1:
sonar.jdbc.username: usr1
sonar.jdbc.password: pass1

sonar.jdbc.url: jdbc: postgresql :/ / localhost/sonar1
sonar.jdbc.driverClassName: org.postgresql.Driver
sonar.jdbc.validationQuery: select 1

Instance 2:
sonar.jdbc.username: usr2
sonar.jdbc.password: pass2

sonar.jdbc.url: jdbc: postgresql :/ / localhost/sonar2
sonar.jdbc.driverClassName: org.postgresql.Driver
sonar.jdbc.validationQuery: select 1

So I did the wars: sonar1.war and sonar2.war

My problem is that both instances use the same BD. I need to do something more?
 
Greetings!
Mario
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple Instances in Sonar 3.0

Fabrice Bellingard-4
Hi Mario,

you probably built the WAR only once, from the original install folder.
What you must do is:
  • rebuild the WAR from the install folder #1 and deploy it
  • rebuild the WAR from the install folder #2 and deploy it 

This should work.


Best regards,

Fabrice BELLINGARD | SonarSource
http://sonarsource.com



On Thu, Jul 5, 2012 at 10:48 PM, Mario <[hidden email]> wrote:
I have two instances of Sonar V. 3.0 on the same server (Tomcat), each
instance has its own installation folder and every file "sonar.properties" I
made the following changes:

Instance 1:
sonar.jdbc.username: usr1
sonar.jdbc.password: pass1

sonar.jdbc.url: jdbc: postgresql :/ / localhost/sonar1
sonar.jdbc.driverClassName: org.postgresql.Driver
sonar.jdbc.validationQuery: select 1

Instance 2:
sonar.jdbc.username: usr2
sonar.jdbc.password: pass2

sonar.jdbc.url: jdbc: postgresql :/ / localhost/sonar2
sonar.jdbc.driverClassName: org.postgresql.Driver
sonar.jdbc.validationQuery: select 1

So I did the wars: sonar1.war and sonar2.war

My problem is that both instances use the same BD. I need to do something
more?

Greetings!
Mario

--
View this message in context: http://sonar.15.n6.nabble.com/Multiple-Instances-in-Sonar-3-0-tp5000663.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



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

Re: Multiple Instances in Sonar 3.0

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

Re: Multiple Instances in Sonar 3.0

Mario
In reply to this post by Fabrice Bellingard-4
Hi Fabrice!

From the beginning I generated the wars of their respective installation folder.

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

Re: Multiple Instances in Sonar 3.0

Mario
In reply to this post by isovarius
Hi Isovarius!,

I read the link and it says that an instance with Tomcat and the other with Jety, but there is a way to run two instances of Tomcat?

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

Re: Multiple Instances in Sonar 3.0

ebenessy
In reply to this post by Mario
Hi Mario,

did you check the property "sonar.jdbc.schema" in both files "sonar.properties"?
if you have the two schemas sonar1 & sonar2 already created, you must specify the schema of the database to be used in both files, in your case:

In the sonar1 "sonar.properties" file ==> = sonar.jdbc.schema sonar1
In the sonar2 "sonar.properties" file ==> = sonar.jdbc.schema sonar2

I hope it will help you to resolve the problème.

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

Re: Multiple Instances in Sonar 3.0

Mario
Hi Ebenessy!,

I already did and did not work :S
My Tomcat server collapses.

Any other ideas?

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

Re: Multiple Instances in Sonar 3.0

Mario
Hi everyone!,

I did test with the next configurations:

instance 1 -> postgres...ok
instance 2 -> mysql... failure because the instance pointed to postgres.

What do I have to configure?


Thank you for your help!
Mario
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Multiple Instances in Sonar 3.0

ebenessy
Hi Mario,

OK, I think I understand better the cause of this problem, checked in your two tomcat instances the value of the variable SONAR_HOME in the file WEB-INF \ classes \ sonar-war.properties. if they are similar, then you must separate the two instances of Sonar / Tomcat in two different directories and then rebuild the war for each.

This will give the following structure:
  • folder1 contains : Sonar1 + Tomcat1
  • folder2 contains: Sonar2 Tomcat2
Note that after deploying sonar on Tomcat, it's just a webapp that is generated but the configuration is still in the installation folder in the Finder sonar.properties, therefore this folder must remain in the same directory that Tomcat instance.

ebenessy.

2012/7/7 Mario <[hidden email]>
Hi everyone!,

I did test with the next configurations:

instance 1 -> postgres...ok
instance 2 -> mysql... failure because the instance pointed to postgres.

What do I have to configure?


Thank you for your help!
Mario

--
View this message in context: http://sonar.15.n6.nabble.com/Multiple-Instances-in-Sonar-3-0-tp5000663p5000683.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



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

Re: Multiple Instances in Sonar 3.0

Freddy Mallet
In reply to this post by Mario
Hi Mario,

Sorry to come back lately with a so basic question but could you send the Sonar error messages because we don't even know what is exactly the problem.

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Sat, Jul 7, 2012 at 6:52 AM, Mario <[hidden email]> wrote:
Hi everyone!,

I did test with the next configurations:

instance 1 -> postgres...ok
instance 2 -> mysql... failure because the instance pointed to postgres.

What do I have to configure?


Thank you for your help!
Mario

--
View this message in context: http://sonar.15.n6.nabble.com/Multiple-Instances-in-Sonar-3-0-tp5000663p5000683.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Loading...