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

Use ectd as a register to report an error #4826

Closed xuziyang closed 1 year ago

xuziyang commented 1 year ago

Is there an existing issue for this?

Current Behavior

When using etcd as the register, an error is reported: java.lang.NoClassDefFoundError: io/grpc/TlsChannelCredentials$Feature

Expected Behavior

No response

Steps To Reproduce

  1. Modify the shenyu-examples-http configuration and change the register to etcd
  2. Start shenyu-examples-http Service

Environment

ShenYu version(s): master

Debug logs

/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dmanagement.endpoints.jmx.exposure.include=* -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home/lib/tools.jar:/Users/xuziyang/code/opensource/shenyu-examples/shenyu-examples-http/target/classes:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-spring-boot-starter-client-springmvc/2.5.1/shenyu-spring-boot-starter-client-springmvc-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-client-springmvc/2.5.1/shenyu-client-springmvc-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-client-core/2.5.1/shenyu-client-core-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-spi/2.5.1/shenyu-spi-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-disruptor/2.5.1/shenyu-disruptor-2.5.1.jar:/Users/xuziyang/.m2/repository/com/lmax/disruptor/3.4.0/disruptor-3.4.0.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-register-client-http/2.5.1/shenyu-register-client-http-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-common/2.5.1/shenyu-common-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/commons/commons-collections4/4.4/commons-collections4-4.4.jar:/Users/xuziyang/.m2/repository/com/github/ben-manes/caffeine/caffeine/2.9.3/caffeine-2.9.3.jar:/Users/xuziyang/.m2/repository/commons-codec/commons-codec/1.15/commons-codec-1.15.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-register-client-api/2.5.1/shenyu-register-client-api-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-register-common/2.5.1/shenyu-register-common-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-register-client-zookeeper/2.5.1/shenyu-register-client-zookeeper-2.5.1.jar:/Users/xuziyang/.m2/repository/org/apache/curator/curator-framework/4.3.0/curator-framework-4.3.0.jar:/Users/xuziyang/.m2/repository/org/apache/curator/curator-client/4.3.0/curator-client-4.3.0.jar:/Users/xuziyang/.m2/repository/org/apache/zookeeper/zookeeper/3.5.7/zookeeper-3.5.7.jar:/Users/xuziyang/.m2/repository/org/apache/zookeeper/zookeeper-jute/3.5.7/zookeeper-jute-3.5.7.jar:/Users/xuziyang/.m2/repository/org/apache/yetus/audience-annotations/0.5.0/audience-annotations-0.5.0.jar:/Users/xuziyang/.m2/repository/io/netty/netty-transport-native-epoll/4.1.94.Final/netty-transport-native-epoll-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/xuziyang/.m2/repository/org/apache/curator/curator-recipes/4.3.0/curator-recipes-4.3.0.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-register-client-etcd/2.5.1/shenyu-register-client-etcd-2.5.1.jar:/Users/xuziyang/.m2/repository/io/etcd/jetcd-core/0.7.3/jetcd-core-0.7.3.jar:/Users/xuziyang/.m2/repository/io/etcd/jetcd-grpc/0.7.3/jetcd-grpc-0.7.3.jar:/Users/xuziyang/.m2/repository/javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar:/Users/xuziyang/.m2/repository/io/vertx/vertx-grpc/4.3.2/vertx-grpc-4.3.2.jar:/Users/xuziyang/.m2/repository/io/vertx/vertx-core/4.3.2/vertx-core-4.3.2.jar:/Users/xuziyang/.m2/repository/io/grpc/grpc-netty/1.48.0/grpc-netty-1.48.0.jar:/Users/xuziyang/.m2/repository/io/grpc/grpc-grpclb/1.48.0/grpc-grpclb-1.48.0.jar:/Users/xuziyang/.m2/repository/com/google/protobuf/protobuf-java-util/3.21.1/protobuf-java-util-3.21.1.jar:/Users/xuziyang/.m2/repository/io/etcd/jetcd-api/0.7.3/jetcd-api-0.7.3.jar:/Users/xuziyang/.m2/repository/io/etcd/jetcd-common/0.7.3/jetcd-common-0.7.3.jar:/Users/xuziyang/.m2/repository/net/jodah/failsafe/2.4.4/failsafe-2.4.4.jar:/Users/xuziyang/.m2/repository/io/grpc/grpc-core/1.33.1/grpc-core-1.33.1.jar:/Users/xuziyang/.m2/repository/io/grpc/grpc-api/1.33.1/grpc-api-1.33.1.jar:/Users/xuziyang/.m2/repository/io/grpc/grpc-context/1.33.1/grpc-context-1.33.1.jar:/Users/xuziyang/.m2/repository/com/google/android/annotations/4.1.1.4/annotations-4.1.1.4.jar:/Users/xuziyang/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.18/animal-sniffer-annotations-1.18.jar:/Users/xuziyang/.m2/repository/io/perfmark/perfmark-api/0.19.0/perfmark-api-0.19.0.jar:/Users/xuziyang/.m2/repository/io/grpc/grpc-protobuf/1.33.1/grpc-protobuf-1.33.1.jar:/Users/xuziyang/.m2/repository/com/google/protobuf/protobuf-java/3.12.0/protobuf-java-3.12.0.jar:/Users/xuziyang/.m2/repository/com/google/api/grpc/proto-google-common-protos/1.17.0/proto-google-common-protos-1.17.0.jar:/Users/xuziyang/.m2/repository/io/grpc/grpc-protobuf-lite/1.33.1/grpc-protobuf-lite-1.33.1.jar:/Users/xuziyang/.m2/repository/io/grpc/grpc-stub/1.33.1/grpc-stub-1.33.1.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-register-client-consul/2.5.1/shenyu-register-client-consul-2.5.1.jar:/Users/xuziyang/.m2/repository/com/ecwid/consul/consul-api/1.4.5/consul-api-1.4.5.jar:/Users/xuziyang/.m2/repository/org/apache/httpcomponents/httpcore/4.4.16/httpcore-4.4.16.jar:/Users/xuziyang/.m2/repository/org/apache/httpcomponents/httpclient/4.5.14/httpclient-4.5.14.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-register-client-nacos/2.5.1/shenyu-register-client-nacos-2.5.1.jar:/Users/xuziyang/.m2/repository/com/alibaba/nacos/nacos-client/2.0.4/nacos-client-2.0.4.jar:/Users/xuziyang/.m2/repository/org/apache/httpcomponents/httpasyncclient/4.1.5/httpasyncclient-4.1.5.jar:/Users/xuziyang/.m2/repository/org/apache/httpcomponents/httpcore-nio/4.4.16/httpcore-nio-4.4.16.jar:/Users/xuziyang/.m2/repository/org/reflections/reflections/0.9.11/reflections-0.9.11.jar:/Users/xuziyang/.m2/repository/org/javassist/javassist/3.21.0-GA/javassist-3.21.0-GA.jar:/Users/xuziyang/.m2/repository/io/prometheus/simpleclient/0.15.0/simpleclient-0.15.0.jar:/Users/xuziyang/.m2/repository/io/prometheus/simpleclient_tracer_otel/0.15.0/simpleclient_tracer_otel-0.15.0.jar:/Users/xuziyang/.m2/repository/io/prometheus/simpleclient_tracer_common/0.15.0/simpleclient_tracer_common-0.15.0.jar:/Users/xuziyang/.m2/repository/io/prometheus/simpleclient_tracer_otel_agent/0.15.0/simpleclient_tracer_otel_agent-0.15.0.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-client-api-docs-annotations/2.5.1/shenyu-client-api-docs-annotations-2.5.1.jar:/Users/xuziyang/.m2/repository/com/squareup/okhttp3/okhttp/4.9.3/okhttp-4.9.3.jar:/Users/xuziyang/.m2/repository/com/squareup/okio/okio/2.8.0/okio-2.8.0.jar:/Users/xuziyang/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.jar:/Users/xuziyang/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21.jar:/Users/xuziyang/.m2/repository/org/jetbrains/annotations/13.0/annotations-13.0.jar:/Users/xuziyang/.m2/repository/com/google/code/gson/gson/2.9.1/gson-2.9.1.jar:/Users/xuziyang/.m2/repository/org/javatuples/javatuples/1.2/javatuples-1.2.jar:/Users/xuziyang/.m2/repository/org/apache/shenyu/shenyu-spring-boot-starter-client-common/2.5.1/shenyu-spring-boot-starter-client-common-2.5.1.jar:/Users/xuziyang/.m2/repository/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar:/Users/xuziyang/.m2/repository/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:/Users/xuziyang/.m2/repository/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/Users/xuziyang/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:/Users/xuziyang/.m2/repository/org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.jar:/Users/xuziyang/.m2/repository/com/google/errorprone/error_prone_annotations/2.11.0/error_prone_annotations-2.11.0.jar:/Users/xuziyang/.m2/repository/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar:/Users/xuziyang/.m2/repository/org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar:/Users/xuziyang/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.36/jcl-over-slf4j-1.7.36.jar:/Users/xuziyang/.m2/repository/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar:/Users/xuziyang/.m2/repository/javax/activation/javax.activation-api/1.2.0/javax.activation-api-1.2.0.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-starter/2.7.13/spring-boot-starter-2.7.13.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot/2.7.13/spring-boot-2.7.13.jar:/Users/xuziyang/.m2/repository/org/springframework/spring-context/5.3.28/spring-context-5.3.28.jar:/Users/xuziyang/.m2/repository/org/springframework/spring-aop/5.3.28/spring-aop-5.3.28.jar:/Users/xuziyang/.m2/repository/org/springframework/spring-expression/5.3.28/spring-expression-5.3.28.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.7.13/spring-boot-autoconfigure-2.7.13.jar:/Users/xuziyang/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/xuziyang/.m2/repository/org/springframework/spring-core/5.3.28/spring-core-5.3.28.jar:/Users/xuziyang/.m2/repository/org/springframework/spring-jcl/5.3.28/spring-jcl-5.3.28.jar:/Users/xuziyang/.m2/repository/org/yaml/snakeyaml/1.30/snakeyaml-1.30.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/2.7.13/spring-boot-starter-actuator-2.7.13.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-actuator-autoconfigure/2.7.13/spring-boot-actuator-autoconfigure-2.7.13.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-actuator/2.7.13/spring-boot-actuator-2.7.13.jar:/Users/xuziyang/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.13.5/jackson-databind-2.13.5.jar:/Users/xuziyang/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.13.5/jackson-annotations-2.13.5.jar:/Users/xuziyang/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.13.5/jackson-core-2.13.5.jar:/Users/xuziyang/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.13.5/jackson-datatype-jsr310-2.13.5.jar:/Users/xuziyang/.m2/repository/io/micrometer/micrometer-core/1.9.12/micrometer-core-1.9.12.jar:/Users/xuziyang/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.12/HdrHistogram-2.1.12.jar:/Users/xuziyang/.m2/repository/org/latencyutils/LatencyUtils/2.0.3/LatencyUtils-2.0.3.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-starter-webflux/2.7.13/spring-boot-starter-webflux-2.7.13.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.7.13/spring-boot-starter-json-2.7.13.jar:/Users/xuziyang/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.13.5/jackson-datatype-jdk8-2.13.5.jar:/Users/xuziyang/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.13.5/jackson-module-parameter-names-2.13.5.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-starter-reactor-netty/2.7.13/spring-boot-starter-reactor-netty-2.7.13.jar:/Users/xuziyang/.m2/repository/io/projectreactor/netty/reactor-netty-http/1.0.33/reactor-netty-http-1.0.33.jar:/Users/xuziyang/.m2/repository/io/netty/netty-codec-http/4.1.94.Final/netty-codec-http-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-common/4.1.94.Final/netty-common-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-buffer/4.1.94.Final/netty-buffer-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-transport/4.1.94.Final/netty-transport-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-codec/4.1.94.Final/netty-codec-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-handler/4.1.94.Final/netty-handler-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-codec-http2/4.1.94.Final/netty-codec-http2-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-resolver-dns/4.1.94.Final/netty-resolver-dns-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-resolver/4.1.94.Final/netty-resolver-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-codec-dns/4.1.94.Final/netty-codec-dns-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-resolver-dns-native-macos/4.1.94.Final/netty-resolver-dns-native-macos-4.1.94.Final-osx-x86_64.jar:/Users/xuziyang/.m2/repository/io/netty/netty-resolver-dns-classes-macos/4.1.94.Final/netty-resolver-dns-classes-macos-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-transport-native-epoll/4.1.94.Final/netty-transport-native-epoll-4.1.94.Final-linux-x86_64.jar:/Users/xuziyang/.m2/repository/io/netty/netty-transport-native-unix-common/4.1.94.Final/netty-transport-native-unix-common-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-transport-classes-epoll/4.1.94.Final/netty-transport-classes-epoll-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/projectreactor/netty/reactor-netty-core/1.0.33/reactor-netty-core-1.0.33.jar:/Users/xuziyang/.m2/repository/io/netty/netty-handler-proxy/4.1.94.Final/netty-handler-proxy-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/io/netty/netty-codec-socks/4.1.94.Final/netty-codec-socks-4.1.94.Final.jar:/Users/xuziyang/.m2/repository/org/springframework/spring-web/5.3.28/spring-web-5.3.28.jar:/Users/xuziyang/.m2/repository/org/springframework/spring-beans/5.3.28/spring-beans-5.3.28.jar:/Users/xuziyang/.m2/repository/org/springframework/spring-webflux/5.3.28/spring-webflux-5.3.28.jar:/Users/xuziyang/.m2/repository/io/projectreactor/reactor-core/3.4.30/reactor-core-3.4.30.jar:/Users/xuziyang/.m2/repository/org/reactivestreams/reactive-streams/1.0.4/reactive-streams-1.0.4.jar:/Users/xuziyang/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.7.13/spring-boot-starter-logging-2.7.13.jar:/Users/xuziyang/.m2/repository/ch/qos/logback/logback-classic/1.2.12/logback-classic-1.2.12.jar:/Users/xuziyang/.m2/repository/ch/qos/logback/logback-core/1.2.12/logback-core-1.2.12.jar:/Users/xuziyang/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.17.2/log4j-to-slf4j-2.17.2.jar:/Users/xuziyang/.m2/repository/org/apache/logging/log4j/log4j-api/2.17.2/log4j-api-2.17.2.jar:/Users/xuziyang/.m2/repository/org/slf4j/jul-to-slf4j/1.7.36/jul-to-slf4j-1.7.36.jar org.apache.shenyu.examples.http.ShenyuTestHttpApplication

. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v2.7.13)

2023-07-10 04:47:45.108 INFO 1965 --- [ main] o.a.s.e.http.ShenyuTestHttpApplication : Starting ShenyuTestHttpApplication using Java 1.8.0_281 on localhost with PID 1965 (/Users/xuziyang/code/opensource/shenyu-examples/shenyu-examples-http/target/classes started by xuziyang in /Users/xuziyang/code/opensource/shenyu-examples) 2023-07-10 04:47:45.112 INFO 1965 --- [ main] o.a.s.e.http.ShenyuTestHttpApplication : No active profile set, falling back to 1 default profile: "default" 2023-07-10 04:47:46.954 INFO 1965 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s) beneath base path '/actuator' 2023-07-10 04:47:47.738 WARN 1965 --- [ main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shenyuClientRegisterRepository' defined in class path resource [org/apache/shenyu/springboot/starter/client/common/config/ShenyuClientCommonBeanConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository]: Factory method 'shenyuClientRegisterRepository' threw exception; nested exception is java.lang.NoClassDefFoundError: io/grpc/TlsChannelCredentials$Feature 2023-07-10 04:47:47.767 INFO 1965 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2023-07-10 04:47:47.803 ERROR 1965 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shenyuClientRegisterRepository' defined in class path resource [org/apache/shenyu/springboot/starter/client/common/config/ShenyuClientCommonBeanConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository]: Factory method 'shenyuClientRegisterRepository' threw exception; nested exception is java.lang.NoClassDefFoundError: io/grpc/TlsChannelCredentials$Feature at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920) ~[spring-context-5.3.28.jar:5.3.28] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.28.jar:5.3.28] at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-2.7.13.jar:2.7.13] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) [spring-boot-2.7.13.jar:2.7.13] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) [spring-boot-2.7.13.jar:2.7.13] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-2.7.13.jar:2.7.13] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) [spring-boot-2.7.13.jar:2.7.13] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) [spring-boot-2.7.13.jar:2.7.13] at org.apache.shenyu.examples.http.ShenyuTestHttpApplication.main(ShenyuTestHttpApplication.java:35) [classes/:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shenyu.register.client.api.ShenyuClientRegisterRepository]: Factory method 'shenyuClientRegisterRepository' threw exception; nested exception is java.lang.NoClassDefFoundError: io/grpc/TlsChannelCredentials$Feature at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.28.jar:5.3.28] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.28.jar:5.3.28] ... 19 common frames omitted Caused by: java.lang.NoClassDefFoundError: io/grpc/TlsChannelCredentials$Feature at io.grpc.netty.ProtocolNegotiators.(ProtocolNegotiators.java:90) ~[grpc-netty-1.48.0.jar:1.48.0] at io.grpc.netty.NettyChannelBuilder.createProtocolNegotiatorByType(NettyChannelBuilder.java:568) ~[grpc-netty-1.48.0.jar:1.48.0] at io.grpc.netty.NettyChannelBuilder$DefaultProtocolNegotiator.newNegotiator(NettyChannelBuilder.java:642) ~[grpc-netty-1.48.0.jar:1.48.0] at io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:538) ~[grpc-netty-1.48.0.jar:1.48.0] at io.grpc.netty.NettyChannelBuilder$NettyChannelTransportFactoryBuilder.buildClientTransportFactory(NettyChannelBuilder.java:182) ~[grpc-netty-1.48.0.jar:1.48.0] at io.grpc.internal.ManagedChannelImplBuilder.build(ManagedChannelImplBuilder.java:592) ~[grpc-core-1.33.1.jar:1.33.1] at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:261) ~[grpc-core-1.33.1.jar:1.33.1] at io.vertx.grpc.VertxChannelBuilder.build(VertxChannelBuilder.java:302) ~[vertx-grpc-4.3.2.jar:4.3.2] at io.etcd.jetcd.impl.ClientConnectionManager.getChannel(ClientConnectionManager.java:89) ~[jetcd-core-0.7.3.jar:na] at io.etcd.jetcd.impl.ClientConnectionManager.newStub(ClientConnectionManager.java:121) ~[jetcd-core-0.7.3.jar:na] at io.etcd.jetcd.impl.LeaseImpl.(LeaseImpl.java:73) ~[jetcd-core-0.7.3.jar:na] at io.etcd.jetcd.impl.ClientImpl.lambda$new$4(ClientImpl.java:52) ~[jetcd-core-0.7.3.jar:na] at io.etcd.jetcd.support.MemorizingClientSupplier.get(MemorizingClientSupplier.java:37) ~[jetcd-core-0.7.3.jar:na] at io.etcd.jetcd.impl.ClientImpl.getLeaseClient(ClientImpl.java:80) ~[jetcd-core-0.7.3.jar:na] at org.apache.shenyu.register.client.etcd.EtcdClient.initLease(EtcdClient.java:61) ~[shenyu-register-client-etcd-2.5.1.jar:2.5.1] at org.apache.shenyu.register.client.etcd.EtcdClient.(EtcdClient.java:56) ~[shenyu-register-client-etcd-2.5.1.jar:2.5.1] at org.apache.shenyu.register.client.etcd.EtcdClientRegisterRepository.init(EtcdClientRegisterRepository.java:60) ~[shenyu-register-client-etcd-2.5.1.jar:2.5.1] at org.apache.shenyu.client.core.register.ShenyuClientRegisterRepositoryFactory.newInstance(ShenyuClientRegisterRepositoryFactory.java:44) ~[shenyu-client-core-2.5.1.jar:2.5.1] at org.apache.shenyu.springboot.starter.client.common.config.ShenyuClientCommonBeanConfiguration.shenyuClientRegisterRepository(ShenyuClientCommonBeanConfiguration.java:44) ~[shenyu-spring-boot-starter-client-common-2.5.1.jar:2.5.1] at org.apache.shenyu.springboot.starter.client.common.config.ShenyuClientCommonBeanConfiguration$$EnhancerBySpringCGLIB$$5368827a.CGLIB$shenyuClientRegisterRepository$0() ~[shenyu-spring-boot-starter-client-common-2.5.1.jar:2.5.1] at org.apache.shenyu.springboot.starter.client.common.config.ShenyuClientCommonBeanConfiguration$$EnhancerBySpringCGLIB$$5368827a$$FastClassBySpringCGLIB$$5eadaea3.invoke() ~[shenyu-spring-boot-starter-client-common-2.5.1.jar:2.5.1] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.28.jar:5.3.28] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.28.jar:5.3.28] at org.apache.shenyu.springboot.starter.client.common.config.ShenyuClientCommonBeanConfiguration$$EnhancerBySpringCGLIB$$5368827a.shenyuClientRegisterRepository() ~[shenyu-spring-boot-starter-client-common-2.5.1.jar:2.5.1] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_281] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_281] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_281] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_281] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.28.jar:5.3.28] ... 20 common frames omitted Caused by: java.lang.ClassNotFoundException: io.grpc.TlsChannelCredentials$Feature at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_281] at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_281] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) ~[na:1.8.0_281] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_281] ... 49 common frames omitted

Process finished with exit code 1

Anything else?

Preliminary judgment of the cause of the bug:

The version of shenyu grpc is 1.33.1 and conflicts with the version of grpc in etcd. You need to upgrade the version of grpc or lower the version of etcd.

moremind commented 1 year ago

shenyu admin?

xuziyang commented 1 year ago

shenyu admin?

shenyu client

moremind commented 1 year ago

2e6225e0d774ff9d5467970249525d2

moremind commented 1 year ago

maybe you can exclude grpc dependency

xuziyang commented 1 year ago

maybe you can exclude grpc dependency

Can't grpc and etcd be used at the same time?

The fundamental problem is that the version of GRPC used by shenyu conflicts with the version of grpc used by etcd. The solution is to upgrade the version of grpc or downgrade the version of etcd.

moremind commented 1 year ago

shenyu will fix it

xuziyang commented 1 year ago

shenyu will fix it

Let me fix it

moremind commented 1 year ago

shenyu will upgrade grpc version to fix it

moremind commented 1 year ago

it will fix in #4841