Sto usando il seguente software:Sonar non riesce a connettersi al database
- Sonar 3.4.1
- MySQL 5.1
- Maven 2.2.1
- Tomcat 7
I avere un file pom.xml che sto cercando di eseguire con Sonar ma ottenendo l'errore follwing.
[INFO] Building asgard-bpm
[INFO] task-segment: [sonar:sonar] (aggregator-style)
[INFO] -----------------------------------------------------------------------
[INFO] [sonar:sonar {execution: default-cli}]
[INFO] Sonar host: http://{host:8080}/sonar
[INFO] Sonar version: 3.4.1
[INFO] Execute: org.codehaus.sonar:sonar-maven-plugin:3.4.1:sonar
[INFO] [sonar:sonar {execution: default-sonar}]
[INFO] [14:34:54.474] Load project settings
[INFO] [14:34:54.552] Install plugins
[INFO] [14:34:56.674] Apply project exclusions
[INFO] [14:34:56.674] Install JDBC driver
[WARN] [14:34:56.736] H2 database should be used for evaluation purpose only
[INFO] [14:34:56.736] Create JDBC datasource for jdbc:h2:tcp://host/sonar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar
Embedded error: Fail to connect to database
Connection refused: connect
Ho creato un utente nel DB con il nome utente come 'sonar' e la password come 'sonarsonar'.
Schema creato denominato "sonar" e concesso anche tutti i privilegi.
QUI SOTTO SONO LE PROPRIETÀ IMPOSTATE NEL file SONAR.properties.
sonar.web.host: {127.0.0.1}
sonar.web.port: 80
sonar.web.context: /
sonar.jdbc.username: sonar
sonar.jdbc.password: sonarsonar
sonar.jdbc.url: {jdbc:mysql://host:3306/sonaruseUnicode=true&characterEncoding=utf8}
sonar.jdbc.driverClassName: com.mysql.jdbc.Driver
sonar.jdbc.validationQuery: select 1
Qualcuno può dirmi come risolvere questo errore.
Sembra che il server Sonar è stato configurato per Talke a MySQL, ma la vostra generazione è ancora parlando con il database predefinito h2. –
Ho lo stesso problema – BigDong