I want build next structure: one parent (registration) node, several client nodes behind NAT. Client nodes push changes to parent.
I take SymmetricDS
example with corp
and store
, configure it and all work fine. Then I try put initial data to store
instead corp
:
------------------------------------------------------------------------------
-- Sample Data
------------------------------------------------------------------------------
insert into "item" ("item_id", "name") values (11000001, 'Yummy Gum');
insert into "item_selling_price" ("item_id", "store_id", "price", "cost") values (11000001, '001',0.20, 0.10);
insert into "item_selling_price" ("item_id", "store_id", "price", "cost") values (11000001, '002',0.30, 0.20);
insert into "sale_transaction" ("tran_id", "store_id", "workstation", "day", "seq")
values (900, '001', '3', '2012-12-01', 90);
insert into "sale_return_line_item" ("tran_id", "item_id", "price", "quantity", "returned_quantity")
values (900, 11000001, 0.20, 1, 0);
synchronisation work fine, but initial load except.
I trying next reloads:
On corp
reload 001
:
$ ../bin/symadmin --engine corp-000 reload-node 001
Log output will be written to ../logs/symmetric.log
[] - AbstractCommandLauncher - Option: name=engine, value={corp-000}
[corp-000] - PostgreSqlSymmetricDialect - The DbDialect being used is org.jumpmind.symmetric.db.postgresql.PostgreSqlSymmetricDialect
[corp-000] - ExtensionPointManager - Found 6 extension points that will be registered
Successfully enabled initial load for node 001
[corp-000] - PurgeService - Purged all 0 incoming batch for node 001
[corp-000] - RouterService - Inserted reload events for node 001 in 223 ms
[corp-000] - RouterService - Routed 2 data events in 179 ms
[store-001] - PullService - Pull data received from corp:000:000. 1 rows and 1 batches were processed
[store-001] - PullService - Immediate pull requested while in reload mode
[store-001] - RouterService - Routed 1 data events in 337 ms
[store-001] - ConfigurationChangedFilter - About to syncTriggers because new configuration came through the data loader
[store-001] - TriggerRouterService - Synchronizing triggers
[store-001] - TriggerRouterService - Could not find any database tables matching 'sale_tender_line_item' in the datasource that is configured
[store-001] - TriggerRouterService - Done synchronizing triggers
[store-001] - PullService - Pull data received from corp:000:000. 2 rows and 2 batches were processed
[store-001] - PullService - Immediate pull requested while in reload mode
[store-001] - PullService - Pull data received from corp:000:000. 2 rows and 3 batches were processed
[store-001] - PullService - Immediate pull requested while in reload mode
[store-001] - PullService - Pull data received from corp:000:000. 2 rows and 4 batches were processed
[store-001] - PullService - Immediate pull requested while in reload mode
[store-001] - PullService - Pull data received from corp:000:000. 3 rows and 5 batches were processed
[store-001] - RouterService - Routed 1 data events in 509 ms
On corp
reload 000
:
$ ../bin/symadmin --engine corp-000 reload-node 000
Log output will be written to ../logs/symmetric.log
[] - AbstractCommandLauncher - Option: name=engine, value={corp-000}
[corp-000] - PostgreSqlSymmetricDialect - The DbDialect being used is org.jumpmind.symmetric.db.postgresql.PostgreSqlSymmetricDialect
[corp-000] - ExtensionPointManager - Found 6 extension points that will be registered
Successfully enabled initial load for node 000
[corp-000] - RouterService - Routed 1 data events in 137 ms
[store-001] - PullService - Pull data received from corp:000:000. 1 rows and 1 batches were processed
[store-001] - RouterService - Routed 1 data events in 558 ms
On store
reload 001
:
$ ../bin/symadmin --engine store-001 reload-node 001
Log output will be written to ../logs/symmetric.log
[] - AbstractCommandLauncher - Option: name=engine, value={store-001}
[store-001] - MySqlSymmetricDialect - The DbDialect being used is org.jumpmind.symmetric.db.mysql.MySqlSymmetricDialect
[store-001] - ExtensionPointManager - Found 6 extension points that will be registered
Successfully enabled initial load for node 001
[store-001] - RouterService - Routed 1 data events in 222 ms
On store
reload 000
:
$ ../bin/symadmin --engine store-001 reload-node 000
Log output will be written to ../logs/symmetric.log
[] - AbstractCommandLauncher - Option: name=engine, value={store-001}
[store-001] - MySqlSymmetricDialect - The DbDialect being used is org.jumpmind.symmetric.db.mysql.MySqlSymmetricDialect
[store-001] - ExtensionPointManager - Found 6 extension points that will be registered
Successfully enabled initial load for node 000
[store-001] - RouterService - Routed 1 data events in 338 ms
I found this documentation http://www.symmetricds.org/doc/3.5/html-single/user-guide.html#configuration-initial-load-reverse and add auto.reload.reverse=true
to store
property file, but initial load still not work.
I try put to sym_parameter
auto.reload
:
INSERT INTO sym_parameter (external_id,node_group_id,param_key,param_value)
VALUES ('000','corp','auto.reload','true');
and auto.reload.reverse
:
INSERT INTO sym_parameter (external_id,node_group_id,param_key,param_value)
VALUES ('ALL','store','auto.reload.reverse','true');
but it not helps.
How I can resolve my issue?
When I put auto.reload.reverse=true
to corp.properties
reverse reload will start work on registration. But with FK errors. Probably items
not synchronized because have wrong direction. However for my real setup with one direction all work fine.