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.44k stars 2.93k forks source link

[Question] Local Deployment error: can not match selector data: divide #3639

Closed stulzq closed 2 years ago

stulzq commented 2 years ago

Question

Run directly using the source code.

When the client register, the BootstrapApplication has an error log:

2022-07-01 10:30:16 [parallel-1] ERROR org.apache.shenyu.plugin.api.utils.WebFluxResultUtils - can not match selector data: divide
2022-07-01 10:30:16 [parallel-2] ERROR org.apache.shenyu.plugin.api.utils.WebFluxResultUtils - can not match selector data: divide
2022-07-01 10:30:16 [parallel-3] ERROR org.apache.shenyu.plugin.api.utils.WebFluxResultUtils - can not match selector data: divide
2022-07-01 10:30:16 [parallel-4] ERROR org.apache.shenyu.plugin.api.utils.WebFluxResultUtils - can not match selector data: divide
2022-07-01 10:30:16 [parallel-5] ERROR org.apache.shenyu.plugin.api.utils.WebFluxResultUtils - can not match selector data: divide
2022-07-01 10:30:16 [parallel-6] ERROR org.apache.shenyu.plugin.api.utils.WebFluxResultUtils - can not match selector data: divide
2022-07-01 10:30:16 [parallel-7] ERROR org.apache.shenyu.plugin.api.utils.WebFluxResultUtils - can not match selector data: divide
2022-07-01 10:31:50 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - handleResult({"groupType":"PLUGIN","eventType":"UPDATE","data":[{"id":"5","name":"divide","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\"}","role":"Proxy","enabled":true,"sort":200}]})
2022-07-01 10:31:50 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[divide]

In admin, can not found register info.

image

image

How to resolve this, need help, thanks

stulzq commented 2 years ago

ShenYu Admin

startup log:

2022-07-01 10:28:26 [background-preinit] INFO  org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 6.2.3.Final
2022-07-01 10:28:26 [main] INFO  org.apache.shenyu.admin.ShenyuAdminBootstrap - Starting ShenyuAdminBootstrap using Java 1.8.0_291 on ZhiqiangdeMacBook-Pro.local with PID 1913 (/Users/lzq/OpenSource/shenyu/incubator-shenyu/shenyu-admin/target/classes started by lzq in /Users/lzq/OpenSource/shenyu/incubator-shenyu)
2022-07-01 10:28:26 [main] INFO  org.apache.shenyu.admin.ShenyuAdminBootstrap - The following 1 profile is active: "mysql"
2022-07-01 10:28:28 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data LDAP repositories in DEFAULT mode.
2022-07-01 10:28:28 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 47 ms. Found 0 LDAP repository interfaces.
2022-07-01 10:28:28 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroConfiguration' of type [org.apache.shenyu.admin.shiro.config.ShiroConfiguration$$EnhancerBySpringCGLIB$$4db59fe1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:28 [main] INFO  org.springframework.aop.framework.CglibAopProxy - Unable to proxy interface-implementing method [public final org.apache.shiro.authc.AuthenticationInfo org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken) throws org.apache.shiro.authc.AuthenticationException] because it is marked as final: Consider using interface-based JDK proxies instead!
2022-07-01 10:28:28 [main] INFO  org.springframework.aop.framework.CglibAopProxy - Unable to proxy interface-implementing method [public final void org.apache.shiro.realm.AuthenticatingRealm.init()] because it is marked as final: Consider using interface-based JDK proxies instead!
2022-07-01 10:28:29 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroSecurityManager' of type [org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:29 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroProperties' of type [org.apache.shenyu.admin.config.properties.ShiroProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:29 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'authorizationAttributeSourceAdvisor' of type [org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:29 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'swaggerConfiguration' of type [org.apache.shenyu.admin.config.SwaggerConfiguration$$EnhancerBySpringCGLIB$$5a0eada5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:29 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration' of type [org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration$$EnhancerBySpringCGLIB$$b35938d5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:29 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'eventBus' of type [org.apache.shiro.event.support.DefaultEventBus] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:29 [main] INFO  org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat initialized with port(s): 9095 (http)
2022-07-01 10:28:29 [main] INFO  org.apache.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-0.0.0.0-9095"]
2022-07-01 10:28:29 [main] INFO  org.apache.catalina.core.StandardService - Starting service [Tomcat]
2022-07-01 10:28:29 [main] INFO  org.apache.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.63]
2022-07-01 10:28:30 [main] INFO  org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
2022-07-01 10:28:30 [main] INFO  org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 3407 ms
2022-07-01 10:28:30 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2022-07-01 10:28:30 [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2022-07-01 10:28:31 [main] INFO  org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - Inconsistent constructor declaration on bean with name 'httpServiceDiscovery': single autowire-marked constructor flagged as optional - this constructor is effectively required since there is no default constructor to fall back to: public org.apache.shenyu.admin.listener.zookeeper.HttpServiceDiscovery(org.apache.shenyu.admin.service.SelectorService,org.apache.shenyu.admin.mapper.SelectorMapper,org.springframework.context.ApplicationEventPublisher,org.springframework.core.env.Environment)
2022-07-01 10:28:32 [main] INFO  org.springframework.boot.actuate.endpoint.web.EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
2022-07-01 10:28:32 [main] INFO  springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping - Mapped URL path [/v2/api-docs] onto method [springfox.documentation.swagger2.web.Swagger2Controller#getDocumentation(String, HttpServletRequest)]
2022-07-01 10:28:33 [main] INFO  org.springframework.boot.autoconfigure.web.servlet.WelcomePageHandlerMapping - Adding welcome page: class path resource [static/index.html]
2022-07-01 10:28:33 [main] INFO  org.apache.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-0.0.0.0-9095"]
2022-07-01 10:28:33 [main] INFO  org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port(s): 9095 (http) with context path ''
2022-07-01 10:28:33 [main] INFO  org.apache.shenyu.admin.service.manager.impl.LoadServiceDocEntryImpl - getAllClusterLastUpdateInstanceList, Not loaded into available backend services.
2022-07-01 10:28:33 [main] INFO  org.apache.shenyu.admin.service.manager.impl.LoadServiceDocEntryImpl - loadApiDocument No service registered.
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper - Context refreshed
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s)
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.scanners.ApiListingReferenceScanner - Scanning for api listing references
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: detailUsingGET_1
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: batchEnabledUsingPOST_1
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: detailUsingGET_2
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: syncDataUsingPOST_1
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: searchUsingPOST_1
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: searchAdaptorUsingPOST_1
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: detailRuleUsingGET_1
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: searchUsingPOST_2
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: searchAdaptorUsingPOST_2
2022-07-01 10:28:33 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: deleteSelectorUsingDELETE_1
2022-07-01 10:28:34 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: searchUsingPOST_3
2022-07-01 10:28:34 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: searchAdaptorUsingPOST_3
2022-07-01 10:28:34 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: batchEnabledUsingPOST_2
2022-07-01 10:28:34 [main] INFO  springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator - Generating unique operation named: detailUsingGET_3
2022-07-01 10:28:34 [main] INFO  org.apache.shenyu.admin.ShenyuAdminBootstrap - Started ShenyuAdminBootstrap in 8.473 seconds (JVM running for 10.134)
2022-07-01 10:28:34 [RMI TCP Connection(8)-127.0.0.1] INFO  org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-07-01 10:28:34 [RMI TCP Connection(8)-127.0.0.1] INFO  org.springframework.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
2022-07-01 10:28:34 [RMI TCP Connection(8)-127.0.0.1] INFO  org.springframework.web.servlet.DispatcherServlet - Completed initialization in 2 ms
2022-07-01 10:28:52 [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,maxTextMessageBufferSize:10240
2022-07-01 10:29:22 [http-nio-0.0.0.0-9095-exec-5] INFO  org.apache.tomcat.util.http.parser.Cookie - A cookie header was received [Hm_lvt_39d60200aa31dd455fa39a7249993ec0=1656427192,1656471306,1656501212,1656615151] that contained an invalid cookie. That cookie will be ignored.
 Note: further occurrences of this error will be logged at DEBUG level.
stulzq commented 2 years ago

ShenYu Bootstrap

startup log:

2022-07-01 10:28:48 [main] INFO  org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - Starting ShenyuBootstrapApplication using Java 1.8.0_291 on ZhiqiangdeMacBook-Pro.local with PID 1916 (/Users/lzq/OpenSource/shenyu/incubator-shenyu/shenyu-bootstrap/target/classes started by lzq in /Users/lzq/OpenSource/shenyu/incubator-shenyu)
2022-07-01 10:28:48 [main] INFO  org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - No active profile set, falling back to 1 default profile: "default"
2022-07-01 10:28:49 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode!
2022-07-01 10:28:49 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2022-07-01 10:28:50 [main] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 8 ms. Found 0 Redis repository interfaces.
2022-07-01 10:28:50 [main] INFO  org.springframework.cloud.context.scope.GenericScope - BeanFactory id=587f614b-c6bb-37b0-a46f-122479a9ef35
2022-07-01 10:28:50 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:50 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig' of type [org.springframework.cloud.client.loadbalancer.reactive.LoadBalancerBeanPostProcessorAutoConfiguration$ReactorDeferringLoadBalancerFilterConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:50 [main] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'reactorDeferringLoadBalancerExchangeFilterFunction' of type [org.springframework.cloud.client.loadbalancer.reactive.DeferringLoadBalancerExchangeFilterFunction] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-07-01 10:28:51 [main] INFO  org.springframework.boot.actuate.endpoint.web.EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[global] [org.apache.shenyu.plugin.global.GlobalPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[mock] [org.apache.shenyu.plugin.mock.MockPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[cache] [org.apache.shenyu.plugin.cache.CachePlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sign] [org.apache.shenyu.plugin.sign.SignPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[jwt] [org.apache.shenyu.plugin.jwt.JwtPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[oauth2] [org.apache.shenyu.plugin.oauth2.OAuth2Plugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[waf] [org.apache.shenyu.plugin.waf.WafPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[rateLimiter] [org.apache.shenyu.plugin.ratelimiter.RateLimiterPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[paramMapping] [org.apache.shenyu.plugin.param.mapping.ParamMappingPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[contextPath] [org.apache.shenyu.plugin.context.path.ContextPathPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[rewrite] [org.apache.shenyu.plugin.rewrite.RewritePlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[cryptorRequest] [org.apache.shenyu.plugin.cryptor.request.CryptorRequestPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[redirect] [org.apache.shenyu.plugin.redirect.RedirectPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[request] [org.apache.shenyu.plugin.request.RequestPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[generalContext] [org.apache.shenyu.plugin.general.context.GeneralContextPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[hystrix] [org.apache.shenyu.plugin.hystrix.HystrixPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sentinel] [org.apache.shenyu.plugin.sentinel.SentinelPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[resilience4j] [org.apache.shenyu.plugin.resilience4j.Resilience4JPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[loggingConsole] [org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[loggingRocketMQ] [org.apache.shenyu.plugin.logging.rocketmq.LoggingRocketMQPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[loggingKafka] [org.apache.shenyu.plugin.logging.kafka.LoggingKafkaPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[loggingElasticSearch] [org.apache.shenyu.plugin.logging.elasticsearch.LoggingElasticSearchPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[divide] [org.apache.shenyu.plugin.divide.DividePlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[websocket] [org.apache.shenyu.plugin.websocket.WebSocketPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[springCloud] [org.apache.shenyu.plugin.springcloud.SpringCloudPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[uri] [org.apache.shenyu.plugin.uri.URIPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[webClient] [org.apache.shenyu.plugin.httpclient.WebClientPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[modifyResponse] [org.apache.shenyu.plugin.modify.response.ModifyResponsePlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[paramTransform] [org.apache.shenyu.plugin.base.RpcParamTransformPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[grpc] [org.apache.shenyu.plugin.grpc.GrpcPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[tars] [org.apache.shenyu.plugin.tars.TarsPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[sofa] [org.apache.shenyu.plugin.sofa.SofaPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[dubbo] [org.apache.shenyu.plugin.apache.dubbo.ApacheDubboPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[motan] [org.apache.shenyu.plugin.motan.MotanPlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[cryptorResponse] [org.apache.shenyu.plugin.cryptor.response.CryptorResponsePlugin]
2022-07-01 10:28:51 [main] INFO  org.apache.shenyu.springboot.starter.gateway.ShenyuConfiguration - load plugin:[response] [org.apache.shenyu.plugin.response.ResponsePlugin]
2022-07-01 10:28:52 [main] INFO  org.apache.shenyu.springboot.starter.sync.data.websocket.WebsocketSyncDataConfiguration - you use websocket sync shenyu data.......
2022-07-01 10:28:52 [main] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - websocket connection server[ws://localhost:9095/websocket] is successful.....
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - handleResult({"groupType":"PLUGIN","eventType":"MYSELF","data":[{"id":"1","name":"sign","role":"Authentication","enabled":false,"sort":20},{"id":"10","name":"sentinel","role":"FaultTolerance","enabled":false,"sort":140},{"id":"11","name":"sofa","config":"{\"protocol\":\"zookeeper\",\"register\":\"127.0.0.1:2181\"}","role":"Proxy","enabled":false,"sort":310},{"id":"12","name":"resilience4j","role":"FaultTolerance","enabled":false,"sort":310},{"id":"13","name":"tars","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\"}","role":"Proxy","enabled":false,"sort":310},{"id":"14","name":"contextPath","role":"HttpProcess","enabled":true,"sort":80},{"id":"15","name":"grpc","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\",\"threadpool\":\"cached\"}","role":"Proxy","enabled":false,"sort":310},{"id":"16","name":"redirect","role":"HttpProcess","enabled":false,"sort":110},{"id":"17","name":"motan","config":"{\"register\":\"127.0.0.1:2181\",\"corethreads\":0,\"threads\":2147483647,\"queues\":0,\"threadpool\":\"cached\"}","role":"Proxy","enabled":false,"sort":310},{"id":"18","name":"loggingConsole","role":"Logging","enabled":false,"sort":160},{"id":"19","name":"jwt","config":"{\"secretKey\":\"key\"}","role":"Authentication","enabled":false,"sort":30},{"id":"2","name":"waf","config":"{\"model\":\"black\"}","role":"Authentication","enabled":false,"sort":50},{"id":"20","name":"request","role":"HttpProcess","enabled":false,"sort":120},{"id":"21","name":"oauth2","role":"Authentication","enabled":false,"sort":40},{"id":"22","name":"paramMapping","config":"{\"ruleHandlePageType\":\"custom\"}","role":"HttpProcess","enabled":false,"sort":70},{"id":"23","name":"modifyResponse","config":"{\"ruleHandlePageType\":\"custom\"}","role":"HttpProcess","enabled":false,"sort":220},{"id":"24","name":"cryptorRequest","role":"Cryptor","enabled":true,"sort":100},{"id":"25","name":"cryptorResponse","role":"Cryptor","enabled":true,"sort":410},{"id":"26","name":"websocket","config":"{\"multiSelectorHandle\":\"1\"}","role":"Proxy","enabled":true,"sort":200},{"id":"27","name":"generalContext","role":"Common","enabled":true,"sort":125},{"id":"28","name":"mqtt","config":"{\"port\": 9500,\"bossGroupThreadCount\": 1,\"maxPayloadSize\": 65536,\"workerGroupThreadCount\": 12,\"userName\": \"shenyu\",\"password\": \"shenyu\",\"isEncryptPassword\": false,\"encryptMode\": \"\",\"leakDetectorLevel\": \"DISABLED\"}","role":"Proxy","enabled":false,"sort":125},{"id":"29","name":"loggingRocketMQ","config":"{\"topic\":\"shenyu-access-logging\", \"namesrvAddr\": \"localhost:9876\",\"producerGroup\":\"shenyu-plugin-logging-rocketmq\"}","role":"Logging","enabled":false,"sort":170},{"id":"3","name":"rewrite","role":"HttpProcess","enabled":false,"sort":90},{"id":"30","name":"cache","config":"{\"cacheType\":\"memory\"}","role":"Cache","enabled":false,"sort":10},{"id":"31","name":"mock","role":"Mock","enabled":false,"sort":1},{"id":"32","name":"loggingElasticSearch","config":"{\"host\":\"localhost\", \"port\": \"9200\"}","role":"Logging","enabled":false,"sort":190},{"id":"4","name":"rateLimiter","config":"{\"master\":\"mymaster\",\"mode\":\"standalone\",\"url\":\"192.168.1.1:6379\",\"password\":\"abc\"}","role":"FaultTolerance","enabled":false,"sort":60},{"id":"5","name":"divide","config":"{\"multiSelectorHandle\":\"1\",\"multiRuleHandle\":\"0\"}","role":"Proxy","enabled":true,"sort":200},{"id":"6","name":"dubbo","config":"{\"register\":\"zookeeper://localhost:2181\",\"multiSelectorHandle\":\"1\",\"threadpool\":\"cached\",\"corethreads\":0,\"threads\":2147483647,\"queues\":0}","role":"Proxy","enabled":false,"sort":310},{"id":"8","name":"springCloud","role":"Proxy","enabled":false,"sort":200},{"id":"9","name":"hystrix","role":"FaultTolerance","enabled":false,"sort":130}]})
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[contextPath]
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[cryptorRequest]
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[cryptorResponse]
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[websocket]
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[generalContext]
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.plugin.logging.rocketmq.handler.LoggingRocketMQPluginDataHandler - handler loggingRocketMQ Plugin data:{"id":"29","name":"loggingRocketMQ","config":"{\"topic\":\"shenyu-access-logging\", \"namesrvAddr\": \"localhost:9876\",\"producerGroup\":\"shenyu-plugin-logging-rocketmq\"}","role":"Logging","enabled":false,"sort":170}
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.plugin.cache.handler.CachePluginDataHandler - the plugin cache is disabled
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.plugin.logging.elasticsearch.handler.LoggingElasticSearchPluginDataHandler - handler loggingElasticSearch Plugin data:{"id":"32","name":"loggingElasticSearch","config":"{\"host\":\"localhost\", \"port\": \"9200\"}","role":"Logging","enabled":false,"sort":190}
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.web.handler.ShenyuWebHandler - shenyu use plugin:[divide]
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - handleResult({"groupType":"SELECTOR","eventType":"MYSELF","data":[]})
2022-07-01 10:28:52 [WebSocketConnectReadThread-48] INFO  org.apache.shenyu.plugin.sync.data.websocket.client.ShenyuWebsocketClient - handleResult({"groupType":"RULE","eventType":"MYSELF","data":[]})
2022-07-01 10:28:53 [main] INFO  org.springframework.cloud.netflix.eureka.config.DiscoveryClientOptionalArgsConfiguration - Eureka HTTP Client uses RestTemplate.
2022-07-01 10:28:53 [main] WARN  org.springframework.cloud.loadbalancer.config.LoadBalancerCacheAutoConfiguration$LoadBalancerCaffeineWarnLogger - Spring Cloud LoadBalancer is currently working with the default cache. While this cache implementation is useful for development and tests, it's recommended to use Caffeine cache in production.You can switch to using Caffeine cache, by adding it and org.springframework.cache.caffeine.CaffeineCacheManager to the classpath.
2022-07-01 10:28:53 [main] INFO  org.springframework.boot.web.embedded.netty.NettyWebServer - Netty started on port 9195
2022-07-01 10:28:53 [main] INFO  org.apache.shenyu.bootstrap.ShenyuBootstrapApplication - Started ShenyuBootstrapApplication in 6.701 seconds (JVM running for 8.381)
stulzq commented 2 years ago

.NET Client Register

info: Apache.ShenYu.Client.Registers.ShenyuHttpRegister[0]
      request access token successfully!
info: Apache.ShenYu.Client.Registers.ShenyuHttpRegister[0]
      succeeded to register type: metadata, content: {"appName":"dotnet-example","contextPath":"/dotnet","path":"/dotnet/template/hello","pathDesc":null,"rpcType":"http","serviceName":null,"methodName":null,"ruleName":"/dotnet/template/hello","parameterTypes":null,"rpcExt":null,"enabled":true,"host":null,"port":0,"pluginNames":null,"registerMetaData":false,"timeMillis":0}
info: Apache.ShenYu.Client.Registers.ShenyuHttpRegister[0]
      succeeded to register type: metadata, content: {"appName":"dotnet-example","contextPath":"/dotnet","path":"/dotnet/template","pathDesc":null,"rpcType":"http","serviceName":null,"methodName":null,"ruleName":"/dotnet/template","parameterTypes":null,"rpcExt":null,"enabled":true,"host":null,"port":0,"pluginNames":null,"registerMetaData":false,"timeMillis":0}
info: Apache.ShenYu.Client.Registers.ShenyuHttpRegister[0]
      succeeded to register type: metadata, content: {"appName":"dotnet-example","contextPath":"/dotnet","path":"/dotnet/test/**","pathDesc":null,"rpcType":"http","serviceName":null,"methodName":null,"ruleName":"/dotnet/test/**","parameterTypes":null,"rpcExt":null,"enabled":true,"host":null,"port":0,"pluginNames":null,"registerMetaData":false,"timeMillis":0}
info: Apache.ShenYu.Client.Registers.ShenyuHttpRegister[0]
      succeeded to register type: metadata, content: {"appName":"dotnet-example","contextPath":"/dotnet","path":"/dotnet/weather/hello","pathDesc":null,"rpcType":"http","serviceName":null,"methodName":null,"ruleName":"/dotnet/weather/hello","parameterTypes":null,"rpcExt":null,"enabled":true,"host":null,"port":0,"pluginNames":null,"registerMetaData":false,"timeMillis":0}
info: Apache.ShenYu.Client.Registers.ShenyuHttpRegister[0]
      succeeded to register type: metadata, content: {"appName":"dotnet-example","contextPath":"/dotnet","path":"/dotnet/weather","pathDesc":null,"rpcType":"http","serviceName":null,"methodName":null,"ruleName":"/dotnet/weather","parameterTypes":null,"rpcExt":null,"enabled":true,"host":null,"port":0,"pluginNames":null,"registerMetaData":false,"timeMillis":0}
info: Apache.ShenYu.Client.Registers.ShenyuHttpRegister[0]
      succeeded to register type: uri, content: {"protocol":"http://","appName":"dotnet-example","contextPath":"/dotnet","rpcType":"http","host":"10.22.32.93","port":5000}
yu199195 commented 2 years ago

you can add selector and rule in divide plugin

stulzq commented 2 years ago

you can add selector and rule in divide plugin

I used the client to register, but the registration failed

yu199195 commented 2 years ago

its used net client?

stulzq commented 2 years ago

its used net client?

its used net client?

.NET and Go client

stulzq commented 2 years ago

Go client log

2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/clients/admin_client/shenyu_admin_client.go:51] Get ShenYu Admin response, body is -> {200 login dashboard user success {1 admin 1 true 2022-05-25 18:02:52 2022-05-25 18:02:52 eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNjU2NzMzMDg3fQ.brpziZowe5MCMGhXwzlhMI2oNscF2m0i4jlON6Xl1f4}}
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:40] this is ShenYu Admin client token -> eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNjU2NzMzMDg3fQ.brpziZowe5MCMGhXwzlhMI2oNscF2m0i4jlON6Xl1f4
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:55] finish register metadata ,the result is-> true
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:70] finish UrlRegister ,the result is-> true
stulzq commented 2 years ago

.NET and Go client, it all looks ok.

.NET client cause the BootstrapApplication error: can not match selector data: divide

Go client cause the Admin error:

2022-07-01 11:41:27 [shenyu-shared_wheel_timer-3] WARN  org.apache.shenyu.common.timer.AbstractRetryTask - Failed to execute task:contextPath:divide,retried:40 ,total retries:-1,cause:doRegister Failed to execute,wait to retry.

In admin, can not found any register info

yu199195 commented 2 years ago

maybe you can used donet and go example?

stulzq commented 2 years ago

maybe you can used donet and go example?

我用中文吧,我是拉的master分支的代码,根据官网文档来运行的,使用的client都是.net 和 go 提供的 example ,但是一直无法成功注册,admin也看不到注册信息,我也尝试了二进制文件部署,都是一样的错误。配置文件我只改了 mysql密码,不知道是哪里有问题,我自己也尝试了很久

hgaol commented 2 years ago

The dotnet client has not published yet. Do you just run the AspNetCore example under dotnet client repo? Pls pay attention, the register method should match the method with admin. E.g. admin uses http and example should use http.

stulzq commented 2 years ago

The dotnet client has not published yet. Do you just run the AspNetCore example under dotnet client repo? Pls pay attention, the register method should match the method with admin. E.g. admin uses http and example should use http.

Yes, I use dotnet client repo AspNetCore example, the register method is match

stulzq commented 2 years ago

解决了,我的锅,我写成了 9195

stulzq commented 2 years ago

image

hgaol commented 2 years ago

image

I'll change the default registration method to http so anyone can start it without any change. 😄 If it has been fixed, can you help to close this issue?

stulzq commented 2 years ago

Thanks

lishuo5263 commented 2 years ago

Go client log

2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/clients/admin_client/shenyu_admin_client.go:51] Get ShenYu Admin response, body is -> {200 login dashboard user success {1 admin 1 true 2022-05-25 18:02:52 2022-05-25 18:02:52 eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNjU2NzMzMDg3fQ.brpziZowe5MCMGhXwzlhMI2oNscF2m0i4jlON6Xl1f4}}
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:40] this is ShenYu Admin client token -> eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNjU2NzMzMDg3fQ.brpziZowe5MCMGhXwzlhMI2oNscF2m0i4jlON6Xl1f4
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:55] finish register metadata ,the result is-> true
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:70] finish UrlRegister ,the result is-> true

After you check shenyu port ,go client has problem?

stulzq commented 2 years ago

Go client log

2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/clients/admin_client/shenyu_admin_client.go:51] Get ShenYu Admin response, body is -> {200 login dashboard user success {1 admin 1 true 2022-05-25 18:02:52 2022-05-25 18:02:52 eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNjU2NzMzMDg3fQ.brpziZowe5MCMGhXwzlhMI2oNscF2m0i4jlON6Xl1f4}}
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:40] this is ShenYu Admin client token -> eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNjU2NzMzMDg3fQ.brpziZowe5MCMGhXwzlhMI2oNscF2m0i4jlON6Xl1f4
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:55] finish register metadata ,the result is-> true
2022-07-01 11:38:07 [INFO] [/Users/lzq/OpenSource/shenyu/incubator-shenyu-client-golang/example/http_client/main.go:70] finish UrlRegister ,the result is-> true

After you check shenyu port ,go client has problem?

Yes, https://github.com/apache/incubator-shenyu-client-golang/issues/20