You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/01/26 02:58:37 UTC

[GitHub] [shardingsphere] dongzl edited a comment on issue #9121: ShardingSphere JDBC 5.0.0-alpha use Etcd config center error

dongzl edited a comment on issue #9121:
URL: https://github.com/apache/shardingsphere/issues/9121#issuecomment-767255449


   Hi @YanlongMa , I check your project. This governance config can work well.
   
   ```
   # 配置中心
   # 治理名称
   spring.shardingsphere.governance.name=kushu-taishan-baisc
   # 治理持久化类型。如:Zookeeper, etcd, Apollo, Nacos
   spring.shardingsphere.governance.registry-center.type=etcd
   # 治理服务列表。包括 IP 地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
   spring.shardingsphere.governance.registry-center.server-lists=http://localhost:2379
   # 其它配置
   #spring.shardingsphere.governance.registry-center.props=www
   #spring.shardingsphere.governance.registry-center.props.name=www
   # 可选的配置中心类型。如:Zookeeper, etcd, Apollo, Nacos
   #spring.shardingsphere.governance.additional-config-center.type=etcd
   # 可选的配置中心服务列表。包括 IP 地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
   #spring.shardingsphere.governance.additional-config-center.server-lists=localhost:2379
   # 可选的配置中心其它配置
   #spring.shardingsphere.governance.additional-config-center.props=www
   #spring.shardingsphere.governance.additional-config-center.props.name=www
   # 本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准.
   spring.shardingsphere.governance.overwrite=false
   ```
   
   First, should remove this tow config, because we can use `etcd` as `registry center` and  `config center`, doesn't need `additional-config-center` config.
   
   remove these config:
   `spring.shardingsphere.governance.additional-config-center.type=etcd`
   `spring.shardingsphere.governance.additional-config-center.server-lists=localhost:2379`
   
   Second,  `spring.shardingsphere.governance.registry-center.server-lists=http://localhost:2379`
   
   `etcd` URL must start with `http://`.
   
   You can try it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org