Crowd Installation Failed Due to STATEMENT binary logging
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
問題
Crowd installation fails when it's using MySQL DB with InnoDB and the default binary logging format - i.e. 'STATEMENT'
atlassian-crowd.log
に次のメッセージが出力される。
2015-09-03 17:37:32,238 http-bio-80-exec-6 ERROR [crowd.xwork.interceptors.TransactionalInvocation] Action /console/setup/setupoptions.action (Options.default()) is already completed and can not be committed again.
2015-09-03 17:37:32,238 http-bio-80-exec-6 ERROR [apache.struts2.dispatcher.DefaultDispatcherErrorHandler] Exception occurred during processing request: JDBC exception on Hibernate data access: SQLException for SQL [insert into cwd_property (property_value, property_key, property_name) values (?, ?, ?)]; SQL state [HY000]; error code [1665]; could not perform addBatch; nested exception is org.hibernate.exception.GenericJDBCException: could not perform addBatch
org.springframework.orm.hibernate4.HibernateJdbcException: JDBC exception on Hibernate data access: SQLException for SQL [insert into cwd_property (property_value, property_key, property_name) values (?, ?, ?)]; SQL state [HY000]; error code [1665]; could not perform addBatch; nested exception is org.hibernate.exception.GenericJDBCException: could not perform addBatch
at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:146)
at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:678)
...
Caused by: org.hibernate.exception.GenericJDBCException: could not perform addBatch
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:54)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124)
...
Caused by: java.sql.BatchUpdateException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
... 114 more
Caused by: java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4187)
... 117 more
原因
This is required by MySQL:
Statement based binlogging does not work in isolation level
READ UNCOMMITTED and READ COMMITTED since the necessary
locks cannot be taken.
ソリューション
To fix this problem, you must configure MySQL's binary logging format to use 'row-based' binary logging:
- Shutdown Crowd and your MySQL database
- Open the MySQL configuration file (
my.cnf or my.ini
) in a text editor Locate the
binlog_format
property in this file in the[mysqld]
section and ensure that its value isrow
, such that you end up with:binlog_format=row
Please see http://dev.mysql.com/doc/refman/5.6/en/binary-log-setting.html for more information.
- Save your changes to this file
- Restart Crowd and your MySQL database
- Re-initiate the Crowd installation.