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/04/12 14:14:42 UTC

[GitHub] [shardingsphere] wantao666 opened a new issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

wantao666 opened a new issue #10054:
URL: https://github.com/apache/shardingsphere/issues/10054


   i use docker to run sharing-proxy,it show that error.could you help me? waiting for your reply.
   
   `Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING`
   
   ![image](https://user-images.githubusercontent.com/29670394/114408139-b6167400-9bdb-11eb-8a51-0c8475c86ab0.png)
   
   ===========================below is the detail operation===========================
   start command
    ```shell
    docker run --name=sharding-proxy -itd -v /root/sharding-proxy/conf:/opt/sharding-proxy/conf -e PORT=3308 -p 13308:3308 apache/sharding-proxy
    ```
    `server.yaml`
   
   ```yml
   authentication:
     users:
        root:
          password: 123456
          #sharding:
                #password: sharding
          #authorizedSchemas: sharding_db
   props:
     max-connections-size-per-query: 1
     executor-size: 16  # Infinite by default.
   ```
   `config-read-write-splitting.yaml`
   ```yml
   
   schemaName: TEST_DB
   
   dataSources:
     writey_ds:
       url: jdbc:mysql://101.133.213.103:3000/test?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
       maintenanceIntervalMilliseconds: 30000
     read_ds_0:
       url: jdbc:mysql://101.133.213.103:3001/test?serverTimezone=UTC&useSSL=false
       username: root
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
       maintenanceIntervalMilliseconds: 30000
   rules:
   - !READ_WRITE_SPLITTING
     dataSources:
       pr_ds:
         name: pr_ds
         writeyDataSourceName: writey_ds
         readDataSourceNames:
           - read_ds_0
   ```


-- 
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



[GitHub] [shardingsphere] tristaZero commented on issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

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


   Hi which release do you use?


-- 
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



[GitHub] [shardingsphere] wantao666 commented on issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

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


   > Hi which release do you use?
   5.0.0-alpha
   
   ![image](https://user-images.githubusercontent.com/29670394/114498403-9a03e880-9c56-11eb-8a0f-c0c6bc6e0eb4.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.

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



[GitHub] [shardingsphere] tristaZero commented on issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

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


   Hi So you just tired the sample configuration file, right? Or you create a new file? Could you try another `sharding.yaml` configuraiton?


-- 
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



[GitHub] [shardingsphere] terrymanu closed issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #10054:
URL: https://github.com/apache/shardingsphere/issues/10054


   


-- 
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] taojintianxia commented on issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

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


   in my case , there are two way to cause ` Invalid tag` issue
   
   first condition , I use jmh as the tester to get the benchmark of shardingspehre in my IDE, and there is something wrong with the packaging plugin of jmh, the configuration of many SPI lost,  if `org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationYamlSwapper` is not existed in SPI config `org.apache.shardingsphere.infra.yaml.config.swapper.YamlRuleConfigurationSwapper`, this will cause the ` Invalid tag` issue
   
   second condition, I found that every time when I copy the content of a config file , say `config-sharding.yaml`, after I copy the content of that file and paste in IDE  idea, the IDE will help to format the config automatically . and the config style like following 
   
   ```yaml
   rules:
   - !READWRITE_SPLITTING
     dataSources:
       pr_ds:
         writeDataSourceName: write_ds
         readDataSourceNames: [read_ds]
   ```
   
   will change to 
   
   ```yaml
   rules:
     - !READWRITE_SPLITTING
       dataSources:
         pr_ds:
           writeDataSourceName: write_ds
           readDataSourceNames: [read_ds]
   ```
   
   as you can see, the position of `READWRITE_SPLITTING` tag changed. that will also cause invalid tag issue.


-- 
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] taojintianxia commented on issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

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


   @tristaZero I got the same error . let me reproduce this and make a simple demo for 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] starldh commented on issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

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


   i also faced this error.waiting for reply


-- 
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



[GitHub] [shardingsphere] tristaZero commented on issue #10054: Caused by: org.yaml.snakeyaml.error.YAMLException: Invalid tag: !READ_WRITE_SPLITTING

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


   @taojintianxia So any updates?


-- 
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