2 instances of Sonar on same machine

做~自己de王妃 提交于 2019-12-12 13:11:26

问题


Can we run 2 instances(2 different versions) of Sonar on same machine?

At present Sonar 3.7.3 is installed and is been used with Hudson for Sonar Reports. Now, there are some projects that run on Java 8 and Java 8 is not supported by 3.7.3 Sonar version.

So to run the Java 8 projects, I need to use the latest version of Sonar but upgradation of Sonar would impact the existing projects that run on Java 6.

So can we configure 2 Sonar instances and can configure Hudson accordingly so that both the java 6 and java 8 projects can be run for Sonar reports?


回答1:


Yes, you can. Just make sure the following variables are unique:

  1. conf/wrapper.conf

    • wrapper.ntservice.name=SonarQube[version]
  2. conf/sonar.properties

    • sonar.web.port=[unique port]
    • sonar.jdbc.url=jdbc:postgresql://localhost/sonar[version] #(in case you have a postgresql db)



回答2:


If you want to run 2 instances of sonar in the same machine make sure to have uniqu values in conf/sonar.properties for below properties.

sonar.jdbc.url=<db_url>
sonar.web.port=<default value would be 9000>
sonar.search.port=<default value would be 9001>

However, above properties are associated with below properties as well. Change them if needed accordingly,

sonar.jdbc.username=<db_username>
sonar.jdbc.password=<db_password>
sonar.web.host=<default value would be localhost>


来源:https://stackoverflow.com/questions/32558915/2-instances-of-sonar-on-same-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!