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 2022/10/10 06:30:35 UTC

[GitHub] [shardingsphere] herbxu opened a new issue, #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

herbxu opened a new issue, #19461:
URL: https://github.com/apache/shardingsphere/issues/19461

   ## Bug Report
   ShardingSphere Proxy config center not work. some nodes not have config center configurations info like datasource, rule configurations
   
   ### Which version of ShardingSphere did you use?
   5.1.2 (helm cluster)
   docker images url: apache/shardingsphere-proxy:5.1.2
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   All cluster some nodes have some config center configurations info like datasource, rule configurations
   
   ### Actual behavior
   ShardingSphere Proxy Cluster some nodes not have config center configurations info like datasource, rule configurations
   
   ### Environment Configurations
   helm values below: 
   ```
   governance:
     enabled: true
     zookeeper:
       enabled: true
       replicaCount: 3
       persistence:
         enabled: false
         storageClass: ""
         accessModes:
           - ReadWriteOnce
         size: 20Gi
       resources:
         limits: {}
         requests:
           memory: 256Mi
           cpu: 250m
   
   
   compute:
     image:
       repository: "apache/shardingsphere-proxy"
       pullPolicy: IfNotPresent
       ## Overrides the image tag whose default is the chart appVersion.
       ##
       tag: 5.1.2
     imagePullSecrets: []
     resources:
       limits: {}
       requests:
         memory: 2Gi
         cpu: 200m
     replicas: 3
     service:
       type: ClusterIP
       port: 3307
     ## MySQL connector Configuration
     ## ref: https://shardingsphere.apache.org/document/current/en/quick-start/shardingsphere-proxy-quick-start/
     ## @param compute.mysqlConnector.version MySQL connector version
     ##
     mysqlConnector:
       version: "5.1.49"
     startPort: 3307
     serverConfig:
       authority:
         privilege:
           type: ALL_PRIVILEGES_PERMITTED
         users:
           - password: root
             user: test@%
       mode:
         overwrite: false
         repository:
           props:
             maxRetries: 3
             namespace: governance_ds
             operationTimeoutMilliseconds: 5000
             retryIntervalMilliseconds: 500
             server-lists: "shardingsphere-proxy-zookeeper:2181"
             timeToLiveSeconds: 600
           type: ZooKeeper
         type: Cluster
   ```
   
   
   one proxy node execute command below:
   ```
   create database ss_test;
   
   ADD RESOURCE ds_0 (
     HOST=127.0.0.1,
     PORT=3306,
     DB=test_db,
     USER=test_db,
     PASSWORD=test123
   ),ds_1 (
     HOST=127.0.0.1,
     PORT=3306,
     DB=test_db,
     USER=test_db2,
     PASSWORD=test123
   );
   
   CREATE SHARDING TABLE RULE t_order(
     RESOURCES(ds_0,ds_1),
     SHARDING_COLUMN=order_id,
     TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)),
     KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake))
   );
   
   CREATE TABLE `t_order` (
     `order_id` int NOT NULL,
     `user_id` int NOT NULL,
     `status` varchar(45) DEFAULT NULL,
     PRIMARY KEY (`order_id`)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
   
   
   INSERT INTO `t_order` (`order_id`, `user_id`, `status`) VALUES(0,0,"aaa"),(1,1,"bbbb"),(2,2,"cccc");
   ```
   
   this node can see the configurations below:
   ![image](https://user-images.githubusercontent.com/58198659/180357046-fd12efe5-1745-4a6c-8841-4cbc1f6a4437.png)
   
   other nodes in this cluser not see the  configurations below:
   ![image](https://user-images.githubusercontent.com/58198659/180357220-ed3b1837-2e82-4dfa-98d3-dcf239a40869.png)
   
   
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] herbxu commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
herbxu commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1192196957

   this node can see the configurations SHOW INSTANCE LIST below:
   ![image](https://user-images.githubusercontent.com/58198659/180368973-05acf9f1-b8a6-46df-93b5-67c4ed9430d2.png)
   
   
   this node can not see the configurations SHOW INSTANCE LIST below:
   ![image](https://user-images.githubusercontent.com/58198659/180369152-9738c85a-ff19-4f0b-b73f-cfa3aea4c09c.png)
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1301516065

   > @windghoul I tried this approach, but the logical database connection failed after Helm started. Docker does not. The older version (5.1.2) of Helm won't either. Is everything okay with you? ![e1b51783b0611c4e053244e8ea0d9bf](https://user-images.githubusercontent.com/51192624/181741002-ddeef270-357f-48c6-8dac-35a8e2ae4293.png)
   
   Unknown system variable 'query_cache_size' means that the version of the MySQL server and the driver do not match, need to change one of them.
   
   Ref: https://stackoverflow.com/questions/49984267/java-sql-sqlexception-unknown-system-variable-query-cache-size


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] Bingai077 commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
Bingai077 commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1197771245

   @RaigorJiang Can you provide a repaired Helm Chart package?  


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1193643180

   Hi @clytzelbj 
   Thanks for your feedback! 
   So, building a package from master works fine, does 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] windghoul commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
windghoul commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1193756484

   > > Hi @clytzelbj The solution is to modify the image version in the charts after building the image using the master branch, or use the image version in our package. Update release to complete the upgrade. The link : https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-proxy
   > 
   > Yes, your solution works fine. However, since 5.1.2 is a released stable version, I still insist that this bug should be fixed on 5.1.2 to avoid further troubles.
   
   Hi, @clytzelbj 
   When we release, we will no longer consider hotfix to fix bugs in the release version, please pay attention to our daily build version or wait for the next version.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang closed issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations
URL: https://github.com/apache/shardingsphere/issues/19461


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] Bingai077 commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
Bingai077 commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1198809571

   @windghoul 
   I tried this approach, but the logical database connection failed after Helm started. Docker does not. The older version (5.1.2) of Helm won't either. Is everything okay with you?
   ![image](https://user-images.githubusercontent.com/51192624/181667393-69ad322a-042b-4a01-b506-201b59c9f993.png)
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] clytzelbj commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
clytzelbj commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1193615456

   > This is a weird issue that I haven't reproduced, hopefully a volunteer can look into this.
   
   We have already found out the reason for this issue.
   You can reproduce this issue if you start a proxy cluster from scratch and set the serverConfig.mode.overwrite to false.
   
   Details:
   In org.apache.shardingsphere.mode.manager.cluster.coordinator.registry.metadata.watcher.MetaDataChangedWatcher where shardingsphere proxy watches the configs from zookeeper and handle them, we found that the data in metadata/{databaseName}/version is only synchronized when updating. But on the first time we create a table, the event type is ADDED.
   ![image](https://user-images.githubusercontent.com/10139124/180707653-d29b1e02-90f8-4c79-853b-7aaf2eea6d1e.png)
   After I found the reason above, I realized this issue is already fixed in master branch. 
   ![image](https://user-images.githubusercontent.com/10139124/180707675-5c6d9c4a-7f82-4fef-b604-f240374db0cb.png)
   Since 5.1.2 is a release version, maybe it's necessary to fix this issue on the release branch.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] windghoul commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
windghoul commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1197888024

   > @RaigorJiang Can you provide a repaired Helm Chart package?
   
   hi @Bingai077 
   you can use ` helm pull ` to pull helm package, and modify the image tag value in values.yaml .Just can fix the problem


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] clytzelbj commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
clytzelbj commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1193724166

   > Hi @clytzelbj The solution is to modify the image version in the charts after building the image using the master branch, or use the image version in our package. Update release to complete the upgrade. The link : https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-proxy
   
   Yes, your solution works fine.
   However, since 5.1.2 is an released stable version, I still insist that this bug should be fixed on 5.1.2 to avoid further troubles.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] windghoul commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
windghoul commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1193676436

   The solution is to modify the image version in the charts after building the image using the master branch, or use the image version in our package. Update release to complete the upgrade


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] github-actions[bot] commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1272349271

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1192159005

   Hi @herbxu 
   Please execute `SHOW INSTANCE LIST` to see if they are in the same cluster.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] clytzelbj commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
clytzelbj commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1193719968

   > Hi @clytzelbj Thanks for your feedback! So, building a package from master works fine, does it?
   
   Yes!
   I tried to build a image from master branch by my own. It works fine!


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1193802511

   Yes, it will be released in the next version after the issue is fixed.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang commented on issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on issue #19461:
URL: https://github.com/apache/shardingsphere/issues/19461#issuecomment-1193576553

   This is a weird issue that I haven't reproduced, hopefully a volunteer can look into this.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] github-actions[bot] closed issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #19461: ShardingSphere proxy config center not work. Some nodes not have config center configurations info like datasource, rule configurations
URL: https://github.com/apache/shardingsphere/issues/19461


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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