SymmetricDS active-active PostgreSQL配置
我正在尝试使用SymmetricDS配置active-active postgreSql数据库。
在源码主机上,我使用了/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我是这样开始的:
./sym_service start 并填充sym_x表。我可以在symmetric.log中看到数据库已连接,并且在我的两个重复表上创建了触发器。
在我的另一台服务器上,我创建了/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 在日志文件中,我看到以下内容:
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$ 我想我应该在源服务器上使用symadmin,如下所示:
./symadmin open-registration --engine sales2 primary sales2 但在源服务器的日志中,我看到以下内容:
2020-04-26 17:36:58,585 WARN [sales] [RegistrationUriHandler] [qtp1752182275-891] primary:sales2:? was not allowed to register 我做错了什么吗?我遗漏了什么?
发布于 2020-04-27 04:32:31
看起来源节点的engine.name是sales。我认为你的命令应该是:
./symadmin open-registration --engine sales primary sales2 https://stackoverflow.com/questions/61442885
复制相似问题