mysql - SQLException : "The table is full" during SonarQube 6. 7 LTS 升级

标签 mysql sonarqube database-migration

我们已经使用 SonarQube 很长时间了,升级了很多版本,现在执行了期待已久的 LTS 升级,从 5.6.6 版到 6.7 版。不幸的是,由于 SQLException“表‘project_measures’已满”,数据库迁移失败。

是否有关于在这种情况下应该做什么的指南?

直接从5.6.6版本升级到6.7不行吗?我应该先升级到其他中间版本吗?我认为从 LTS 到 LTS 的升级应该没问题……

2017.11.15 00:49:38 INFO  web[][DbMigrations] #1218 'Delete orphan measures without component': success | time=16143ms
2017.11.15 00:49:38 INFO  web[][DbMigrations] #1219 'Make column PROJECT_MEASURES.COMPONENT_UUID not nullable'...
2017.11.15 00:51:04 ERROR web[][DbMigrations] #1219 'Make column PROJECT_MEASURES.COMPONENT_UUID not nullable': failure | time=85651ms
2017.11.15 00:51:04 ERROR web[][DbMigrations] Executed DB migrations: failure | time=1502042ms
2017.11.15 00:51:04 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration failed | time=1502119ms
2017.11.15 00:51:04 ERROR web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB migration ended with an exception
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #1219 'Make column PROJECT_MEASURES.COMPONENT_UUID not nullable' failed
    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:79)
    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:67)
    at java.util.Iterator.forEachRemaining(Iterator.java:116)
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
    at java.util.stream.ReferencePipeline$Head.forEachOrdered(ReferencePipeline.java:590)
    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:50)
    at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doUpgradeDb(DatabaseMigrationImpl.java:105)
    at org.sonar.server.platform.db.migration.DatabaseMigrationImpl.doDatabaseMigration(DatabaseMigrationImpl.java:80)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Fail to execute ALTER TABLE project_measures MODIFY COLUMN component_uuid VARCHAR (50) NOT NULL
    at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:97)
    at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:77)
    at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:117)
    at org.sonar.server.platform.db.migration.version.v60.MakeComponentUuidNotNullOnMeasures.execute(MakeComponentUuidNotNullOnMeasures.java:40)
    at org.sonar.server.platform.db.migration.step.DdlChange.execute(DdlChange.java:45)
    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(MigrationStepsExecutorImpl.java:75)
    ... 11 common frames omitted
Caused by: java.sql.SQLException: The table 'project_measures' is full
    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:2486)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2444)
    at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
    at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
    at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(DdlChange.java:82)
    ... 16 common frames omitted

SonarQube 安装在使用 MySQL (rh-mysql57-mysql-server) 的 RHEL7 主机上。数据库位置是 /var/opt/rh/rh-mysql57/lib/mysql/sonar 并且有可用的可用磁盘空间(但可能不够?):

/dev/mapper/vg0-var_opt   20G   17G  3.1G  85% /var/opt

最佳答案

支持将 5.6.6 升级到 6.7。根据您的堆栈跟踪,您正在使用 MySQL 服务器。

您能看看服务器日志文件和 MySQL 上的可用空间吗(可能是您的 MySQL 服务器上没有足够的空间来进行迁移)?

关于mysql - SQLException : "The table is full" during SonarQube 6. 7 LTS 升级,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47302308/

相关文章:

php - Mysql从两个表中选择组相似的行

ssl - 使用 SSL 和 NGINX 作为反向代理配置 Sonarqube - 错误代码 : SSL_ERROR_RX_RECORD_TOO_LONG

java - 为某些代码关闭 Sonar

java - SonarQubeMojo 的 SonarQube Intellij 插件错误

mysql - Sybase 到 MySQL 自动导出

php - php下拉菜单有问题

php - 插入重复键更新 - 插入不会将任何内容发布到数据库中,更新会

mysql - SQL ANY 和 ALL 运算符

database - 升级或迁移后是否有验证数据库模式是否正确的好方法?

python - ForeignKey 默认值中 int() 错误的文字无效