Sonarqube doesn't start from Docker

I’m trying to run Sonarqube from Docker with sonar.sh start.

When I look over the logs grep -i Exception * I see this:

  • Docker install PHP-7-fpm with Memcache extention ? fails with Cannot find config.m4
  • Database with starttime and endtime [closed]
  • Connecting local psql db with web app inside the docker container
  • Temporary failure in name resolution [Errno -3] with Docker
  • How does Celery discover new Nodes?
  • Docker stats for docker containers in kubernetes returning empty values
  • ce.log:org.apache.ibatis.exceptions.PersistenceException:
    ce.log:### Error querying database.  Cause: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused (Connection refused): localhost:9092" [90067-176]
    ce.log:### Cause: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused (Connection refused): localhost:9092" [90067-176]
    ce.log: at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
    ce.log:Caused by: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused (Connection refused): localhost:9092" [90067-176]
    ce.log: at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
    ce.log: at org.h2.message.DbException.get(DbException.java:167)
    ce.log:Caused by: java.net.ConnectException: Connection refused (Connection refused)
    web.log:2017.02.11 14:30:00 ERROR web[][o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.web.PlatformServletContextListener
    web.log:java.lang.IllegalStateException: Metric [scoverage] is already defined by the repository [com.buransky.plugins.scoverage.measure.ScalaMetrics@63c004ba]
    web.log:java.lang.IllegalStateException: Webapp did not start
    

    Some of these exceptions refer to the database, but I don’t think there should be any issue with that since I haven’t modified the embedded database.

    I think this could be the most relevant issue, since I added a Scala plugin to Sonarqube:

    web.log:java.lang.IllegalStateException: Metric [scoverage] is already defined by the repository [com.buransky.plugins.scoverage.measure.ScalaMetrics@63c004ba]
    

    Any idea what could be causing Sonarqube to fail in Docker?

  • docker-compose.yml with multiple env_files
  • Configuration or option in docker run to fail if host volume has no write pemissions
  • Building Dockerfile fails when touching a file after a mkdir
  • docker git clone during build is not cloning (and not erroring)
  • npm syscall symlink error -95 when installing node-sass on Docker for Windows
  • Linking docker containers to combine different libraries
  • One Solution collect form web for “Sonarqube doesn't start from Docker”

    I had the sonar-scala plugin in sonarqube/extensions/ and sonarqube/extensions/plugins.

    After I removed it from sonarqube/extensions/, it started working. Not sure why though.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.