apache / shardingsphere

Empowering Data Intelligence with Distributed SQL for Sharding, Scalability, and Security Across All Databases.
Apache License 2.0
19.97k stars 6.75k forks source link

why scaling gets wrong java.lang.NullPointerException #9876

Closed SpriderMan closed 3 years ago

SpriderMan commented 3 years ago

request:

curl -X POST \ http://localhost:7777/scaling/job/start \ -H 'content-type: application/json' \ -d '{ "ruleConfig": { "source": { "type": "shardingSphereJdbc", "parameter": " dataSources: ds_0: dataSourceClassName: com.zaxxer.hikari.HikariDataSource jdbcUrl: jdbc:mysql://127.0.0.1:3308/scaling_0?useSSL=false username: root password: 123456 ds_1: dataSourceClassName: com.zaxxer.hikari.HikariDataSource jdbcUrl: jdbc:mysql://127.0.0.1:3308/scaling_1?useSSL=false username: root password: 123456 rules:

error: ERROR] 15:47:22.858 [nioEventLoopGroup-3-4] o.a.s.scaling.web.HttpServerHandler - Http request handle occur error: java.lang.NullPointerException: null at org.apache.shardingsphere.scaling.core.utils.SyncConfigurationUtil.getSourceConfiguration(SyncConfigurationUtil.java:83) at org.apache.shardingsphere.scaling.core.utils.SyncConfigurationUtil.toSyncConfigurations(SyncConfigurationUtil.java:67) at org.apache.shardingsphere.scaling.web.HttpServerHandler.startJob(HttpServerHandler.java:98) at org.apache.shardingsphere.scaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:73) at org.apache.shardingsphere.scaling.web.HttpServerHandler.channelRead0(HttpServerHandler.java:52) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) 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.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) 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.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:321) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:295) 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$4.run(SingleThreadEventExecutor.java:989) 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)

Lucas-307 commented 3 years ago

which version?

SpriderMan commented 3 years ago

which version?

apache-shardingsphere-5.0.0-alpha-shardingsphere-scaling-bin

Lucas-307 commented 3 years ago

@SpriderMan try this document https://shardingsphere.apache.org/document/legacy/4.x/document/cn/quick-start/sharding-scaling-quick-start/

SpriderMan commented 3 years ago

@SpriderMan try this document https://shardingsphere.apache.org/document/legacy/4.x/document/cn/quick-start/sharding-scaling-quick-start/

hi,handsome boy , when I clean install shardingsphere , why it doesn't make sharding-scaling-bin.tar.gz in shardingsphere-scaling-distribution, rat.txt :


Summary

Generated at: 2021-03-31T10:36:06+08:00

Notes: 2 Binaries: 0 Archives: 0 Standards: 9

Apache Licensed: 9 Generated Documents: 0

JavaDocs are generated, thus a license header is optional. Generated files do not require license headers.

0 Unknown Licenses


Files with Apache License headers will be marked AL Binary files (which do not require any license headers) will be marked B Compressed archives will be marked A Notices, licenses etc. will be marked N AL .asf.yaml AL lombok.config N LICENSE AL mvnw.cmd AL pom.xml N NOTICE AL .mvn/wrapper/MavenWrapperDownloader.java AL mvnw AL src/resources/checkstyle_ci.xml AL src/resources/ruleset.xml AL src/resources/checkstyle.xml


Lucas-307 commented 3 years ago

@SpriderMan you need install with -Prelease in shardingsphere-distribution or shardingsphere-distribution/shardingsphere-scaling-distribution module.

SpriderMan commented 3 years ago

@SpriderMan you need install with -Prelease in shardingsphere-distribution or shardingsphere-distribution/shardingsphere-scaling-distribution module.

hi,how i can deal with the errors?


Summary

Generated at: 2021-04-01T17:09:35+08:00

Notes: 2 Binaries: 0 Archives: 260 Standards: 1902

Apache Licensed: 350 Generated Documents: 0

JavaDocs are generated, thus a license header is optional. Generated files do not require license headers.

1550 Unknown Licenses


Files with unapproved licenses:

c:/Repository/commons-codec/commons-codec/1.6/commons-codec-1.6.pom.sha1 c:/Repository/commons-codec/commons-codec/1.6/commons-codec-1.6.jar.sha1 c:/Repository/commons-codec/commons-codec/1.6/_remote.repositories c:/Repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar.sha1 c:/Repository/commons-codec/commons-codec/1.3/commons-codec-1.3.pom.sha1 c:/Repository/commons-codec/commons-codec/1.3/_remote.repositories c:/Repository/commons-codec/commons-codec/1.3/commons-codec-1.3.pom c:/Repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar.sha1 c:/Repository/commons-codec/commons-codec/1.2/commons-codec-1.2.pom.sha1 c:/Repository/commons-codec/commons-codec/1.2/_remote.repositories c:/Repository/commons-codec/commons-codec/1.2/commons-codec-1.2.pom c:/Repository/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.pom c:/Repository/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.jar.sha1 c:/Repository/commons-validator/commons-validator/1.3.1/_remote.repositories c:/Repository/commons-validator/commons-validator/1.3.1/commons-validator-1.3.1.pom.sha1 c:/Repository/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.pom c:/Repository/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.pom.sha1 c:/Repository/commons-validator/commons-validator/1.2.0/commons-validator-1.2.0.jar.sha1 c:/Repository/commons-validator/commons-validator/1.2.0/_remote.repositories c:/Repository/dom4j/dom4j/1.1/dom4j-1.1.pom.sha1 c:/Repository/dom4j/dom4j/1.1/dom4j-1.1.pom

Lucas-307 commented 3 years ago

@SpriderMan I guess you changed checkstyle_ci.xml or something, please reset all code.

sandynz commented 3 years ago

Hi @SpriderMan , you could follow Scaling Usage to try 5.0-beta. I tested on MySQL before, it works.