2017-12-15 27 views
1

SonarQube 6.7 (LTS)을 다운로드했으며 this 페이지의 지침을 따랐습니다. 그러나 데이터베이스와 관련된 문제가있는 것 같습니다. 데이터베이스에 대해 MySQL 5.7을 사용하고 있습니다. 이라는 이름의 스키마를 만들고라는 음역을 만들고, 파일에 파일의 적절한 데이터베이스 설정을 지정합니다. 데이터베이스 측면에서, 나는 SonarQube에 대한 사용자를 추가했고 또한 관리자 권한을 부여 받았다. 그러나 웹 서버를 시작할 때마다 웹 서버가 중지되고 웹 로그를 확인할 때 web.log 예외가 있음을 알았습니다. 보인다 schema_migrations가 발생할 수있는 테이블에 항목을 삽입 할 수없는 것 : 나는 데이터베이스를 확인하고 나는 테이블 SonarQube 성공적으로 만들어진 것을보고SonarQube를 MySql 데이터베이스에 삽입 할 수 없습니다.

Caused by: java.sql.SQLException: The table does not comply with the requirements by an external plugin.

. 어디에서 문제가 발생합니까? 그리고 왜? 이것이 주요 문제일까요? 다음은

는 전체 로그입니다 : 이유,

2017.12.15 17:03:35 INFO web[][o.s.p.ProcessEntryPoint] Starting web 
2017.12.15 17:03:35 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read 
2017.12.15 17:03:36 INFO web[][o.e.p.PluginsService] no modules loaded 
2017.12.15 17:03:36 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.index.reindex.ReindexPlugin] 
2017.12.15 17:03:36 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin] 
2017.12.15 17:03:36 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin] 
2017.12.15 17:03:36 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin] 
2017.12.15 17:03:38 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001] 
2017.12.15 17:03:38 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server/6.7.0.33306/5d031d9d2ac3f69b4b9bc600d50563b1886c7d8b 
2017.12.15 17:03:38 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:mysql://localhost:3310/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false 
2017.12.15 17:03:39 INFO web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: D:\Programs\sonarqube-6.7 
2017.12.15 17:03:39 INFO web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled 
2017.12.15 17:03:39 INFO web[][o.s.s.p.d.m.h.MigrationHistoryTableImpl] Creating table schema_migrations 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin Flex/2.3/79167f762219bea1fd181ff5ef6ca4b34abd1675 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarC#/6.5.0.3766/6011a1e9fb002edb044ae3092d92bcfb7d9d8a2d 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarJS/3.2.0.5506/86da09565f891121df248835665f5d8ed98772b6 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarJava/4.15.0.12310/572454b93016ec73a53fe0e07b2ffdc356d21ba9 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPHP/2.11.0.2485/741861a29e5f9a26c6c99c06268facb6c4f4a882 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarPython/1.8.0.1496/3fe3bc4d0273a5721ea2fb368dc45b1bb82fede3 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarQube :: Plugins :: SCM :: Git/1.3.0.869/4da53e3f9e55f4f2e5796625cb0c5768ed152079 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarQube :: Plugins :: SCM :: SVN/1.6.0.860/2111fdbd1dddda4ad6d4ed6486fd0b18c1010d3b 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarTS/1.1.0.1079/042c9e65239a47d92d305f9767f730b3cc1e5ed3 
2017.12.15 17:03:40 INFO web[][o.s.s.p.ServerPluginRepository] Deploy plugin SonarXML/1.4.3.1027/39588245cecf538bb27be4e496ff303b0143d20b 
2017.12.15 17:03:46 INFO web[][o.s.s.p.d.m.AutoDbMigration] Automatically perform DB migration on fresh install 
2017.12.15 17:03:46 INFO web[][DbMigrations] Executing DB migrations... 
2017.12.15 17:03:46 INFO web[][DbMigrations] #1 'Create initial schema'... 
2017.12.15 17:07:17 ERROR web[][DbMigrations] #1 'Create initial schema': failure | time=211172ms 
2017.12.15 17:07:17 ERROR web[][DbMigrations] Executed DB migrations: failure | time=211172ms 
2017.12.15 17:07:17 ERROR web[][o.s.s.p.Platform] Web server startup failed 
java.lang.IllegalStateException: Failed to insert row with value 1 in table schema_migrations 
    at org.sonar.server.platform.db.migration.history.MigrationHistoryImpl.done(MigrationHistoryImpl.java:88) 
    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:76) 
    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67) 
    at java.util.Iterator.forEachRemaining(Unknown Source) 
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source) 
    at java.util.stream.ReferencePipeline$Head.forEachOrdered(Unknown Source) 
    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:52) 
    at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(MigrationEngineImpl.java:52) 
    at org.sonar.server.platform.db.migration.AutoDbMigration.start(AutoDbMigration.java:65) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) 
    at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) 
    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) 
    at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) 
    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) 
    at org.picocontainer.behaviors.Stored.start(Stored.java:110) 
    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) 
    at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) 
    at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) 
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:134) 
    at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90) 
    at org.sonar.server.platform.Platform.start(Platform.java:211) 
    at org.sonar.server.platform.Platform.startSafeModeContainer(Platform.java:203) 
    at org.sonar.server.platform.Platform.doStart(Platform.java:104) 
    at org.sonar.server.platform.Platform.doStart(Platform.java:95) 
    at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:46) 
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745) 
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
Caused by: java.sql.SQLException: The table does not comply with the requirements by an external plugin. 
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964) 
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) 
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) 
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527) 
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680) 
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490) 
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) 
    at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1197) 
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) 
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) 
    at org.sonar.server.platform.db.migration.history.MigrationHistoryImpl.done(MigrationHistoryImpl.java:83) 
    ... 37 common frames omitted 
+0

같은이 예외가'schema_migrations'의 기본 키가 있습니까 명중 설치 한? –

+0

[SonarQube 요구 사항] (https://docs.sonarqube.org/display/SONAR/Requirements) 페이지에서 모든 MySQL 요구 사항을 확인 했습니까? –

+0

@Mick No. 테이블에 기본 키를 명시 적으로 만들거나 추가하지 않았습니다. –

답변

0

이 아니다 솔루션,하지만 난 MySQL의 (권한과 함께)와 동일한 구성 및 사용자와 서버 그리고 지금 그 작업을 재설치 그럴 수 없어 알다.

동일한 조치로 인해 다른 결과가 발생했기 때문에 문제의 원인을 파악하지 못했으며 문제를 재현하는 방법을 모르겠습니다.

1

이 예외는 MySQL 드라이버에서 발생합니다. schema_migrations 테이블을 만들지 못하게하는 MySQL 플러그인을 설치 한 것으로 보입니다.

어쩌면 당신은 "그룹 복제"플러그인 및 https://bugs.mysql.com/bug.php?id=83165