Issue 1:
Bug Report

Which version of ShardingSphere did you use?

master branch

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy & governance

Expected behavior

create readwrite splitting rule success after execute drop readwrite splitting rule

Actual behavior

mysql> DROP READWRITE_SPLITTING RULE ms_group_0, ms_group_1;

mysql> CREATE READWRITE_SPLITTING RULE ms_group_0 (
-> WRITE_RESOURCE=primary_ds,
-> READ_RESOURCES(replica_ds_0,replica_ds_1),
-> TYPE(NAME=random)
-> ), ms_group_1 (
-> WRITE_RESOURCE=primary_ds,
-> READ_RESOURCES(replica_ds_0,replica_ds_1),
-> TYPE(NAME=random)
-> );
ERROR 1105 (C1105): Duplicate rule names [ms_group_0, ms_group_1] in schema sharding_db

Reason analyze (If you can)

Not refresh metadata in memory.

Issue 2:
Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Searched open and closed GitHub issues.

Read documentation: ShardingSphere Doc.

Please pay attention on issues you submitted, because we maybe need more details.

If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

5.0.0-RC1

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy

Expected behavior

After configuring Zookeeper's permission token, connect normally.

The following is my configuration in server.yaml.

mode:
type: Cluster
repository:
type: ZooKeeper
props:
namespace: governance_ds
server-lists: 127.0.0.1:2181
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
digest: digest:us234243er:shdnegzow@%=:*
overwrite: true
rules:
- !AUTHORITY
users:
- shardingsphere233@%:shardingsphere213
- shard2233@:shard634876
provider:
type: ALL_PRIVILEGES_PERMITTED
- !TRANSACTION
defaultType: XA
providerType: Atomikos
props:
max-connections-size-per-query: 1
kernel-executor-size: 16
proxy-frontend-flush-threshold: 128
proxy-opentracing-enabled: false
proxy-hint-enabled: false
sql-show: false
check-table-metadata-enabled: false
lock-wait-timeout-milliseconds: 50000
show-process-list-enabled: false
proxy-backend-query-fetch-size: -1
check-duplicate-table-enabled: false
sql-comment-parse-enabled: false
proxy-frontend-executor-size: 0
proxy-backend-executor-suitable: OLAP

Actual behavior

Throw an exception message and abort.

[INFO ] 2021-10-23 09:13:09.437 [main] org.apache.zookeeper.ZooKeeper - Client environment:os.memory.free=1765MB
[INFO ] 2021-10-23 09:13:09.437 [main] org.apache.zookeeper.ZooKeeper - Client environment:os.memory.max=1945MB
[INFO ] 2021-10-23 09:13:09.438 [main] org.apache.zookeeper.ZooKeeper - Client environment:os.memory.total=1945MB
[INFO ] 2021-10-23 09:13:09.444 [main] org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@74f6c5d8
[INFO ] 2021-10-23 09:13:09.454 [main] org.apache.zookeeper.common.X509Util - Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation
[INFO ] 2021-10-23 09:13:09.625 [main] o.apache.zookeeper.ClientCnxnSocket - jute.maxbuffer value is 1048575 Bytes
[INFO ] 2021-10-23 09:13:09.635 [main] org.apache.zookeeper.ClientCnxn - zookeeper.request.timeout value is 0. feature enabled=false
[INFO ] 2021-10-23 09:13:09.645 [main] o.a.c.f.imps.CuratorFrameworkImpl - Default schema
[INFO ] 2021-10-23 09:13:18.736 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181.
[INFO ] 2021-10-23 09:13:18.737 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - SASL config status: Will not attempt to authenticate using SASL (unknown error)
[WARN ] 2021-10-23 09:13:20.803 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - Session 0x0 for sever 127.0.0.1/127.0.0.1:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:342)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1262)
[WARN ] 2021-10-23 09:13:30.671 [Curator-Framework-0] o.a.c.retry.ExponentialBackoffRetry - Sleep extension too large (70000). Pinning to 30000
[INFO ] 2021-10-23 09:13:30.980 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181.
[INFO ] 2021-10-23 09:13:30.981 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - SASL config status: Will not attempt to authenticate using SASL (unknown error)
[WARN ] 2021-10-23 09:13:33.039 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - Session 0x0 for sever 127.0.0.1/127.0.0.1:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:342)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1262)
[INFO ] 2021-10-23 09:13:39.656 [Curator-Framework-0] o.a.c.f.imps.CuratorFrameworkImpl - backgroundOperationsLoop exiting
[INFO ] 2021-10-23 09:13:43.234 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181.
[INFO ] 2021-10-23 09:13:43.235 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - SASL config status: Will not attempt to authenticate using SASL (unknown error)
[WARN ] 2021-10-23 09:13:45.318 [main-SendThread(127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn - An exception was thrown while closing send thread for session 0x0.
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:342)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1262)
[INFO ] 2021-10-23 09:13:45.430 [main] org.apache.zookeeper.ZooKeeper - Session: 0x0 closed
[INFO ] 2021-10-23 09:13:45.431 [main-EventThread] org.apache.zookeeper.ClientCnxn - EventThread shut down for session: 0x0
Exception in thread "main" org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositoryException: org.apache.zookeeper.KeeperException$OperationTimeoutException: KeeperErrorCode = OperationTimeout
at org.apache.shardingsphere.mode.repository.cluster.zookeeper.handler.CuratorZookeeperExceptionHandler.handleException(CuratorZookeeperExceptionHandler.java:51)
at org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository.initCuratorClient(CuratorZookeeperRepository.java:128)
at org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository.init(CuratorZookeeperRepository.java:82)
at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.createClusterPersistRepository(ClusterContextManagerBuilder.java:115)
at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.beforeBuildContextManager(ClusterContextManagerBuilder.java:92)
at org.apache.shardingsphere.mode.manager.cluster.ClusterContextManagerBuilder.build(ClusterContextManagerBuilder.java:82)
at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.initContext(BootstrapInitializer.java:77)
at org.apache.shardingsphere.proxy.initializer.BootstrapInitializer.init(BootstrapInitializer.java:68)
at org.apache.shardingsphere.proxy.Bootstrap.main(Bootstrap.java:47)
Caused by: org.apache.zookeeper.KeeperException$OperationTimeoutException: KeeperErrorCode = OperationTimeout
at org.apache.shardingsphere.mode.repository.cluster.zookeeper.CuratorZookeeperRepository.initCuratorClient(CuratorZookeeperRepository.java:125)
... 7 more

I have seen another closed issue.( #12292 )I initially thought it was a zookeeper problem, until I found out that after removing digest: digest:us234243er:shdnegzow@%=:* and removing the zookeeper configuration, the program ran normally.

Does this mean that the configuration method of the new version has changed, but the official website document does not mention it?

In order to provide information, I changed the zookeeper address in the issue to 127.0.0.1. In fact, the connection failed was a remote server.

Reason analyze (If you can)

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Example codes for reproduce this issue (such as a github link).