ddsr-ops opened a new issue #11776:
URL: https://github.com/apache/shardingsphere/issues/11776
## Bug Report
when I modify authority section in server.yaml of 5.0 beta, and restart
sharding proxy, modified authority was not applied.
### Which version of ShardingSphere did you use?
ShardingSphere-Proxy 5.0.0-beta
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
modified authorities in server.yaml should be applied after resarting proxy.
### Actual behavior
when restarting proxy and its status is successfully, I can not connect
proxy with modified authorities.
### Reason analyze (If you can)
zookeepr info may not be updated correctly.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule
configuration, when exception occur etc.
currently, authority section in server.yaml:
rules:
- !AUTHORITY
users:
- root@%:love8013
- sharding@%:love8013
- test@%:love8013
- test1@%:love8013
- test2@%:love8013
provider:
type: NATIVE
1. I start zk , then start proxy
```shell
[root@centos7 bin]# docker start zk-3.6
zk-3.6
[root@centos7 bin]# pwd
/root/soft/shardingsphere-proxy/bin
[root@centos7 bin]# ./start.sh 13308
[root@centos7 bin]# tail -n 10 ../logs/stdout.log
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.
[INFO ] 2021-08-12 11:35:13.197 [main] org.quartz.impl.StdSchedulerFactory -
Quartz scheduler '_finished_check' initialized from an externally provided
properties instance.
[INFO ] 2021-08-12 11:35:13.197 [main] org.quartz.impl.StdSchedulerFactory -
Quartz scheduler version: 2.3.2
[INFO ] 2021-08-12 11:35:13.292 [main] org.quartz.core.QuartzScheduler -
Scheduler _finished_check_$_NON_CLUSTERED started.
[INFO ] 2021-08-12 11:35:13.293 [main] o.a.s.s.c.e.job.ScalingJobExecutor -
Start scaling job executor.
[INFO ] 2021-08-12 11:35:13.390 [epollEventLoopGroup-2-1]
i.n.handler.logging.LoggingHandler - [id: 0x7979f78b] REGISTERED
[INFO ] 2021-08-12 11:35:13.391 [epollEventLoopGroup-2-1]
i.n.handler.logging.LoggingHandler - [id: 0x7979f78b] BIND:
0.0.0.0/0.0.0.0:13308
[INFO ] 2021-08-12 11:35:13.392 [main] o.a.s.p.frontend.ShardingSphereProxy
- ShardingSphere-Proxy start success.
[INFO ] 2021-08-12 11:35:13.392 [epollEventLoopGroup-2-1]
i.n.handler.logging.LoggingHandler - [id: 0x7979f78b, L:/0.0.0.0:13308] ACTIVE
```
2. I connect proxy successfully
```shell
[root@centos7 bin]# mysql -utest1 -plove8013 -h192.168.15.130 -P13308
mysql: [Warning] Using a password on the command line interface can be
insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.35-log-ShardingSphere-Proxy 5.0.0-beta
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
```
3. I modify authority section in server.yaml, and restart proxy. I can not
connect proxy with added user.
modified section in server.yaml:
rules:
- !AUTHORITY
users:
- root@%:love8013
- sharding@%:love8013
- test@%:love8013
- test1@%:love8013
- test2@%:love8013
- test3@%:love8013
provider:
type: NATIVE
> Here, I add a new user test3
```shell
[root@centos7 bin]# ./stop.sh
Stopping the ShardingSphere-Proxy ....OK!
PID: 4315
[root@centos7 bin]#
[root@centos7 bin]# ./start.sh 13308
Starting the ShardingSphere-Proxy ...
The port is 13308
The classpath is
/root/soft/shardingsphere-proxy/conf:.:/root/soft/shardingsphere-proxy/lib/*:/root/soft/shardingsphere-proxy/ext-lib/*
Please check the STDOUT file: /root/soft/shardingsphere-proxy/logs/stdout.log
[root@centos7 bin]# tail -n 10 ../logs/stdout.log
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.
[INFO ] 2021-08-12 11:43:23.969 [main] org.quartz.impl.StdSchedulerFactory -
Quartz scheduler '_finished_check' initialized from an externally provided
properties instance.
[INFO ] 2021-08-12 11:43:23.969 [main] org.quartz.impl.StdSchedulerFactory -
Quartz scheduler version: 2.3.2
[INFO ] 2021-08-12 11:43:24.037 [main] org.quartz.core.QuartzScheduler -
Scheduler _finished_check_$_NON_CLUSTERED started.
[INFO ] 2021-08-12 11:43:24.038 [main] o.a.s.s.c.e.job.ScalingJobExecutor -
Start scaling job executor.
[INFO ] 2021-08-12 11:43:24.129 [epollEventLoopGroup-2-1]
i.n.handler.logging.LoggingHandler - [id: 0x0f014aad] REGISTERED
[INFO ] 2021-08-12 11:43:24.130 [epollEventLoopGroup-2-1]
i.n.handler.logging.LoggingHandler - [id: 0x0f014aad] BIND:
0.0.0.0/0.0.0.0:13308
[INFO ] 2021-08-12 11:43:24.130 [main] o.a.s.p.frontend.ShardingSphereProxy
- ShardingSphere-Proxy start success.
[INFO ] 2021-08-12 11:43:24.131 [epollEventLoopGroup-2-1]
i.n.handler.logging.LoggingHandler - [id: 0x0f014aad, L:/0.0.0.0:13308] ACTIVE
[root@centos7 bin]# mysql -utest3 -plove8013 -h192.168.15.130 -P13308
mysql: [Warning] Using a password on the command line interface can be
insecure.
ERROR 1045 (28000): Access denied for user 'test3'@'192.168.15.130' (using
password: YES)
```
I failed to connect proxy using use test3.
### Example codes for reproduce this issue (such as a github link).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]