Moises Leonor
Moises Leonor

Reputation: 129

Does the master database need to be in the same host where symmetricds runs?

That is the configuration of the master node


engine.name=master

db.driver=com.mysql.jdbc.Driver

db.url=jdbc:mysql://192.168.1.55:3306/master-db?useSSL=false

db.user=root

db.password=password

registration.url=
sync.url=http://192.168.1.55:31415/sync/master-db

group.id=master
external.id=0

# Don't muddy the waters with purge logging
job.purge.period.time.ms=7200000

# This is how often the routing job will be run in milliseconds
job.routing.period.time.ms=5000
# This is how often the push job will be run.
job.push.period.time.ms=5000
# This is how often the pull job will be run.
job.pull.period.time.ms=5000
# Kick off initial load
initial.load.create.first=true

That is the configuration of the child node


engine.name=italian-restaurant

db.driver=com.mysql.jdbc.Driver

db.url=jdbc:mysql://192.168.1.5:3306/italian_restaurant_db?useSSL=false

db.user=root

db.password=password

registration.url=
sync.url=http://192.168.1.55:31415/sync/child-db

group.id=restaurants
external.id=1

# Don't muddy the waters with purge logging
job.purge.period.time.ms=7200000

# This is how often the routing job will be run in milliseconds
job.routing.period.time.ms=5000
# This is how often the push job will be run.
job.push.period.time.ms=5000
# This is how often the pull job will be run.
job.pull.period.time.ms=5000
# Kick off initial load
initial.load.create.first=true

And all this works fine, but if in the master properties change the host IP of the master DB to another IP (Because I have the database in the cloud) the connection to master DB in the cloud works fine because all symmetricds tables are created and the default configuration is loaded but the registration of nodes, not works.

Throw warn alert Registration was no open

This only happens if the master database is not in the same host where symmetricds runs

Thanks, I hope for your answers

Upvotes: 0

Views: 105

Answers (1)

chenson42
chenson42

Reputation: 1108

There is no requirement for SymmetricDS to be on the same host as the database. I would have expected your scenario to work exactly the same as with the local database.

In the master.properties did you only change the ip address in the db.url?

On a side note, it is usually a good idea to have your SymmetricDS instance on the same network with good bandwidth to your database for optimal performance (as JDBC can be chatty).

Upvotes: 2

Related Questions