سؤال

I'm trying to configure a replicated backup databse using SymmetricDS v 2.4.

I use 2 files : master.properties for main database

db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://localhost/oscaddb
db.user=oscaddb
db.password=oscaddb
registration.url=http://localhost:31415/sync
sync.url=http://localhost:31415/sync
group.id=master
external.id=10000
job.purge.period.time.ms=7200000
auto.registration=true
auto.reload=true
http.basic.auth.username=sds_user
http.basic.auth.password=sds_pass-2131njwuifn4uhsd
sync.table.prefix=sym

and slave.proerties for backup database

db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://localhost/oscad-redundancja
db.user=oscaddb
db.password=oscaddb
registration.url=http://172.20.50.5:31415/sync
sync.url=http://localhost:31415/sync
group.id=slave
external.id=1
job.routing.period.time.ms=2000
job.push.period.time.ms=5000
job.pull.period.time.ms=5000
auto.registration=true
auto.reload=true
#http.basic.auth.username=sds_user
#http.basic.auth.password=sds_pass-2131njwuifn4uhsd
sync.table.prefix=sym

I did everything else like in User Guide but it when I run a master and then a slave I get a "Registration is not allowed until this node has an initil load" error on the slave side.

What did I do wrong ?

هل كانت مفيدة؟

المحلول

If master/slave are running on different computers then both registration.url and sync.url must contain the external IP addresses, e.g. in your case:

master.properties

..
registration.url=http://<external_**master**_ip_address>:31415/sync
sync.url=http://<external_**master**_ip_address>:31415/sync

slave.properties

..
registration.url=http://<external_**master**_ip_address>:31415/sync
sync.url=http://<external_**slave**_ip_address>:31415/sync

You also need to modify *sym_node* table accordingly in both master/slave databases.

Hope this helps.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top