View source | Discuss this page | Page history | Printable version   
Main Page
Upload file
What links here
Recent changes

PDF Books
Add page
Show collection (0 pages)
Collections help


How to Set Up and Start the Synchronization Engine



It is very easy to set up and start the SymmetricDS engine. The SetupSymmetricListener does it automatically, based on the contents of the file and the list of tables to be synchronized (see how to configure the synchronization of a table).

Note: for symmetric ds to work correctly it is important that the source.path property in the should be set correctly.

Install the module

First install the module by cloning it like this in the modules directory of your development project:

hg clone

The module will be offered on the Openbravo forge in a later stadium.

Note: If you are on OB Commerce 16Q1 development then you need to apply a changeset to get the right dbsourcemanager. This is described in the README which is present in the replication symmetric ds module.

It most of the time makes sense to install an additional module which contains the sync definition (for syncing masterdata from main server to store server):

These modules have to be inserted both in the central and in the store servers.

Then rebuild the system using ant smartbuild -Dlocal=no.

Installing SymmetricDS in the Main Server

To install SymmetricDS in the main server, the install.symmetric.ds ant task needs to be invoked:

ant -f modules/org.openbravo.replication.symmetricds/build.xml install.symmetric.ds

That task will:

Once the task has been invoked, the file needs to be copied to the WEB-INF folder, for instance by running the ant smartbuild task.

Installing SymmetricDS in a Store Server

There is no need to install SymmetricDS manually in the store servers, apart from cloning the modules as explained in the previous section. When Tomcat is started in a store server, the synchronization properties file will be automatically created based on the configuration of the mobile servers, and those properties will be used to set up and start the synchronization engine. As part of the start up procedure of the synchronization engine, it will issue a registration request to the main server. Once the store server has been successfully registered, it will load all the non node specific synchronization properties from the main server.

Uninstalling SymmetricDS

The SymmetricDS database objects can be uninstalled at any moment by running the ant uninstall.symmetric.ds task in the org.openbravo.replication.symmetricds module. This process must be executed also in the store servers, even though the install.symmetric.ds task is not run in those servers.

Installing/Uninstalling the SymmetricDS triggers from the Openbravo tables

The and uninstall.symmetric.ds.triggers.from.ob.tables ant tasks install and uninstall respectively from the database the triggers that were created by SymmetricDS in the Openbravo tables that should be synchronized.

The file

The file defines some properties about the server that will be used by Symmetric DS to configure the synchronization engine. These properties are:

This file is created automatically both in the main and in the store servers.

Main Server Example, using an PostgreSQL database named hgvoloracle:

Store Server Example, using a PostgreSQL database named pihgvolss:

Giving registration access to a server

For a store server to be given registration access, the Can Be Registered flag of its entry in the Mobile Servers window must be activated. Until then, all its registration requests will be rejected.


How to configure the SymmetricDS log

SymmetricDS uses log4j for logging, so you can configure the Openbravo log4j.lcf file to configure its logging. This is an example on how to do it, storing the SymmetricDS log in the /tmp/logs/symmetric.log file:, SYMMETRIC, C
log4j.appender.SYMMETRIC.layout.ConversionPattern=%d{ISO8601} %p [%X{engineName}] [%c{1}] [%t] %m%n, SYMMETRIC

We recommend setting the log leve of the org.jumpmind.symmetric.util.PropertiesFactoryBean class to ERROR, that class is is very verbose and the messages that it logs are not useful.

Setting the additivity to false will prevent the SymmetricDS log from being logged in the appenders defined in the root category. For instance, the console appender and the Openbravo file appender are defined in the root category. SymmetricDS log will be shown in the console because it has been explicitely selected when defining the category, but it will not be shown in the Openbravo file appender.


Error when restarting tomcat: The configured state does not match recorded database state

When you see a message like this in your console or Openbravo.log:

8504 [symmetric-engine-startup-0] ERROR org.jumpmind.symmetric.AbstractSymmetricEngine - The configured state does not match recorded database state.  The recorded external id is 7EAAA333467244FE8527B7C57F082D4B while the configured external id is 2ABAF56A0FFD4764983814DE5A0C68F0. The recorded node group id is {} while the configured node group id is {}

This probably means that there is no file in the WEB-INF directory or it has invalid data.

FileNotFoundException in the log

When you see a message like this in the log:

Caused by:

This is caused by a wrong url in the file. So you should check the file.

Installing in Postgresql 9.1

If the install.symmetric.ds task is run against a Postgresql 9.1 database the following error will occur:

[java] 9624 [main] ERROR org.jumpmind.symmetric.db.postgresql.PostgreSqlSymmetricDialect  - Please add "custom_variable_classes = 'symmetric'" to your postgresql.conf file

As the error messages describes, this problem is solved by adding this line to the postgresql.conf file and reloading postgresql:

custom_variable_classes = 'symmetric'

Retrieved from ""

This page has been accessed 2,925 times. This page was last modified on 3 November 2016, at 17:17. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.