Exception while configuring symmetricDS with postgresql on Linux

0

SymmetricDS is a java tool which can replicate databases and tables across an intermittent internet connection. I am having trouble configuring it to work with postgresql.

I am doing this piece of the configuration instructions:

#Next, create the SymmetricDS-specific tables in the corp node database.
#These tables will
#contain the configuration for synchronization. The following command uses 
#the auto-creation
#feature to create all the necessary SymmetricDS system tables.

../bin/symadmin --engine corp-000 create-sym-tables

When I run this command, I get the following Exception:

[corp-000] - PostgreSqlSymmetricDialect - Done with auto update of
             SymmetricDS tables
[corp-000] - PostgreSqlSymmetricDialect - Please add
             "custom_variable_classes = 'symmetric'"
             to your postgresql.conf file
-------------------------------------------------------------------------------
An exception occurred.  Please see the following for details:
-------------------------------------------------------------------------------
org.postgresql.util.PSQLException: ERROR: unrecognized configuration parameter "symmetric.triggers_disabled"
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
    at org.jumpmind.db.sql.JdbcSqlTransaction$5.execute(JdbcSqlTransaction.java:299)
    at org.jumpmind.db.sql.JdbcSqlTransaction$5.execute(JdbcSqlTransaction.java:289)
    at org.jumpmind.db.sql.JdbcSqlTransaction.executeCallback(JdbcSqlTransaction.java:316)
    org.jumpmind.db.sql.SqlException: ERROR: unrecognized configuration parameter "symmetric.triggers_disabled"
    at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:288)
    at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:279)
    at org.jumpmind.db.sql.JdbcSqlTransaction.executeCallback(JdbcSqlTransaction.java:318)
    at org.jumpmind.db.sql.JdbcSqlTransaction.prepareAndExecute(JdbcSqlTransaction.java:289)
    at org.jumpmind.symmetric.db.postgresql.PostgreSqlSymmetricDialect.enableSyncTriggers(PostgreSqlSymmetricDialect.java:217)
    at org.jumpmind.symmetric.db.postgresql.PostgreSqlSymmetricDialect.createRequiredDatabaseObjects(PostgreSqlSymmetricDialect.java:75)
    org.jumpmind.symmetric.SymmetricException: Please add "custom_variable_classes = 'symmetric'" to your postgresql.conf file
    at org.jumpmind.symmetric.db.postgresql.PostgreSqlSymmetricDialect.createRequiredDatabaseObjects(PostgreSqlSymmetricDialect.java:79)
    at org.jumpmind.symmetric.db.AbstractSymmetricDialect.initTablesAndDatabaseObjects(AbstractSymmetricDialect.java:154)
    at org.jumpmind.symmetric.AbstractSymmetricEngine.setupDatabase(AbstractSymmetricEngine.java:364)
    at org.jumpmind.symmetric.SymmetricAdmin.createSymTables(SymmetricAdmin.java:424)
    at org.jumpmind.symmetric.SymmetricAdmin.executeWithOptions(SymmetricAdmin.java:270)
    at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:130)
    at org.jumpmind.symmetric.SymmetricAdmin.main(SymmetricAdmin.java:119)
-------------------------------------------------------------------------------

A bunch of tables were created in my database, so it seemed to work. I made the change to the postgresql.conf file but this Exception is still thrown. What is wrong?

Eric Leschinski

Posted 2013-08-10T04:56:03.063

Reputation: 5 303

Answers

0

The mistake I made was I edited the wrong postgresql.conf file and then I didn't restart the postgresql databases so those changes would take effect. I was able to get rid of this Exception by doing the following:

  1. Locate your real postgresql.conf file, mine is /var/lib/pgsql/data/postgresql.conf

  2. Edit the file as root and change the line as the exception says:

    #custom_variable_classes = ''         
    custom_variable_classes = 'symmetric'
    
  3. Save the file, and restart postgresql:

    systemctl start postgresql.service
    
  4. Run the command again ../bin/symadmin --engine corp-000 create-sym-tables

It completes normally and prints these results:

[el@rosewill samples ]$ ../bin/symadmin --engine corp-000 create-sym-tables
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 5 extension points that will be registered
[corp-000] - AbstractSymmetricEngine - Initializing SymmetricDS database
[corp-000] - PostgreSqlSymmetricDialect - Checking if SymmetricDS tables need created or altered
[corp-000] - PostgreSqlSymmetricDialect - Just installed sym_triggers_disabled
[corp-000] - PostgreSqlSymmetricDialect - Just installed sym_node_disabled
[corp-000] - PostgreSqlSymmetricDialect - Just installed sym_largeobject
[corp-000] - ConfigurationService - Auto-configuring config channel
[corp-000] - ConfigurationService - Auto-configuring reload channel
[corp-000] - ConfigurationService - Auto-configuring heartbeat channel
[corp-000] - ConfigurationService - Auto-configuring default channel
[corp-000] - ConfigurationService - Auto-configuring filesync channel
[corp-000] - AbstractSymmetricEngine - Done initializing SymmetricDS database

One request for the symmetricDS developers, please use a Concise clear error message, not a 3 page one at the end of 21 pages of console output. When the user is scratching the head wondering what this is: ERROR: unrecognized configuration parameter "symmetric.triggers_disabled".

Don't make me think! http://www.sensible.com/dmmt.html

Eric Leschinski

Posted 2013-08-10T04:56:03.063

Reputation: 5 303

1Note that when using PostgreSQL 9.2 or newer you won't have to set this parameter anymore - nor will you be able to, it'll be rejected. – Craig Ringer – 2013-08-10T06:58:25.363