Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcd3 grpc version mismatch #7077

Open
1 task done
switchover opened this issue Dec 26, 2024 · 1 comment
Open
1 task done

etcd3 grpc version mismatch #7077

switchover opened this issue Dec 26, 2024 · 1 comment
Labels
type: bug Category issues or prs related to bug.

Comments

@switchover
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

java.lang.NoClassDefFoundError: io/grpc/internal/BaseDnsNameResolverProvider
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370)
        at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
        at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
        at io.grpc.ServiceProviders.loadAll(ServiceProviders.java:67)
        at io.grpc.NameResolverRegistry.getDefaultRegistry(NameResolverRegistry.java:126)
        at io.grpc.internal.ManagedChannelImplBuilder.<init>(ManagedChannelImplBuilder.java:152)
        at io.grpc.internal.ManagedChannelImplBuilder.<init>(ManagedChannelImplBuilder.java:272)
        at io.grpc.netty.NettyChannelBuilder.<init>(NettyChannelBuilder.java:199)
        at io.grpc.netty.NettyChannelBuilder.forTarget(NettyChannelBuilder.java:169)
        at io.etcd.jetcd.ClientConnectionManager.defaultChannelBuilder(ClientConnectionManager.java:178)
        at io.etcd.jetcd.ClientConnectionManager.getChannel(ClientConnectionManager.java:98)
        at io.etcd.jetcd.ClientImpl.<init>(ClientImpl.java:54)
        at io.etcd.jetcd.ClientBuilder.build(ClientBuilder.java:387)
        at org.apache.seata.config.etcd3.EtcdConfiguration.getClient(EtcdConfiguration.java:241)
        at org.apache.seata.config.etcd3.EtcdConfiguration.initSeataConfig(EtcdConfiguration.java:286)
        at org.apache.seata.config.etcd3.EtcdConfiguration.<init>(EtcdConfiguration.java:97)
        at org.apache.seata.config.etcd3.EtcdConfiguration.getInstance(EtcdConfiguration.java:109)
        at org.apache.seata.config.etcd3.EtcdConfigurationProvider.provide(EtcdConfigurationProvider.java:28)
        at org.apache.seata.config.ConfigurationFactory.getNonSpringConfiguration(ConfigurationFactory.java:218)
        at org.apache.seata.config.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:161)
        at org.apache.seata.config.ConfigurationFactory.getInstance(ConfigurationFactory.java:121)
        at org.apache.seata.server.store.StoreConfig.<clinit>(StoreConfig.java:33)
        at org.apache.seata.server.spring.listener.SeataPropertiesLoader.initialize(SeataPropertiesLoader.java:77)
        at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:605)
        at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:374)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289)
        at org.apache.seata.server.ServerApplication.main(ServerApplication.java:30)
Caused by: java.lang.ClassNotFoundException: io.grpc.internal.BaseDnsNameResolverProvider
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 43 common frames omitted

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. Use etcd3 for config/registry settings

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

You are using jetcd 0.5.0 version, but this version uses grpc 1.27.1 version. This is very different from grpc 1.66.0 used by seata.
I think this version difference is causing the above error.

Ⅵ. Environment:

  • JDK version(e.g. java -version): 1.8
  • Seata client/server version: 2.2.0
  • Database version:
  • OS(e.g. uname -a):
  • Others:
@slievrly slievrly added the type: bug Category issues or prs related to bug. label Feb 6, 2025
@slievrly
Copy link
Member

slievrly commented Feb 6, 2025

@switchover Thank you very much for your feedback, we will confirm and fix this issue as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Category issues or prs related to bug.
Projects
None yet
Development

No branches or pull requests

2 participants