SonarSource/sonarqube · error · IllegalArgumentException

Unsupported connector:

Error message

Unsupported connector: 

What it means

During startup, EmbeddedTomcat.validateConnectorScheme iterates all configured Tomcat connectors and asserts each reports scheme "http". Any connector configured with a non-http scheme (e.g. https/SSL) is unsupported because SonarQube expects TLS termination to happen in a reverse proxy in front of Tomcat; such a connector triggers this IllegalArgumentException and aborts startup.

Source

Thrown at server/sonar-webserver/src/main/java/org/sonar/server/app/EmbeddedTomcat.java:88

    webappContext = new TomcatContexts().configure(tomcat, props);
    try {
      tomcat.start();
      validateConnectorScheme();
    } catch (LifecycleException e) {
      LOGGER.error("Failed to start web server", e);
      Throwables.propagate(e);
    }
  }

  private File tomcatBasedir() {
    return new File(props.value(PATH_TEMP.getKey()), "tc");
  }

  private void validateConnectorScheme() {
    Connector[] connectors = tomcat.getService().findConnectors();
    for (Connector connector : connectors) {
      if (!connector.getScheme().equals("http")) {
        throw new IllegalArgumentException("Unsupported connector: " + connector);
      }
    }
  }

  Status getStatus() {
    if (webappContext == null) {
      return Status.DOWN;
    }
    return switch (webappContext.getState()) {
      case NEW, INITIALIZING, INITIALIZED, STARTING_PREP, STARTING -> Status.DOWN;
      case STARTED -> Status.UP;
      default ->
        // problem, stopped or failed
        Status.FAILED;
    };
  }

  public enum Status {

View on GitHub (pinned to 184c821202)

Solutions

  1. Remove the HTTPS/SSL connector configuration and serve SonarQube over plain HTTP on the web port
  2. Terminate TLS in a reverse proxy in front of SonarQube and set sonar.web.https related proxy headers (sonar.web.port / sonar.server.basehttpurl accordingly)
  3. If embedding Tomcat programmatically, only add connectors whose getScheme() returns "http"

Example fix

// before
connector.setScheme("https");
connector.setSecure(true);
// after
connector.setScheme("http"); // terminate TLS at the reverse proxy instead
Defensive patterns

Strategy: validation

Validate before calling

if (!connector.getScheme().equals("http")) throw new IllegalArgumentException("Serve HTTPS via a reverse proxy, not the embedded Tomcat connector");

Try / catch

try { tomcat.start(); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith("Unsupported connector")) { log.error("Use a reverse proxy for TLS; remove SSL connector config"); } throw e; }

Prevention

When it happens

Trigger: Configuring sonar.web.https.* / an SSL-enabled connector, or programmatically adding an HTTPS connector to the embedded Tomcat before start().

Common situations: Users trying to enable HTTPS directly on SonarQube's embedded Tomcat instead of using a reverse proxy (nginx/Apache/IIS); leftover custom connector configuration.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of SonarSource/sonarqube@184c821202 (2026-09-09). Data as JSON: /api/errors/0280c32bc0ed8f3e. Report an issue: GitHub.