cloudera manager - Error while committing the transaction


现象:

在用cloudera manager编辑各个组件配置的时候

有可能会出现报错信息:

Error while committing the transaction


cloudera server 端日志:


Caused by: java.sql.BatchUpdateException: Incorrect string value: '\xE5\xB7\xB2\xE6\x9B\xB4...' for column 'VALUE' at row 1
        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
        at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
        at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:110)
        ... 98 more
Caused by: java.sql.SQLException: Incorrect string value: '\xE5\xB7\xB2\xE6\x9B\xB4...' for column 'VALUE' at row 1
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2734)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
        at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
        ... 101 more

原因:

CM元数据库 字符集不兼容 字段 VALUE  MESSAGE  无法写入对应的值。


解决办法:

修改元数据库。

use  cm_db;

alter table CONFIGS         modify `VALUE` longtext character set utf8 collate utf8_general_ci;
alter table CONFIGS_AUD     modify `VALUE` longtext character set utf8 collate utf8_general_ci;
alter table GLOBAL_SETTINGS modify `VALUE` longtext character set utf8 collate utf8_general_ci;
alter table USER_SETTINGS   modify `VALUE` longtext character set utf8 collate utf8_general_ci;


alter table AUDITS modify `MESSAGE` longtext character set utf8 collate utf8_general_ci;
alter table REVISIONS modify `MESSAGE` longtext character set utf8 collate utf8_general_ci;





你可能感兴趣的:(hadoop)