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/02 07:18:22 UTC

[GitHub] [shardingsphere] SpriderMan opened a new issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

SpriderMan opened a new issue #9914:
URL: https://github.com/apache/shardingsphere/issues/9914


   ## Question
   
   **version**:
   apache-shardingsphere-4.1.0-sharding-scaling-bin
   
   
   **curl**:
   
   curl -X POST \
     http://localhost:8888/shardingscaling/job/start \
     -H 'content-type: application/json' \
     -d '{
      "ruleConfiguration": {
         "sourceDatasource": "ds_0: !!YamlDataSourceConfiguration\n  dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n  properties:\n    jdbcUrl: jdbc:mysql://127.0.0.1:3308/scaling?serverTimezone=UTC&useSSL=false\n    username: scaling\n    password: '\''scaling'\''\n    connectionTimeout: 30000\n    idleTimeout: 60000\n    maxLifetime: 1800000\n    maxPoolSize: 50\n    minPoolSize: 1\n    maintenanceIntervalMilliseconds: 30000\n    readOnly: false\n",
         "sourceRule": "tables:\n  t_order:\n    actualDataNodes: ds_0.t_order\n    keyGenerator:\n      column: order_id\n      type: SNOWFLAKE",
         "destinationDataSources": {
            "name": "dt_0",
            "password": "123456",
            "url": "jdbc:mysql://127.0.0.1:3307/sharding_db?serverTimezone=UTC&useSSL=false",
            "username": "root"
         }
      },
      "jobConfiguration": {
         "concurrency": 1
      }
   }'
   
   
   **error**:
   
   org.yaml.snakeyaml.constructor.ConstructorException: Can't construct a java object for tag:yaml.org,2002:YamlDataSourceConfiguration; exception=Class not found: YamlDataSourceConfiguration
    in 'string', line 1, column 7:
       ds_0: !!YamlDataSourceConfiguration
             ^
   
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:349)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:373)
   	at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:147)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:354)
   	at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:489)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:182)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:141)
   	at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:127)
   	at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:450)
   	at org.yaml.snakeyaml.Yaml.load(Yaml.java:369)
   	at org.apache.shardingsphere.underlying.common.yaml.engine.YamlEngine.unmarshal(YamlEngine.java:139)
   	at org.apache.shardingsphere.shardingscaling.core.config.utils.ConfigurationYamlConverter.loadDataSourceConfigurations(ConfigurationYamlConverter.java:47)
   	at org.apache.shardingsphere.shardingscaling.core.config.utils.SyncConfigurationUtil.toSyncConfigurations(SyncConfigurationUtil.java:50)
   	at org.apache.shardingsphere.shardingscaling.web.HttpServerHandler.startJob(HttpServerHandler.java:98)
   	at org.apache.shardingsphere.shardingscaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:76)
   	at org.apache.shardingsphere.shardingscaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:56)
   	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
   	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
   	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
   	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:328)
   	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:302)
   	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
   	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
   	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
   	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
   	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931)
   	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:700)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:635)
   	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:552)
   	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:514)
   	at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1044)
   	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: org.yaml.snakeyaml.error.YAMLException: Class not found: YamlDataSourceConfiguration
   	at org.yaml.snakeyaml.constructor.Constructor.getClassForNode(Constructor.java:660)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.getConstructor(Constructor.java:335)
   	at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:345)
   	... 44 common frames omitted


-- 
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] sandynz commented on issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

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


   Hi @SpriderMan , could you try with version 5.0? I tested with MySQL, it works. You could follow [Scaling Usage](https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-scaling/usage/ )


-- 
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] Lucas-307 commented on issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

Posted by GitBox <gi...@apache.org>.
Lucas-307 commented on issue #9914:
URL: https://github.com/apache/shardingsphere/issues/9914#issuecomment-815542660


   @SpriderMan curl parameter is wrong, please follow the doc.


-- 
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] sandynz commented on issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

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


   Hi @SpriderMan , could you try with version 5.0? I tested with MySQL, it works. You could follow [Scaling Usage](https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-scaling/usage/ )


-- 
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] ddsr-ops commented on issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

Posted by GitBox <gi...@apache.org>.
ddsr-ops commented on issue #9914:
URL: https://github.com/apache/shardingsphere/issues/9914#issuecomment-900944927


   I met the same problem, version 4.1.1


-- 
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] ddsr-ops commented on issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

Posted by GitBox <gi...@apache.org>.
ddsr-ops commented on issue #9914:
URL: https://github.com/apache/shardingsphere/issues/9914#issuecomment-900944927


   I met the same problem, version 4.1.1


-- 
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] dongzl commented on issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

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


   Hi @Lucas-307 , Please help with this issue, Thanks. 


-- 
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] sandynz closed issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

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


   


-- 
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] Ikki-Dai commented on issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

Posted by GitBox <gi...@apache.org>.
Ikki-Dai commented on issue #9914:
URL: https://github.com/apache/shardingsphere/issues/9914#issuecomment-893973203


   I met the same issue but not clear what's wrong, just copy the configuration from the doc


-- 
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] sandynz closed issue #9914: when I curl request, the scaling gets wrong, how i can deal with it ?

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


   


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