apache / shenyu

Apache ShenYu is a Java native API Gateway for service proxy, protocol conversion and API governance.
https://shenyu.apache.org/
Apache License 2.0
8.41k stars 2.92k forks source link

[BUG] <Start sofa example failed> #2116

Closed JooKS-me closed 2 years ago

JooKS-me commented 2 years ago

Is there an existing issue for this?

Current Behavior

When I start zookeeper, admin, bootstarp, everything is nomal. But I then started shenyu-example-sofa-service, and there was an exception regarding data synchronization.

And open admin in browser, image image

Expected Behavior

Start example once, and rules will be added.

Steps To Reproduce

  1. pull the code of master branch of apache shenyu.
  2. start zookeeper(3.7.0) in docker.
  3. start shenyu-admin.
  4. start shenyu-bootstrap.
  5. start shenyu-example-sofa-service.

Environment

ShenYu version(s): Newest in master branch
Zookeeper: both 3.7.0 or 3.4.6

Debug logs

  1. admin:
    ...
    2021-09-23 13:34:03 [main] INFO  org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 9095 (http) with context path ''
    2021-09-23 13:34:03 [main] INFO  org.apache.shenyu.admin.ShenyuAdminBootstrap - Started ShenyuAdminBootstrap in 7.884 seconds (JVM running for 8.59)
    2021-09-23 13:34:03 [RMI TCP Connection(2)-11.2.171.149] INFO  org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
    2021-09-23 13:34:03 [RMI TCP Connection(2)-11.2.171.149] INFO  org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
    2021-09-23 13:34:03 [RMI TCP Connection(2)-11.2.171.149] INFO  org.springframework.web.servlet.DispatcherServlet - Completed initialization in 30 ms
    2021-09-23 13:34:36 [http-nio-0.0.0.0-9095-exec-1] INFO  org.apache.shenyu.admin.listener.websocket.WebsocketCollector - websocket on client[127.0.0.1] open successful....
    2021-09-23 13:35:17 [http-nio-0.0.0.0-9095-exec-4] WARN  org.apache.shenyu.admin.listener.websocket.WebsocketCollector - websocket close on client[127.0.0.1]
    2021-09-23 13:35:26 [http-nio-0.0.0.0-9095-exec-11] INFO  org.apache.shenyu.admin.listener.websocket.WebsocketCollector - websocket on client[127.0.0.1] open successful....
  2. shenyu bootstrap application
    ...
    2021-09-23 13:34:33 [main] INFO  org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - Starting ShenyuBootstrapApplication on zhukunshuaideMacBook-Pro.local with PID 2050 (/Users/zhukunshuai/github/incubator-shenyu/shenyu-bootstrap/target/classes started by zhukunshuai in /Users/zhukunshuai/github/incubator-shenyu)
    2021-09-23 13:34:33 [main] INFO  org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - The following profiles are active: local
    2021-09-23 13:34:35 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
    2021-09-23 13:34:35 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
    2021-09-23 13:34:35 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 16ms. Found 0 Redis repository interfaces.
    2021-09-23 13:34:36 [main] INFO  org.springframework.boot.actuate.endpoint.web.EndpointLinksResolver - Exposing 2 endpoint(s) beneath base path '/actuator'
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[global] [org.apache.shenyu.plugin.global.GlobalPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sign] [org.apache.shenyu.plugin.sign.SignPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[jwt] [org.apache.shenyu.plugin.jwt.JwtPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[waf] [org.apache.shenyu.plugin.waf.WafPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[rate_limiter] [org.apache.shenyu.plugin.ratelimiter.RateLimiterPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[param_mapping] [org.apache.shenyu.plugin.param.mapping.ParamMappingPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[context_path] [org.apache.shenyu.plugin.context.path.ContextPathPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[rewrite] [org.apache.shenyu.plugin.rewrite.RewritePlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[redirect] [org.apache.shenyu.plugin.redirect.RedirectPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[hystrix] [org.apache.shenyu.plugin.hystrix.HystrixPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sentinel] [org.apache.shenyu.plugin.sentinel.SentinelPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[resilience4j] [org.apache.shenyu.plugin.resilience4j.Resilience4JPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[logging] [org.apache.shenyu.plugin.logging.LoggingPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[monitor] [org.apache.shenyu.plugin.monitor.MonitorPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[divide] [org.apache.shenyu.plugin.divide.DividePlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[webClient] [org.apache.shenyu.plugin.httpclient.WebClientPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[modifyResponse] [org.apache.shenyu.plugin.modify.response.ModifyResponsePlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[paramTransform] [org.apache.shenyu.plugin.base.RpcParamTransformPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[tars] [org.apache.shenyu.plugin.tars.TarsPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[grpc] [org.apache.shenyu.plugin.grpc.GrpcPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sofa] [org.apache.shenyu.plugin.sofa.SofaPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[dubbo] [org.apache.shenyu.plugin.alibaba.dubbo.AlibabaDubboPlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[response] [org.apache.shenyu.plugin.response.ResponsePlugin]
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.springboot.starter.sync.data.websocket.WebsocketSyncDataConfiguration - you use websocket sync shenyu data.......
    2021-09-23 13:34:36 [main] INFO  org.apache.shenyu.plugin.sync.data.websocket.WebsocketSyncDataService - websocket connection is successful.....
    2021-09-23 13:34:36 [WebSocketConnectReadThread-35] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - handleResult({"groupType":"PLUGIN","eventType":"MYSELF","data":[{"id":"1","name":"sign","role":"authentication","enabled":false},{"id":"2","name":"waf","config":"{\"model\":\"black\"}","role":"authentication","enabled":false},{"id":"3","name":"rewrite","role":"http process","enabled":false},{"id":"4","name":"rate_limiter","config":"{\"master\":\"mymaster\",\"mode\":\"standalone\",\"url\":\"192.168.1.1:6379\",\"password\":\"abc\"}","role":"fault tolerance","enabled":false},{"id":"5","name":"divide","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\"}","role":"proxy","enabled":true},{"id":"6","name":"dubbo","config":"{\"register\":\"zookeeper://localhost:2181\"}","role":"proxy","enabled":false},{"id":"7","name":"monitor","config":"{\"metricsName\":\"prometheus\",\"host\":\"localhost\",\"port\":\"9190\",\"async\":\"true\"}","role":"monitor","enabled":false},{"id":"8","name":"springCloud","role":"proxy","enabled":false},{"id":"9","name":"hystrix","role":"fault tolerance","enabled":false},{"id":"10","name":"sentinel","role":"fault tolerance","enabled":false},{"id":"11","name":"sofa","config":"{\"protocol\":\"zookeeper\",\"register\":\"127.0.0.1:2181\"}","role":"proxy","enabled":false},{"id":"12","name":"resilience4j","role":"fault tolerance","enabled":false},{"id":"13","name":"tars","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\"}","role":"proxy","enabled":false},{"id":"14","name":"context_path","role":"http process","enabled":true},{"id":"15","name":"grpc","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\"}","role":"proxy","enabled":false},{"id":"16","name":"redirect","role":"http process","enabled":false},{"id":"17","name":"motan","config":"{\"register\":\"127.0.0.1:2181\"}","role":"proxy","enabled":false},{"id":"18","name":"logging","role":"logging","enabled":false},{"id":"19","name":"jwt","config":"{\"secretKey\":\"key\",\"filterPath\":\"\"}","role":"authentication","enabled":false},{"id":"20","name":"request","role":"http process","enabled":false},{"id":"21","name":"oauth2","role":"authentication","enabled":false},{"id":"22","name":"param_mapping","config":"{\"ruleHandlePageType\":\"custom\"}","role":"http process","enabled":false},{"id":"23","name":"modifyResponse","config":"{\"ruleHandlePageType\":\"custom\"}","role":"http process","enabled":false},{"id":"24","name":"cryptor_request","role":"cryptor","enabled":true},{"id":"25","name":"cryptor_response","role":"cryptor","enabled":true},{"id":"26","name":"websocket","role":"proxy","enabled":true}]})
    2021-09-23 13:34:36 [WebSocketConnectReadThread-35] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - handleResult({"groupType":"SELECTOR","eventType":"MYSELF","data":[]})
    2021-09-23 13:34:36 [WebSocketConnectReadThread-35] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - handleResult({"groupType":"RULE","eventType":"MYSELF","data":[]})
    2021-09-23 13:34:37 [main] INFO  org.springframework.boot.web.embedded.netty.NettyWebServer - Netty started on port(s): 9195
    2021-09-23 13:34:37 [main] INFO  org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - Started ShenyuBootstrapApplication in 4.738 seconds (JVM running for 5.668)
    2021-09-23 13:35:16 [WebSocketConnectReadThread-35] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - handleResult({"groupType":"META_DATA","eventType":"CREATE","data":[{"id":"1440912631162359808","appName":"sofa","path":"/sofa/findByArrayIdsAndName","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"findByArrayIdsAndName","parameterTypes":"[Ljava.lang.Integer;,java.lang.String","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true}]})
    2021-09-23 13:35:17 [WebSocketConnectReadThread-35] ERROR org.java_websocket.drafts.Draft_6455 - Runtime exception during onWebsocketMessage
    com.alipay.sofa.rpc.core.exception.SofaRpcRuntimeException: RPC-010010015: 构造客户端代理出错! 
    at com.alipay.sofa.rpc.bootstrap.DefaultConsumerBootstrap.refer(DefaultConsumerBootstrap.java:179)
    at com.alipay.sofa.rpc.config.ConsumerConfig.refer(ConsumerConfig.java:926)
    at org.apache.shenyu.plugin.sofa.cache.ApplicationConfigCache.build(ApplicationConfigCache.java:155)
    at org.apache.shenyu.plugin.sofa.cache.ApplicationConfigCache.initRef(ApplicationConfigCache.java:126)
    at org.apache.shenyu.plugin.sofa.subscriber.SofaMetaDataSubscriber.onSubscribe(SofaMetaDataSubscriber.java:42)
    at org.apache.shenyu.plugin.sync.data.websocket.handler.MetaDataHandler.lambda$null$2(MetaDataHandler.java:50)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at org.apache.shenyu.plugin.sync.data.websocket.handler.MetaDataHandler.lambda$doUpdate$3(MetaDataHandler.java:50)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at org.apache.shenyu.plugin.sync.data.websocket.handler.MetaDataHandler.doUpdate(MetaDataHandler.java:50)
    at org.apache.shenyu.plugin.sync.data.websocket.handler.AbstractDataHandler.handle(AbstractDataHandler.java:72)
    at org.apache.shenyu.plugin.sync.data.websocket.handler.WebsocketDataHandler.executor(WebsocketDataHandler.java:59)
    at org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient.handleResult(ShenyuWebsocketClient.java:94)
    at org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient.onMessage(ShenyuWebsocketClient.java:74)
    at org.java_websocket.client.WebSocketClient.onWebsocketMessage(WebSocketClient.java:591)
    at org.java_websocket.drafts.Draft_6455.processFrameText(Draft_6455.java:885)
    at org.java_websocket.drafts.Draft_6455.processFrame(Draft_6455.java:819)
    at org.java_websocket.WebSocketImpl.decodeFrames(WebSocketImpl.java:379)
    at org.java_websocket.WebSocketImpl.decode(WebSocketImpl.java:216)
    at org.java_websocket.client.WebSocketClient.run(WebSocketClient.java:508)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.NullPointerException: null
    at com.alipay.sofa.rpc.client.router.MeshRouter.needToLoad(MeshRouter.java:70)
    at com.alipay.sofa.rpc.client.RouterChain.<init>(RouterChain.java:106)
    at com.alipay.sofa.rpc.client.RouterChain.buildConsumerChain(RouterChain.java:173)
    at com.alipay.sofa.rpc.client.AbstractCluster.init(AbstractCluster.java:132)
    at com.alipay.sofa.rpc.bootstrap.DefaultConsumerBootstrap.refer(DefaultConsumerBootstrap.java:154)
    ... 20 common frames omitted
    2021-09-23 13:35:26 [shenyu-websocket-connect-1] INFO  org.apache.shenyu.plugin.sync.data.websocket.WebsocketSyncDataService - websocket reconnect server[ws://localhost:9095/websocket] is successful.....
  3. shenyu-example-sofa-service
    ...
    2021-09-23 14:11:43.210  INFO 4934 --- [           main] org.apache.zookeeper.ZooKeeper           : Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@2f7dcef2
    2021-09-23 14:11:43.214  INFO 4934 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn          : Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
    2021-09-23 14:11:43.218  INFO 4934 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn          : Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session
    2021-09-23 14:11:43.222  INFO 4934 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn          : Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x17c1146fdff0001, negotiated timeout = 40000
    2021-09-23 14:11:43.226  INFO 4934 --- [ain-EventThread] o.a.c.f.state.ConnectionStateManager     : State change: CONNECTED
    2021-09-23 14:11:43.239  WARN 4934 --- [           main] org.apache.curator.utils.ZKPaths         : The version of ZooKeeper being used doesn't support Container nodes. CreateMode.PERSISTENT will be used instead.
    2021-09-23 14:11:43.271  INFO 4934 --- [           main] o.a.s.e.s.service.TestSofaApplication    : Started TestSofaApplication in 2.296 seconds (JVM running for 3.009)
    2021-09-23 14:11:44.809  INFO 4934 --- [      Thread-12] o.a.s.c.c.s.ShenyuClientShutdownHook     : hook SpringContextShutdownHook will sleep 3000ms when it start
    2021-09-23 14:11:44.809  INFO 4934 --- [      Thread-12] o.a.s.c.c.s.ShenyuClientShutdownHook     : hook Thread-0 will sleep 3000ms when it start
    2021-09-23 14:11:44.810  INFO 4934 --- [      Thread-12] o.a.s.c.c.s.ShenyuClientShutdownHook     : hook SOFA-RPC-ShutdownHook will sleep 3000ms when it start
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-35] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/saveComplexBeanAndName","pathDesc":"saveComplexBeanAndName","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"saveComplexBeanAndName","ruleName":"/sofa/saveComplexBeanAndName","parameterTypes":"org.apache.shenyu.examples.sofa.api.entity.SofaComplexTypeBean,java.lang.String","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-32] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/batchSave","pathDesc":"batchSave","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"batchSave","ruleName":"/sofa/batchSave","parameterTypes":"java.util.List","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-25] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/insert","pathDesc":"Insert a row of data","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaSingleParamService","methodName":"insert","ruleName":"/sofa/insert","parameterTypes":"org.apache.shenyu.examples.sofa.api.entity.SofaSimpleTypeBean","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-27] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/findById","pathDesc":"Find by Id","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaSingleParamService","methodName":"findById","ruleName":"/sofa/findById","parameterTypes":"java.lang.String","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-33] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/batchSaveNameAndId","pathDesc":"batchSaveNameAndId","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"batchSaveNameAndId","ruleName":"/sofa/batchSaveNameAndId","parameterTypes":"java.util.List,java.lang.String,java.lang.String","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-28] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/findByIdsAndName","pathDesc":"findByIdsAndName","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"findByIdsAndName","ruleName":"/sofa/findByIdsAndName","parameterTypes":"java.util.List,java.lang.String","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-30] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/findByStringArray","pathDesc":"findByStringArray","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"findByStringArray","ruleName":"/sofa/findByStringArray","parameterTypes":"[Ljava.lang.String;","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-29] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/findByArrayIdsAndName","pathDesc":"findByIdsAndName","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"findByArrayIdsAndName","ruleName":"/sofa/findByArrayIdsAndName","parameterTypes":"[Ljava.lang.Integer;,java.lang.String","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-34] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/saveComplexBean","pathDesc":"saveComplexBean","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"saveComplexBean","ruleName":"/sofa/saveComplexBean","parameterTypes":"org.apache.shenyu.examples.sofa.api.entity.SofaComplexTypeBean","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-36] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/saveTwoList","pathDesc":"saveTwoList","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"saveTwoList","ruleName":"/sofa/saveTwoList","parameterTypes":"java.util.List,java.util.Map","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-31] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/findByListId","pathDesc":"findByListId","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaMultiParamService","methodName":"findByListId","ruleName":"/sofa/findByListId","parameterTypes":"java.util.List","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 
    2021-09-23 14:11:45.079  INFO 4934 --- [or_consumer_-26] o.a.s.r.client.http.utils.RegisterUtils  : sofa client register success: {"appName":"sofa","contextPath":"/sofa","path":"/sofa/findAll","pathDesc":"Get all data","rpcType":"sofa","serviceName":"org.apache.shenyu.examples.sofa.api.service.SofaSingleParamService","methodName":"findAll","ruleName":"/sofa/findAll","parameterTypes":"","rpcExt":"{\"loadbalance\":\"hash\",\"retries\":3,\"timeout\":-1}","enabled":true,"host":"11.2.171.149","port":8888,"pluginNames":[],"registerMetaData":false} 

Anything else?

No response

yu199195 commented 2 years ago

can not config register in sofa plugin ?

JooKS-me commented 2 years ago

@yu199195 I discovered a fact, when I 1. Start admin 2. Start the gateway 3. Open the sofa plug-in in admin 4. Start sofa-example, this exception disappeared. But such rules are still empty. And then, re-start sofa-example, the rules will be added.

JooKS-me commented 2 years ago

There are 2 bugs: