Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-17316

Bamboo 5.10.2 does not work well with MySQL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Low
    • None
    • 5.10.2
    • None
    • None

    Description

      Summary

      Bamboo 5.10.2 have a few errors with MySQL

      Environment

      • MySQL 5.5.27
      • mysql-connector-java-5.1.38-bin.jar

      Steps to Reproduce

      1. Install Bamboo 5.10.2
      2. Configure MySQL database configuration
        The page http://localhost:8085/setup/performSetupDatabaseConnection.action loading non stop
      3. After waiting for a while, reloading the URL http://localhost:8085 will redirect to http://localhost:8085/setup/setupSelectImport.action to proceed with the Setup
      4. Enable "Manage trusted keys" in Security settings
      5. Access Administration >> Security >> Trusted keys
        There is an error in the UI "The trusted key can't be read from the server."
      6. Click on the button "Add key" to add trusted key
        There is an error in the UI "The trusted key can't be added. View the server logs for the details."

      Expected Results

      1. In Step 2, the page should auto redirect to http://localhost:8085/setup/setupSelectImport.action to proceed with the Setup
      2. There shouldn't be any error in Step 5
      3. Add Trusted Key is successful

      Actual Results

      1. In Step 2, the below exception is thrown in the atlassian-bamboo.log file:
        2016-03-07 17:26:43,741 WARN [http-nio-8085-exec-23] [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02
        2016-03-07 17:26:43,741 ERROR [http-nio-8085-exec-23] [JDBCExceptionReporter] Table 'bamboo5102.rememberme_token' doesn't exist
        2016-03-07 17:26:43,818 INFO [http-nio-8085-exec-23] [SpringObjectFactoryProxy] Switching to Struts-Spring object factory
        2016-03-07 17:26:43,819 INFO [http-nio-8085-exec-23] [SpringObjectFactory] Setting autowire strategy to name
        2016-03-07 17:26:43,819 INFO [http-nio-8085-exec-23] [StrutsSpringObjectFactory] Struts-Spring integration initialised successfully
        2016-03-07 17:26:43,844 ERROR [http-nio-8085-exec-23] [ExceptionMappingInterceptor] HTTP request not available
        java.lang.IllegalStateException: HTTP request not available
        	at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
        	at com.atlassian.bamboo.util.RequestCacheThreadLocal.getNonNullRequest(RequestCacheThreadLocal.java:124)
        ...
        2016-03-07 17:26:43,986 ERROR [http-nio-8085-exec-23] [FiveOhOh] 500 Exception was thrown.
        org.springframework.dao.InvalidDataAccessResourceUsageException: could not load an entity: [com.atlassian.bamboo.security.RememberMeTokenImpl#753665]; SQL [select rememberme0_.id as id52_0_, rememberme0_.USERNAME as USERNAME52_0_, rememberme0_.CREATED as CREATED52_0_, rememberme0_.TOKEN as TOKEN52_0_ from REMEMBERME_TOKEN rememberme0_ where rememberme0_.id=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not load an entity: [com.atlassian.bamboo.security.RememberMeTokenImpl#753665]
        ...
        2016-03-07 17:26:56,146 ERROR [performSetupDatabaseConnectionBackgroundThread] [SchemaExport] Unsuccessful: create table TRUSTED_KEY (id bigint not null, HOST varchar(255) not null, SSH_KEY varchar(4000) not null, APPROVED bit not null, primary key (id), unique (HOST, SSH_KEY))
        2016-03-07 17:26:56,147 ERROR [performSetupDatabaseConnectionBackgroundThread] [SchemaExport] Specified key was too long; max key length is 767 bytes
        2016-03-07 17:27:43,934 ERROR [performSetupDatabaseConnectionBackgroundThread] [SchemaExport] Unsuccessful: create index tk_host_idx on TRUSTED_KEY (HOST)
        2016-03-07 17:27:43,934 ERROR [performSetupDatabaseConnectionBackgroundThread] [SchemaExport] Table 'bamboo5102.trusted_key' doesn't exist
        
      2. In Step 5 and 6, the below exception is thrown in the atlassian-bamboo.log file:
        2016-03-07 18:28:00,252 INFO [http-nio-8085-exec-10] [AccessLogFilter] kahloun.foong GET http://localhost:8085/rest/admin/latest/security/trustedKey 24536kb
        2016-03-07 18:28:00,257 WARN [http-nio-8085-exec-10] [JDBCExceptionReporter] SQL Error: 1146, SQLState: 42S02
        2016-03-07 18:28:00,258 ERROR [http-nio-8085-exec-10] [JDBCExceptionReporter] Table 'bamboo5102.trusted_key' doesn't exist
        2016-03-07 18:28:00,259 WARN [http-nio-8085-exec-10] [BambooRuntimeExceptionMapper] Unexpected error from REST call
        org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select this_.id as id53_0_, this_.HOST as HOST53_0_, this_.SSH_KEY as SSH3_53_0_, this_.APPROVED as APPROVED53_0_ from TRUSTED_KEY this_]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
        ...
        Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'bamboo5102.trusted_key' doesn't exist
        

      Notes

      1. In Step 2, even though the error log showing that REMEMBERME_TOKEN table does not exist, the table REMEMBERME_TOKEN does exist in the database. The second restart does not have this error
      2. The table trusted_key fail to be created in the database due to SSH_KEY is too large to be added to Unique constraint: Specified key was too long; max key length is 767 bytes

      Attachments

        Issue Links

          Activity

            People

              pbruski Przemek Bruski
              klfoong Foong (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: