我们已经使用SonarQube很长一段时间了,升级了许多版本,现在执行期待已久的LTS从5.6.6升级到6.7。遗憾的是,由于SQLException而导致数据库迁移失败"表' project_measures'已经满了#34;。
在这种情况下有什么指导吗?
是否可以直接从5.6.6版升级到6.7版?我应该先升级到其他中间版吗?我认为LTS-to-LTS升级应该可以正常工作......
public class Dashboard extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener {
private Toolbar dashboard_toolbar;
private DrawerLayout mDrawerLayout;
private ActionBarDrawerToggle mActionBarDrawerToggle;
private FirebaseAuth mAuth;
DatabaseReference rootRef, teacher, teacherPost;
String str;
TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_dashboard);
/* str = (String) getIntent().getExtras().get("temp");*/
textView = (TextView) findViewById(R.id.institute_news);
mAuth = FirebaseAuth.getInstance();
dashboard_toolbar = (Toolbar) findViewById(R.id.dashboard_toolbar);
setSupportActionBar(dashboard_toolbar);
getSupportActionBar().setTitle("Dashboard");
dashboard_toolbar.setTitleTextColor(0xFFFFFFFF);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawable);
mActionBarDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, dashboard_toolbar, R.string.open, R.string.close);
mDrawerLayout.setDrawerListener(mActionBarDrawerToggle);
mDrawerLayout.addDrawerListener(mActionBarDrawerToggle);
mActionBarDrawerToggle.syncState();
dashboard_toolbar.post(new Runnable() {
@Override
public void run() {
Drawable d = ResourcesCompat.getDrawable(getResources(), R.drawable.actionmenu, null);
dashboard_toolbar.setNavigationIcon(d);
}
});
NavigationView navigationView = (NavigationView) mDrawerLayout.findViewById(R.id.navigationView);
navigationView.setNavigationItemSelectedListener(this);
rootRef = FirebaseDatabase.getInstance().getReference();
teacher = rootRef.child("admin").child("classPost");
teacherPost = teacher.child("post");
String mGroupId = teacherPost.push().getKey();
Toast.makeText(this, "" + teacherPost, Toast.LENGTH_SHORT).show();
textView.setText(mGroupId);
}
@Override
public void onBackPressed() {
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawable);
if (drawer.isDrawerOpen(GravityCompat.START)) {
drawer.closeDrawer(GravityCompat.START);
} else {
super.onBackPressed();
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.nav_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (mActionBarDrawerToggle.onOptionsItemSelected(item))
return true;
return super.onOptionsItemSelected(item);
}
@Override
public boolean onNavigationItemSelected(MenuItem item) {
// Handle navigation view item clicks here.
int id = item.getItemId();
if (id == R.id.aboutUs) {
} else if (id == R.id.help) {
} else if (id == R.id.report) {
} else if (id == R.id.logoutmenu) {
mAuth.signOut();
sendToStart();
} else if (id == R.id.setting) {
}
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawable);
drawer.closeDrawer(GravityCompat.START);
return true;
}
public void getAttendance(View view) {
Toast.makeText(this, "Attendance Details Apk Fire here", Toast.LENGTH_LONG).show();
}
public void trackChild(View view) {
Toast.makeText(this, "child tracker apk fire here Here", Toast.LENGTH_LONG).show();
}
public void getEwallet(View view) {
Toast.makeText(this, "Ewallet Apk Fire Here", Toast.LENGTH_LONG).show();
}
public void getHealth(View view) {
Toast.makeText(this, "Health apk fire here", Toast.LENGTH_LONG).show();
}
public void getMessageBoardDetails(View view) {
startActivity(new Intent(this,MessageBoard.class));
}
public void startChat(View view) {
startActivity(new Intent(this,Chat.class));
}
private void sendToStart() {
startActivity(new Intent(Dashboard.this,Start.class));
finish();
}
public void readMore(View view) {
startActivity(new Intent(this,InstituteMessageBoard.class));
}
}
SonarQube使用MySQL(rh-mysql57-mysql-server)安装在RHEL7主机上。数据库位置是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
并且有可用的可用磁盘空间(但可能还不够?):
/var/opt/rh/rh-mysql57/lib/mysql/sonar
答案 0 :(得分:2)
支持升级5.6.6到6.7。根据您的堆栈跟踪,您正在使用MySQL服务器。
您可以查看服务器日志文件和MySQL上可用的可用空间(可能MySQL服务器上没有足够的空间用于迁移)?