Dubbo3.0.7中,使用Triple协议,服务提供者应用启动之后一直NullPointerException
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Environment
- Dubbo version: 3.0.7
- Operating System version: Windows
- Java version: 1.8
Steps to reproduce this issue
- 使用Triple协议
- 启动Provider
Pls. provide [GitHub address] to reproduce this issue.
Expected Behavior
不报错
Actual Behavior
2022-04-13/14:04:48.742 WARN: org.apache.dubbo.rpc.protocol.tri.transport.TripleHttp2FrameServerHandler.onResetRead(TripleHttp2FrameServerHandler.java:92) - [DUBBO] Triple Server received remote reset errorCode=0, dubbo version: 3.0.7, current host: 192.168.65.44 2022-04-13/14:04:48.743 ERROR: org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:101) - [DUBBO] Exception while executing runnable org.apache.dubbo.rpc.protocol.tri.stream.ServerStream$ServerTransportObserver$$Lambda$239/204825334@73a2c19c, dubbo version: 3.0.7, current host: 192.168.65.44 java.lang.NullPointerException at org.apache.dubbo.rpc.protocol.tri.stream.ServerStream$ServerTransportObserver.lambda$cancelByRemote$2(ServerStream.java:376) at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:99) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
能否提供一个复现 demo
public static void main(String[] args) throws InterruptedException {
ServiceConfig
能否提供一个复现 demo
public static void main(String[] args) throws InterruptedException { ServiceConfig service = new ServiceConfig<>(); service.setInterface(HelloService.class); service.setRef(new HelloServiceImpl()); // 使用 Triple 协议 service.setProtocol(new ProtocolConfig(CommonConstants.TRIPLE, 50051)); service.setApplication(new ApplicationConfig("demo-provider")); // 使用 ZK 作为注册中心 service.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181")); service.export(); System.out.println("dubbo service started"); new CountDownLatch(1).await(); }
就启动Provider之后,就开始报错,没有启动Consumer
没有启用 consumer 为什么会收到 rst,我这里不能复现,能否提供一个 github 地址 我这里复现看看
https://gitee.com/archguide/dubbo3.0-demo.git
https://gitee.com/archguide/dubbo3.0-demo.git
访问受限 403.....
https://gitee.com/archguide/dubbo3.0-demo.git
访问受限 403.....
不好意思,再试试
2022-04-13/15:18:05.664 INFO: org.apache.dubbo.registry.client.migration.MigrationRuleListener.init(MigrationRuleListener.java:97) - [DUBBO] Listening for migration rules on dataId demo-provider.migration, group DUBBO_SERVICEDISCOVERY_MIGRATION, dubbo version: 3.0.7, current host: 10.144.53.8
2022-04-13/15:18:05.681 INFO: org.apache.dubbo.config.ServiceConfig.exportRemote(ServiceConfig.java:613) - [DUBBO] Register dubbo service com.zhouyu.HelloService url tri://10.144.53.8:50052/com.zhouyu.HelloService?anyhost=true&application=demo-provider&background=false&bind.ip=10.144.53.8&bind.port=50052&deprecated=false&dubbo=2.0.2&dynamic=true&environment=product&generic=false&interface=com.zhouyu.HelloService&methods=sayHello,sayHelloAsync&owner=AlexStocks&pid=74223&release=3.0.7&service-name-mapping=true&side=provider&timeout=10000×tamp=1649834285223 to registry 127.0.0.1:2181, dubbo version: 3.0.7, current host: 10.144.53.8
2022-04-13/15:18:05.682 WARN: org.apache.curator.utils.ZKPaths$CreateModeHolder.<clinit>(ZKPaths.java:78) - The version of ZooKeeper being used doesn't support Container nodes. CreateMode.PERSISTENT will be used instead.
2022-04-13/15:18:05.696 INFO: org.apache.dubbo.registry.support.AbstractRegistry.loadProperties(AbstractRegistry.java:257) - [DUBBO] Loaded registry cache file /Users/earthchen/.dubbo/dubbo-registry-demo-provider-127.0.0.1-2181.cache, dubbo version: 3.0.7, current host: 10.144.53.8
2022-04-13/15:18:05.697 INFO: org.apache.dubbo.remoting.zookeeper.AbstractZookeeperTransporter.connect(AbstractZookeeperTransporter.java:59) - [DUBBO] find valid zookeeper client from the cache for address: zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?application=demo-provider&dubbo=2.0.2&environment=product&interface=org.apache.dubbo.registry.RegistryService&owner=AlexStocks&pid=74223&release=3.0.7, dubbo version: 3.0.7, current host: 10.144.53.8
2022-04-13/15:18:05.701 INFO: org.apache.dubbo.registry.support.AbstractRegistry.register(AbstractRegistry.java:326) - [DUBBO] Register: tri://10.144.53.8:50052/com.zhouyu.HelloService?anyhost=true&application=demo-provider&background=false&deprecated=false&dubbo=2.0.2&dynamic=true&environment=product&generic=false&interface=com.zhouyu.HelloService&methods=sayHello,sayHelloAsync&owner=AlexStocks&pid=74223&release=3.0.7&service-name-mapping=true&side=provider&timeout=10000×tamp=1649834285223, dubbo version: 3.0.7, current host: 10.144.53.8
2022-04-13/15:18:05.720 INFO: org.apache.dubbo.registry.support.AbstractRegistry.subscribe(AbstractRegistry.java:354) - [DUBBO] Subscribe: provider://10.144.53.8:50052/com.zhouyu.HelloService?anyhost=true&application=demo-provider&background=false&bind.ip=10.144.53.8&bind.port=50052&category=configurators&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&environment=product&generic=false&interface=com.zhouyu.HelloService&methods=sayHello,sayHelloAsync&owner=AlexStocks&pid=74223&release=3.0.7&service-name-mapping=true&side=provider&timeout=10000×tamp=1649834285223, dubbo version: 3.0.7, current host: 10.144.53.8
2022-04-13/15:18:05.735 INFO: org.apache.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:451) - [DUBBO] Notify urls for subscribe url provider://10.144.53.8:50052/com.zhouyu.HelloService?anyhost=true&application=demo-provider&background=false&bind.ip=10.144.53.8&bind.port=50052&category=configurators&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&environment=product&generic=false&interface=com.zhouyu.HelloService&methods=sayHello,sayHelloAsync&owner=AlexStocks&pid=74223&release=3.0.7&service-name-mapping=true&side=provider&timeout=10000×tamp=1649834285223, url size: 1, dubbo version: 3.0.7, current host: 10.144.53.8
2022-04-13/15:18:05.765 INFO: org.apache.dubbo.metadata.report.support.AbstractMetadataReport.storeProviderMetadataTask(AbstractMetadataReport.java:277) - [DUBBO] store provider metadata. Identifier : org.apache.dubbo.metadata.report.identifier.MetadataIdentifier@5882afc; definition: FullServiceDefinition{parameters=org.apache.dubbo.common.url.component.URLParam$URLParamMap@8c2735a6} ServiceDefinition [canonicalName=com.zhouyu.HelloService, codeSource=file:/Users/earthchen/tmp/dubbo3.0-demo/provider/target/classes/, methods=[MethodDefinition [name=sayHello, parameterTypes=[com.zhouyu.HelloRequest], returnType=com.zhouyu.User], MethodDefinition [name=sayHelloAsync, parameterTypes=[com.zhouyu.HelloRequest], returnType=java.util.concurrent.CompletableFuture]]], dubbo version: 3.0.7, current host: 10.144.53.8
2022-04-13/15:18:05.789 INFO: org.apache.dubbo.config.ServiceConfig.lambda$exported$1(ServiceConfig.java:259) - [DUBBO] Successfully registered interface application mapping for service com.zhouyu.HelloService, dubbo version: 3.0.7, current host: 10.144.53.8
dubbo service started
没有复现... 尝试检查下别的问题呢
看你的 error 是收到了rst,debug是不是有调用进来
看你的 error 是收到了rst,debug是不是有调用进来
看你的 error 是收到了rst,debug是不是有调用进来

会定时收到的这样的请求,不知道报错跟这个请求有没有关系
尝试换个端口试试,大概率是你电脑的某个插件在调用这个口

尝试换个端口试试,大概率是你电脑的某个插件在调用这个口
换了端口了没问题了,我继续找找看是什么插件在调用50051,感谢
https://bbs.360.cn/thread-15870090-1-1.html
看 path 似乎和文件浏览器相关,跟这方面找一下
https://bbs.360.cn/thread-15870090-1-1.html
企业微信的问题,卸载掉就可以了,https://share.weiyun.com/0ZTrbRlD
close