You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Set up direct replication with enumtostring filter enabled as shown in the
following example:
tools/tungsten-installer --direct -a \
--master-host=logos1 \
--master-user=tungsten \
--master-password=secret \
--slave-host=logos2 \
--slave-user=tungsten \
--slave-password=secret \
--service-name=direct \
--home-directory=/opt/continuent \
--svc-parallelization-type=disk \
--channels=1 \
--mysql-use-bytes-for-string=false \
--svc-extractor-filters=enumtostring \
--skip-validation-check=MySQLConfigFileCheck \
--skip-validation-check=MySQLApplierServerIDCheck \
--skip-validation-check=MySQLExtractorServerIDCheck \
--start-and-report
What is the expected output?
Replication should install and go online.
What do you see instead?
Replicator installation succeeds but replicator comes up in ONLINE-ERROR state.
The trepsvc.log file contains the following (ugly) stack trace:
INFO | jvm 1 | 2012/05/28 11:18:48 | 2012-05-28 11:18:48,496 [direct -
pool-2-thread-1] ERROR conf.ReplicatorRuntime Unable to prepare plugin: class
name=com.continuent.tungsten.replicator.filter.EnumToStringFilter
INFO | jvm 1 | 2012/05/28 11:18:48 |
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
INFO | jvm 1 | 2012/05/28 11:18:48 | at
java.lang.String.substring(String.java:1949)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
org.drizzle.jdbc.JDBCUrl.parse(JDBCUrl.java:96)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
org.drizzle.jdbc.DrizzleDriver.connect(DrizzleDriver.java:81)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
java.sql.DriverManager.getConnection(DriverManager.java:620)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
java.sql.DriverManager.getConnection(DriverManager.java:200)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.database.AbstractDatabase.connect(AbstractDat
abase.java:169)INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.database.MySQLDatabase.connect(MySQLDatabase.
java:119)INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.database.MySQLDatabase.connect(MySQLDatabase.
java:106)INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.filter.EnumToStringFilter.prepare(EnumToStrin
gFilter.java:169)INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.conf.ReplicatorRuntime.preparePlugin(Replicat
orRuntime.java:1086)INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.pipeline.StageTaskGroup.prepare(StageTaskGrou
p.java:187)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.pipeline.Stage.prepare(Stage.java:255)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.pipeline.Pipeline.prepare(Pipeline.java:245)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.conf.ReplicatorRuntime.prepare(ReplicatorRunt
ime.java:561)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.management.tungsten.TungstenPlugin.online(Tun
gstenPlugin.java:333)
INFO | jvm 1 | 2012/05/28 11:18:48 | at
com.continuent.tungsten.replicator.management.OpenReplicatorManager$OfflineToSyn
chronizingAction.doAction(OpenReplicatorManager.java:1235)
Etc.
If you manually correct the URL you may then find that the replicator schema
has not been created. In direct replication the THL is created on the slave,
not the master. You must then issue a CREATE DATABASE command to create the
schema.
What is the possible cause?
The URL for enumtostring lacks a schema name and an option to create the DB
automatically. It just has the host and port name.
replicator.filter.enumtostring.url=jdbc:mysql:thin://${replicator.global.extract
.db.host}:${replicator.global.extract.db.port}
What is the proposed solution?
Add the schema name to the url as follows in enumtostring.tpl (template file
for generating this filter):
replicator.filter.enumtostring.url=jdbc:mysql:thin://${replicator.global.extract
.db.host}:${replicator.global.extract.db.port}/${replicator.schema}?createDB=tru
e
Additional information
You can work around this failure by adding the aforesaid URL updates to your
static-svc.properties file and restarting the replicator.
Use labels and text to provide additional information.
Original issue reported on code.google.com by robert.h...@continuent.com on 28 May 2012 at 6:55
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
robert.h...@continuent.com
on 28 May 2012 at 6:55The text was updated successfully, but these errors were encountered: