我正试图用sonar.sh start
从Docker运行Sonarqube。
当我查看日志grep -i Exception *
时,我看到了这一点:
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
其中一些例外涉及数据库,但我认为没有任何问题,因为我没有修改嵌入式数据库。
我认为这可能是最相关的问题,因为我在Sonarqube中添加了一个Scala插件:
web.log:java.lang.IllegalStateException: Metric [scoverage] is already defined by the repository [com.buransky.plugins.scoverage.measure.ScalaMetrics@63c004ba]
知道什么可能导致Sonarqube在Docker中失败?
答案 0 :(得分:0)
我在sonar-scala
和sonarqube/extensions/
中添加了sonarqube/extensions/plugins
插件。
我从sonarqube/extensions/
删除后,它开始工作了。不知道为什么会这样。