Bamboo fails to start

お困りですか?

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

コミュニティに質問

症状

Bamboo fails to start and cannot find the database; on the UI it might show the setup wizard; logs look like:

...
2012-05-18 17:06:48,619 INFO [main] [PListStore] PListStore:/usr/bamboo-home/jms-store/bamboo/tmp_storage started
2012-05-18 17:06:48,622 INFO [main] [BrokerService] Using Persistence Adapter: KahaDBPersistenceAdapter[/usr/bamboo-home/jms-store/bamboo/KahaDB]
2012-05-18 17:06:48,687 ERROR [main] [BrokerService] Failed to start ActiveMQ JMS Message Broker. Reason: java.io.FileNotFoundException: /usr/bamboo-home/jms-store/bamboo/KahaDB/db-7617.log (Permission denied)
java.io.FileNotFoundException: /usr/bamboo-home/jms-store/bamboo/KahaDB/db-7617.log (Permission denied)
    at java.io.RandomAccessFile.open(Native Method)
    at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
    at org.apache.kahadb.journal.DataFile.openRandomAccessFile(DataFile.java:70)
    at org.apache.kahadb.journal.DataFileAccessor.<init>(DataFileAccessor.java:49)
    at org.apache.kahadb.journal.DataFileAccessorPool$Pool.openDataFileReader(DataFileAccessorPool.java:53)
    at org.apache.kahadb.journal.DataFileAccessorPool.openDataFileAccessor(DataFileAccessorPool.java:139)
    at org.apache.kahadb.journal.Journal.recoveryCheck(Journal.java:202)
    at org.apache.kahadb.journal.Journal.start(Journal.java:174)
    at org.apache.activemq.store.kahadb.MessageDatabase.load(MessageDatabase.java:348)
...
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
    at com.atlassian.bamboo.server.Server.main(Server.java:77)
2012-05-18 17:06:48,690 INFO [main] [BrokerService] ActiveMQ Message Broker (bamboo, null) is shutting down
2012-05-18 17:06:48,699 INFO [main] [PListStore] PListStore:/usr/bamboo-home/jms-store/bamboo/tmp_storage stopped
2012-05-18 17:06:48,716 INFO [main] [KahaDBStore] Stopping async queue tasks
2012-05-18 17:06:48,716 INFO [main] [KahaDBStore] Stopping async topic tasks
2012-05-18 17:06:48,716 INFO [main] [KahaDBStore] Stopped KahaDB
2012-05-18 17:06:48,726 INFO [main] [BrokerService] ActiveMQ JMS Message Broker (bamboo, null) stopped
2012-05-18 17:06:48,727 INFO [main] [ConfigurableLocalSessionFactoryBean] Closing Hibernate SessionFactory
2012-05-18 17:06:48,729 ERROR [main] [ContextLoader] Context initialization failed
...

原因

The <Bamboo_Home>/bamboo.cfg.xml file is truncated. Sometimes when Bamboo crashes due to insufficient disc space, it might corrupt the bamboo.cfg.xml  file. Here is the related JAC ticket: BAM-11596 - Getting issue details... STATUS

ソリューション

Please shut down your Bamboo server, and make sure that bamboo.cfg.xml file contains all the necessary fields. For example, with Bamboo 4.1, using MySQL5, 'bamboo41' database name and localhost IP address for Broker URI (used for Remote agent communication), the file will look like this:

<?xml version="1.0" encoding="UTF-8"?>

<application-configuration>
  <setupStep>complete</setupStep>
  <setupType>custom</setupType>
  <buildNumber>3100</buildNumber>
  <properties>
    <property name="bamboo.artifacts.directory">${bambooHome}/artifacts</property>
    <property name="bamboo.config.directory">${bambooHome}/xml-data/configuration</property>
    <property name="bamboo.jms.broker.client.uri">failover:(tcp://127.0.0.1:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&amp;initialReconnectDelay=15000</property>
    <property name="bamboo.jms.broker.uri">tcp://0.0.0.0:54663?wireFormat.maxInactivityDuration=300000</property>
    <property name="bamboo.project.directory">${bambooHome}/xml-data/builds</property>
    <property name="buildWorkingDir">${bambooHome}/xml-data/build-dir</property>
    <property name="daily.backup.dir">${bambooHome}/backups</property>
    <property name="hibernate.c3p0.acquire_increment">1</property>
    <property name="hibernate.c3p0.idle_test_period">100</property>
    <property name="hibernate.c3p0.max_size">25</property>
    <property name="hibernate.c3p0.max_statements">0</property>
    <property name="hibernate.c3p0.min_size">0</property>
    <property name="hibernate.c3p0.timeout">30</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.password">_your_DB_password_goes_here_</property>
    <property name="hibernate.connection.url">jdbc:mysql://127.0.0.1/bamboo41?autoReconnect=true</property>
    <property name="hibernate.connection.username">_your_DB_username_goes_here_</property>
    <property name="hibernate.dialect">com.atlassian.hibernate.dialect.MySQL5Dialect</property>
    <property name="hibernate.setup">true</property>
    <property name="license.string">_your_license_goes_here_</property>
    <property name="lucene.index.dir">${bambooHome}/index</property>
    <property name="serverId">_your_ServerID_goes_here_</property>
    <property name="webwork.multipart.saveDir">${bambooHome}/temp</property>
  </properties>
</application-configuration>

In order to be sure that you are using all the correct configuration details, just try to install a test instance from scratch. After you are done, copy the content of BAMBOO_HOME/bamboo.cfg.xml  file from the new instance into the one from the corrupted instance. You need to make sure that you are using correct:

  • license: <property name="license.string">_your_license_goes_here_</property>
  • database name: <property name="hibernate.connection.url">jdbc:mysql://127.0.0.1/_your_DN_name_goes_here_?autoReconnect=true</property>
  • database username: <property name="hibernate.connection.username">_your_DB_username_goes_here_</property>
  • database password: <property name="hibernate.connection.password">_your_DB_password_goes_here_</property>
  • ServerID: <property name="serverId">_your_ServerID_goes_here_</property>

After crafting your <BAMBOO_HOME>/bamboo.cfg.xml  file manually, start your Bamboo server, and it should work properly again. You might need to delete <BAMBOO_HOME>/jms-store/bamboo/KahaDB  and <BAMBOO_HOME>/caches  directories and restart your Bamboo server if you confront problems while starting Bamboo.

最終更新日: 2021 年 12 月 27 日

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

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