scaling can't create sync job in latest master branch
Bug Report
Which version of ShardingSphere did you use?
master 5.0.0-RC1-SNAPSHOT commitId:613e4a8ab3e7b2ebd378503996f222f8c913f367
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
scaling&proxy
Expected behavior
create sync job and sync data
Actual behavior
can't create sync job and list job occur exception
[WARN ] 14:15:52.473 [nioEventLoopGroup-3-2] o.a.s.scaling.web.HttpServerHandler - Http request handle occur error:
java.lang.NoSuchMethodError: io.netty.buffer.ByteBuf.isContiguous()Z
at io.netty.handler.codec.ByteToMessageDecoder$1.cumulate(ByteToMessageDecoder.java:83)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:274)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:355)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:377)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:363)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
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)
Reason analyze (If you can)
scaling dependency io.netty.jar may conflict trigger NoSuchMethodError error?
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1.start proxy,scaling well,zk3.6.1 2.start a scaling job request,got an exception,then request list job same error
Example codes for reproduce this issue (such as a github link).
POST http://192.168.100.217:8888/scaling/job/start,request body:
{
"ruleConfiguration": {
"sourceDatasource": "ds_0: !!org.apache.shardingsphere.orchestration.core.common.yaml.config.YamlDataSourceConfiguration\n dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n props:\n jdbcUrl: jdbc:mysql://192.168.100.218:3306/appbiz_data_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true\n username: ybbuser\n password: 'ybbuser123!@#'\n connectionTimeout: 30000\n idleTimeout: 60000\n maxLifetime: 1800000\n maxPoolSize: 200\n minPoolSize: 10\n maintenanceIntervalMilliseconds: 30000\n readOnly: false\n",
"sourceRule": "tables:\n t_qrcode_consume_details:\n actualDataNodes: ds_0.t_qrcode_consume_details\n",
"destinationDataSources": {
"name": "dt_0",
"password": "sharding",
"url": "jdbc:mysql://192.168.100.217:3307/sharding_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false",
"username": "sharding"
}
},
"jobConfiguration": {
"concurrency": 10
}
}
http response:
{"success":false,"errorCode":500,"errorMsg":"java.lang.NoSuchMethodError: io.netty.buffer.ByteBuf.isContiguous()Z","model":null}
scaling server log error
let me check.
Hi, @dmbj what's your io.netty.jar version? 4.1.42.Final or others?
@Lucas-307 io.netty.jar version in scaling lib:netty-all-4.1.42.Final.jar pom.xml in master branch:
<groovy.version>2.4.19</groovy.version>
<snakeyaml.version>1.16</snakeyaml.version>
<netty.version>4.1.42.Final</netty.version>
<commons-codec.version>1.10</commons-codec.version>
<commons-cli.version>1.4</commons-cli.version>
<commons-collections4.version>4.2</commons-collections4.version>
@dmbj NoSuchMethodError usually cause by wrong jar version. Could you please check it, or debug it if you can.
@dmbj NoSuchMethodError usually cause by wrong jar version. Could you please check it, or debug it if you can.
because git clone too slow,I direct replace scaling lib netty-all-4.1.42.Final.jar->netty-all-4.1.45.Final.jar
it's work now,however i didn't get exact reason ,i suggest you could recheck maven dependency, hope it's helpful.
so proxy has same problem,need fix netty conflict jar problem
Sorry , i still can't reproduce this problem
Hi @dmbj you should fix netty issue and try a go. If there is anything wrong, plz open a new issue.