aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-application/src/main')
-rw-r--r--sonar-application/src/main/assembly/conf/sonar.properties9
-rw-r--r--sonar-application/src/main/java/org/sonar/application/App.java27
-rw-r--r--sonar-application/src/main/java/org/sonar/application/DefaultSettings.java4
3 files changed, 3 insertions, 37 deletions
diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties
index 8cae11e3cca..f14700b3592 100644
--- a/sonar-application/src/main/assembly/conf/sonar.properties
+++ b/sonar-application/src/main/assembly/conf/sonar.properties
@@ -69,11 +69,6 @@ sonar.jdbc.timeBetweenEvictionRunsMillis=30000
#sonar.web.javaOpts=-Xmx768m -XX:MaxPermSize=160m -XX:+HeapDumpOnOutOfMemoryError \
# -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false
-# Web server requires a JMX RMI port to be open. Default is 9003. A free port is
-# dynamically used is value is 0.
-# This JMX port must be private and must not be exposed to the Internet.
-#sonar.web.jmxPort=9003
-
# Binding IP address. For servers with more than one IP address, this property specifies which
# address will be used for listening on the specified ports.
# By default, ports will be used on all IP addresses associated with the server.
@@ -182,10 +177,6 @@ sonar.jdbc.timeBetweenEvictionRunsMillis=30000
# This port must be private and must not be exposed to the Internet.
#sonar.search.port=9001
-# JMX RMI port to monitor Elasticsearch process. Default is 9002. Use 0 to get a free port.
-# It must be private and must not be exposed to the Internet.
-#sonar.search.jmxPort=9002
-
#--------------------------------------------------------------------------------------------------
# UPDATE CENTER
diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java
index 600828ec1db..db1f9fcb5f6 100644
--- a/sonar-application/src/main/java/org/sonar/application/App.java
+++ b/sonar-application/src/main/java/org/sonar/application/App.java
@@ -21,12 +21,9 @@ package org.sonar.application;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang.StringUtils;
-import org.sonar.process.JmxUtils;
import org.sonar.process.MinimumViableSystem;
import org.sonar.process.ProcessLogging;
-import org.sonar.process.ProcessMXBean;
import org.sonar.process.Props;
-import org.sonar.process.State;
import org.sonar.process.monitor.JavaCommand;
import org.sonar.process.monitor.Monitor;
@@ -38,7 +35,7 @@ import java.util.Properties;
/**
* Entry-point of process that starts and monitors elasticsearch and web servers
*/
-public class App implements ProcessMXBean {
+public class App {
private final Monitor monitor;
@@ -48,7 +45,6 @@ public class App implements ProcessMXBean {
App(Monitor monitor) {
this.monitor = monitor;
- JmxUtils.registerMBean(this, "SonarQube");
}
public void start(Props props) {
@@ -60,10 +56,9 @@ public class App implements ProcessMXBean {
List<JavaCommand> commands = new ArrayList<JavaCommand>();
File homeDir = props.nonNullValueAsFile("sonar.path.home");
File tempDir = props.nonNullValueAsFile("sonar.path.temp");
- JavaCommand elasticsearch = new JavaCommand(JmxUtils.SEARCH_SERVER_NAME);
+ JavaCommand elasticsearch = new JavaCommand("search");
elasticsearch
.setWorkDir(homeDir)
- .setJmxPort(props.valueAsInt(DefaultSettings.SEARCH_JMX_PORT))
.addJavaOptions(props.value(DefaultSettings.SEARCH_JAVA_OPTS))
.setTempDir(tempDir.getAbsoluteFile())
.setClassName("org.sonar.search.SearchServer")
@@ -74,9 +69,8 @@ public class App implements ProcessMXBean {
// do not yet start SQ in cluster mode. See SONAR-5483 & SONAR-5391
if (StringUtils.isEmpty(props.value(DefaultSettings.CLUSTER_MASTER))) {
- JavaCommand webServer = new JavaCommand(JmxUtils.WEB_SERVER_NAME)
+ JavaCommand webServer = new JavaCommand("web")
.setWorkDir(homeDir)
- .setJmxPort(props.valueAsInt(DefaultSettings.WEB_JMX_PORT))
.addJavaOptions(props.nonNullValue(DefaultSettings.WEB_JAVA_OPTS))
.setTempDir(tempDir.getAbsoluteFile())
// required for logback tomcat valve
@@ -94,21 +88,6 @@ public class App implements ProcessMXBean {
return commands;
}
- @Override
- public void terminate() {
- monitor.stop();
- }
-
- @Override
- public boolean isReady() {
- return monitor.getState() == State.STARTED;
- }
-
- @Override
- public void ping() {
-
- }
-
static String starPath(File homeDir, String relativePath) {
File dir = new File(homeDir, relativePath);
return FilenameUtils.concat(dir.getAbsolutePath(), "*");
diff --git a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java
index b18d0b633b2..701249f5f63 100644
--- a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java
+++ b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java
@@ -35,9 +35,7 @@ class DefaultSettings {
static final String CLUSTER_NAME = "sonar.cluster.name";
static final String CLUSTER_NODE_NAME = "sonar.node.name";
static final String SEARCH_PORT = "sonar.search.port";
- static final String SEARCH_JMX_PORT = "sonar.search.jmxPort";
static final String SEARCH_JAVA_OPTS = "sonar.search.javaOpts";
- static final String WEB_JMX_PORT = "sonar.web.jmxPort";
static final String WEB_JAVA_OPTS = "sonar.web.javaOpts";
static final String JDBC_URL = "sonar.jdbc.url";
static final String JDBC_LOGIN = "sonar.jdbc.username";
@@ -84,8 +82,6 @@ class DefaultSettings {
private static Map<String, Integer> defaultPorts() {
Map<String, Integer> defaults = new HashMap<String, Integer>();
defaults.put(SEARCH_PORT, 9001);
- defaults.put(SEARCH_JMX_PORT, 9002);
- defaults.put(WEB_JMX_PORT, 9003);
return defaults;
}
}