Reputation: 389
SymmetricDS active-active PostgreSQL configuration
I an trying to configure active-active postgreSql databases using SymmetricDS.
On the source master I used this /engines/postgresql.poperties:
sync.url=http\://10.110.88.25\:31415/sync/sales
group.id=primary
db.init.sql=
registration.url=
db.driver=org.postgresql.Driver
db.user=rep
db.password=foo
db.url=jdbc\:postgresql\://10.110.88.25:5433/sales?protocolVersion\=3&stringtype \=unspecified&socketTimeout\=300&tcpKeepAlive\=true
engine.name=sales
external.id=1
db.validation.query=select 1
cluster.lock.enabled=false
I started it using:
./sym_service start
and populated the sym_x tables. I could see in symmetric.log that the DB is connected, and triggers were created on my 2 duplicative tables.
On my other server, I created this /engines/postgresql.poperties:
sync.url=http\://10.110.89.86\:31415/sync/sales2
group.id=primary
db.init.sql=
registration.url= http\://10.110.88.25\:31415/sync/sales
db.driver=org.postgresql.Driver
db.user=rep
db.password=foo
db.url=jdbc\:postgresql\://10.110.89.86:5433/sales2?protocolVersion\=3&stringtype \=unspecified&socketTimeout\=300&tcpKeepAlive\=true
engine.name=sales2
external.id=sales2
db.validation.query=select 1
cluster.lock.enabled=false
In the log file, I see this:
INFO [sales2] [AbstractSymmetricEngine] [symmetric-engine-startup-1] SymmetricDS Node STARTED:
nodeId=sales2
groupId=primary
type=server
subType=null
name=sales2
softwareVersion=3.11.8
databaseName=PostgreSQL
databaseVersion=11.7
driverName=PostgreSQL JDBC Driver
driverVersion=42.2.8
uptime=0 sec.
2020-04-26 17:19:46,150 INFO [sales2] [RouterJob] [sales2-job-1] Did not run the 'Routing' job because the engine is not reg$
2020-04-26 17:19:46,187 INFO [sales2] [PushJob] [sales2-job-2] Did not run the 'Push' job because the engine is not register$
2020-04-26 17:19:46,208 INFO [sales2] [RegistrationService] [sales2-job-3] This node is unregistered. It will attempt to re$
2020-04-26 17:19:46,217 INFO [sales2] [MonitorJob] [sales2-job-6] Did not run the 'Monitor' job because the engine is not re$
2020-04-26 17:19:46,218 INFO [sales2] [InitialLoadJob] [sales2-job-5] Did not run the 'Initial Load Queue' job because the e$
2020-04-26 17:19:46,245 INFO [sales2] [DataLoaderService] [sales2-job-3] Using registration URL of http://10.110.88.25:31415$
2020-04-26 17:19:46,250 INFO [sales2] [InitialLoadExtractorJob] [sales2-job-7] Did not run the 'Initial Load Extract' job be$
2020-04-26 17:19:46,303 WARN [sales2] [RegistrationService] [sales2-job-3] Waiting for registration to be accepted by the se$
I gathered I should use symadmin on the source server like this:
./symadmin open-registration --engine sales2 primary sales2
But in the log of the source server I see this:
2020-04-26 17:36:58,585 WARN [sales] [RegistrationUriHandler] [qtp1752182275-891] primary:sales2:? was not allowed to register
Am I doing something wrong? what am I missing?
Upvotes: 1
Views: 1195
Reputation: 1108
It looks like the engine.name
of your source node is sales
. I think your command should be:
./symadmin open-registration --engine sales primary sales2
Upvotes: 2