|
|
发表于:
2014-12-23 15:08:15 |
[全部帖]
[楼主帖]
|
楼主
|
|
|
|
启动Sequoia控制器:
E:\sequoia\bin>controller -f ../config/controller/controller-mysql-db.xml 出错:
以上出错信息说明是在初始化表格时语法出错,从源码找到RecoveryLog类第558行,加入一行:[code] try { stmt = connection.createStatement(); stmt.executeUpdate(logTableCreateStatement); stmt.close(); } catch (SQLException e) { //加入此行,打印出创建表格的SQL语句,以便找到语法问题 System.out.println("logTableCreateStatement######"+logTableCreateStatement); throw new SQLException(Translate.get( "recovery.jdbc.logtable.create.failed", new String[]{logTableName, e.getMessage()})); }[/code]再次启动,发现打印出:
这是Sequoia默认自带的Hsql的语法,改成以下: 然后在Mysql控制台执行手动创建表。 其它三个表可以根据以上方法进行手动创建,也可以修改配置文件,以下是修改后的: 或者手动创建表: 现在再次启动控制器,你会发现新的错误(不要看到错误就害怕): 找 RecoveryLog.java:1321 行,然后追踪到1263行, 你会发现错误出在它执行了 SELECT log_id,sql FROM... ,其中的sql是MYSQL关键字,所以会出错,改为: 再次启动控制器,以下是控制台信息:[code]E:\sequoia\bin>controller -f ../config/controller/controller-mysql-db.xml 20:03:23,187 INFO controller.core.Controller Sequoia controller (2.10.9) 20:03:23,250 INFO controller.core.Controller Loading configuration file: ../con fig/controller/controller-mysql-db.xml 20:03:23,312 INFO controller.core.Controller JMX is enabled 20:03:23,343 INFO controller.core.Controller Starting JMX server on host: 192.1 68.1.44 20:03:23,640 INFO backup.backupers.OctopusBackuper OctopusBackuper backup compr ession is set to true 20:03:23,640 INFO controller.backup.BackupManager Registering backuper Octopus to handle format Octopus v3.4.1 database neutral dump compressed 20:03:23,656 INFO 168.1.89 Adding connection manager for virtual user "user" 20:03:23,671 INFO DatabaseBackend.myDB.localhost2 Adding connection manager for virtual user "user" 20:03:23,968 WARN sequoia.controller.recoverylog Backend table BACKEND does not match database table name case (backend) 20:03:23,968 WARN sequoia.controller.recoverylog Checkpoint table CHECKPOINT do es not match database table name case (checkpoint) 20:03:23,968 WARN sequoia.controller.recoverylog Dump table BACKEND does not ma tch database table name case (dump) 20:03:23,968 WARN sequoia.controller.recoverylog Log table RECOVERY does not ma tch database table name case (recovery) 20:03:24,000 INFO controller.RequestManager.myDB Request manager will parse req uests with the following granularity: TABLE 20:03:24,015 WARN controller.core.Controller Backends enabled in force mode fro m checkpoint Initial_empty_recovery_log 20:03:59,593 INFO 168.1.89 Detected backend as: MySQL 20:04:01,453 INFO controller.RequestManager.myDB Setting new virtual database s chema. 20:04:01,484 INFO controller.recoverylog.RecoverThread Starting recovery 20:04:01,484 INFO controller.recoverylog.RecoverThread Recovery completed 20:04:03,203 INFO controller.recoverylog.RecoverThread Database backend 192.168 .1.89 is now enabled 20:04:03,281 INFO DatabaseBackend.myDB.localhost2 Detected backend as: MySQL 20:04:04,531 INFO controller.RequestManager.myDB Virtual database schema merged with new schema. 20:04:04,531 INFO controller.recoverylog.RecoverThread Starting recovery 20:04:04,531 INFO controller.recoverylog.RecoverThread Recovery completed 20:04:05,765 INFO controller.recoverylog.RecoverThread Database backend localho st2 is now enabled 20:04:05,781 WARN VirtualDatabaseWorkerThread.myDB.metadata Metadata key [store sMixedCaseIdentifiers] is not compatible. (Backends are: [jdbc:mysql://192.168.1 .89:3306/mysql_blog?useUnicode=true&characterEncoding=utf8] and [jdbc:mysql://loc alhost:3406/mysql_blog?useUnicode=true&characterEncoding=utf8] ; Values are:[true ] and [false]) 20:04:05,781 WARN VirtualDatabaseWorkerThread.myDB.metadata Metadata key [store sLowerCaseIdentifiers] is not compatible. (Backends are: [jdbc:mysql://192.168.1 .89:3306/mysql_blog?useUnicode=true&characterEncoding=utf8] and [jdbc:mysql://loc alhost:3406/mysql_blog?useUnicode=true&characterEncoding=utf8] ; Values are:[fals e] and [true]) 20:04:05,781 WARN VirtualDatabaseWorkerThread.myDB.metadata Metadata key [suppo rtsMixedCaseQuotedIdentifiers] is not compatible. (Backends are: [jdbc:mysql://1 92.168.1.89:3306/mysql_blog?useUnicode=true&characterEncoding=utf8] and [jdbc:mys ql://localhost:3406/mysql_blog?useUnicode=true&characterEncoding=utf8] ; Values a re:[true] and [false]) 20:04:05,781 WARN VirtualDatabaseWorkerThread.myDB.metadata Metadata key [store sLowerCaseQuotedIdentifiers] is not compatible. (Backends are: [jdbc:mysql://192 .168.1.89:3306/mysql_blog?useUnicode=true&characterEncoding=utf8] and [jdbc:mysql ://localhost:3406/mysql_blog?useUnicode=true&characterEncoding=utf8] ; Values are :[false] and [true]) 20:04:05,781 WARN VirtualDatabaseWorkerThread.myDB.metadata Metadata key [getDa tabaseMinorVersion] is not compatible. (Backends are: [jdbc:mysql://192.168.1.89 :3306/mysql_blog?useUnicode=true&characterEncoding=utf8] and [jdbc:mysql://localh ost:3406/mysql_blog?useUnicode=true&characterEncoding=utf8] ; Values are:[0] and [2]) 20:04:05,781 WARN VirtualDatabaseWorkerThread.myDB.metadata Metadata key [store sMixedCaseQuotedIdentifiers] is not compatible. (Backends are: [jdbc:mysql://192 .168.1.89:3306/mysql_blog?useUnicode=true&characterEncoding=utf8] and [jdbc:mysql ://localhost:3406/mysql_blog?useUnicode=true&characterEncoding=utf8] ; Values are :[true] and [false]) 20:04:05,781 WARN VirtualDatabaseWorkerThread.myDB.metadata Metadata key [suppo rtsMixedCaseIdentifiers] is not compatible. (Backends are: [jdbc:mysql://192.168 .1.89:3306/mysql_blog?useUnicode=true&characterEncoding=utf8] and [jdbc:mysql://l ocalhost:3406/mysql_blog?useUnicode=true&characterEncoding=utf8] ; Values are:[tr ue] and [false]) 20:04:05,781 INFO controller.core.Controller Adding VirtualDatabase myDB 20:04:05,781 INFO controller.core.Controller Waiting for connections on 0.0.0.0 :25322 20:04:05,796 INFO controller.core.Controller Controller started on 2007.11.28 4 8 at 08:04:05 下午 CST
20:04:05,796 INFO controller.core.Controller Controller 192.168.1.44:25322 read y, listening to requests ...[/code]启动成功,Sequoia控制器等待请求。
注,以上的
WARN VirtualDatabaseWorkerThread.myDB.metadata Metadata key [supportsMixedCaseIdentifiers] is not compatible. 等信息是因为我的两个Mysql版本中有一个是用solid的Mysql版本的原因。
--转自
|
|
|