Database Corruption - Illegal Content in Plan Variables

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Bamboo build fails and there is no way to delete or edit the plan from the user interface. Bamboo logs contain something similar to this:

2012-05-01 20:11:09,705 INFO [1-BAM::AAAAA.domain01.local::Agent:pool-3-thread-1] [InitializeBuild] Build working directory is C:\bamboo-agent-home\xml-data\build-dir\MMM-PPP-BUILD
2012-05-01 20:11:09,768 WARN [1-BAM::AAAAA.domain01.local::Agent:pool-3-thread-1] [BuildAgentControllerImpl] Error occurred while executing the build for MMM-PPP-BUILD-765
com.thoughtworks.xstream.io.StreamException:  : only whitespace content allowed before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1) 
	at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)
	at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
	at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)

原因

Bamboo plan variable having illegal content was saved into the DB which causing database corruption.

ソリューション

After making sure that you have backed up your Bamboo database (so that you can restore it in case something goes wrong), run this SQL query to make sure that the variables belong to the same project:

select * from BUILD_ID from BUILD where FULL_KEY like '%MMM-PPP%';

Next step is manually deleting the variables that caused the corruption. You might need to use the DBVisualizer. Run the following query like this and restart your Bamboo server.

delete from Variable_DEFINITION where PLAN_ID in (select BUILD_ID from BUILD where FULL_KEY like '%MMM-PPP%');

If you experience this error (java.lang.ArrayIndexOutOfBoundsException), follow the steps discussed in this article. After, log in to your Bamboo server, find the plan that was causing the problem, manually delete it from the user interface, and restart your Bamboo server. This should permanently remove the plan from the DB.

 

 

最終更新日 2013 年 7 月 16 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.