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

Maybe bug: jetcd-core:jar:0.5.7 NoSuchMethodError io.grpc.netty.NettyChannelBuilder.maxInboundMessageSize #119

Open
Victor-Lv opened this issue May 25, 2022 · 0 comments

Comments

@Victor-Lv
Copy link

I upgrade dubbo-remoting-etcd3 from 2.7.11 to 2.7.15, then application start fail with follow exception:

Caused by: java.lang.NoSuchMethodError: io.grpc.netty.NettyChannelBuilder.maxInboundMessageSize(I)Lio/grpc/netty/NettyChannelBuilder;
	at io.etcd.jetcd.ClientConnectionManager.defaultChannelBuilder(ClientConnectionManager.java:236) ~[jetcd-core-0.5.7.jar:?]
	at io.etcd.jetcd.ClientConnectionManager.defaultChannelBuilder(ClientConnectionManager.java:202) ~[jetcd-core-0.5.7.jar:?]
	at io.etcd.jetcd.ClientConnectionManager.getChannel(ClientConnectionManager.java:122) ~[jetcd-core-0.5.7.jar:?]
	at io.etcd.jetcd.ClientConnectionManager.newStub(ClientConnectionManager.java:171) ~[jetcd-core-0.5.7.jar:?]
	at io.etcd.jetcd.KVImpl.<init>(KVImpl.java:54) ~[jetcd-core-0.5.7.jar:?]
	at io.etcd.jetcd.ClientImpl.lambda$new$0(ClientImpl.java:38) ~[jetcd-core-0.5.7.jar:?]
	at io.etcd.jetcd.support.MemoizingClientSupplier.get(MemoizingClientSupplier.java:37) ~[jetcd-core-0.5.7.jar:?]
	at io.etcd.jetcd.ClientImpl.getKVClient(ClientImpl.java:55) ~[jetcd-core-0.5.7.jar:?]
	at org.apache.dubbo.remoting.etcd.jetcd.JEtcdClientWrapper.lambda$checkExists$7(JEtcdClientWrapper.java:270) ~[dubbo-remoting-etcd3-2.7.15.jar:2.7.15]
	at org.apache.dubbo.remoting.etcd.jetcd.RetryLoops.invokeWithRetry(RetryLoops.java:56) ~[dubbo-remoting-etcd3-2.7.15.jar:2.7.15]
	at org.apache.dubbo.remoting.etcd.jetcd.JEtcdClientWrapper.checkExists(JEtcdClientWrapper.java:267) ~[dubbo-remoting-etcd3-2.7.15.jar:2.7.15]
	at org.apache.dubbo.remoting.etcd.jetcd.JEtcdClient.checkExists(JEtcdClient.java:126) ~[dubbo-remoting-etcd3-2.7.15.jar:2.7.15]
	at org.apache.dubbo.remoting.etcd.support.AbstractEtcdClient.createParentIfAbsent(AbstractEtcdClient.java:157) ~[dubbo-remoting-etcd3-2.7.15.jar:2.7.15]
	at org.apache.dubbo.remoting.etcd.support.AbstractEtcdClient.createEphemeral(AbstractEtcdClient.java:89) ~[dubbo-remoting-etcd3-2.7.15.jar:2.7.15]
	at org.apache.dubbo.registry.etcd.EtcdRegistry.doRegister(EtcdRegistry.java:112) ~[dubbo-2.7.15.jar:2.7.15]

After checking the exception stack I compare the version different between dubbo-remoting-etcd3/2.7.11 and dubbo-remoting-etcd3/2.7.15:

org.apache.dubbo:dubbo-remoting-etcd3:jar:2.7.15:compile
+- io.etcd:jetcd-core:jar:0.5.7:compile
+- io.grpc:grpc-core:jar:1.31.1:compile
org.apache.dubbo:dubbo-remoting-etcd3:jar:2.7.11:compile
+- io.etcd:jetcd-core:jar:0.5.3:compile
+- io.grpc:grpc-core:jar:1.31.1:compile

My solution (all test pass):

  1. Specify separately the jetcd-core:jar into 0.5.3:
<dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-remoting-etcd3</artifactId>
            <version>2.7.15</version>
            <exclusions>
                <exclusion>
                    <artifactId>dubbo-common</artifactId>
                    <groupId>org.apache.dubbo</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>dubbo-remoting-api</artifactId>
                    <groupId>org.apache.dubbo</groupId>
                </exclusion>
                <exclusion>
                    <groupId>io.etcd</groupId>
                    <artifactId>jetcd-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>io.etcd</groupId>
            <artifactId>jetcd-core</artifactId>
            <version>0.5.3</version>
        </dependency>

  1. Use dubbo-remoting-etcd3 2.7.14 whose jetcd-core is still 0.5.3, instead of dubbo-remoting-etcd3 2.7.15.

Thanks for help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant