grpc java client netty-tcnative-boringssl-static issue.

674 views
Skip to first unread message

cr2...@gmail.com

unread,
Jul 10, 2018, 8:43:27 AM7/10/18
to grpc.io
Hi
I just upgraded to the very latest grpc versions and also tried to move to the latest netty-tcnative-boringssl-static. The latest netty-tcnative-boringssl-static is 2.0.12.Final.
However trying to use that gives me

io.grpc.StatusRuntimeException: UNKNOWN
    at io.grpc.Status.asRuntimeException(Status.java:526)
    at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:420)
    at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
    at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
    at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
    at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684)
    at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
    at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
    at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
    at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:403)
    at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459)
    at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:546)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:467)
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:584)
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.AbstractMethodError
    at io.netty.internal.tcnative.SSL.readFromSSL(Native Method)
    at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.readPlaintextData(ReferenceCountedOpenSslEngine.java:486)
    at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1025)
    at io.netty.handler.ssl.ReferenceCountedOpenSslEngine.unwrap(ReferenceCountedOpenSslEngine.java:1132)
    at io.netty.handler.ssl.SslHandler$SslEngineType$1.unwrap(SslHandler.java:211)
    at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1275)
    at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1177)
    at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1221)
    at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:582)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    ... 1 more


I have it working with 2.0.10.Final but the two subsequent updates 2.0.11.Final and 2.0.12.Final  fail as above. 

Here's the current dependencies:

com.google.api.grpc:proto-google-common-protos:jar:1.0.0:compile
com.google.code.findbugs:jsr305:jar:3.0.0:compile
com.google.code.gson:gson:jar:2.7:compile
com.google.errorprone:error_prone_annotations:jar:2.1.2:compile
com.google.guava:guava:jar:20.0:compile
com.google.protobuf:protobuf-java-util:jar:3.6.0:compile
com.google.protobuf:protobuf-java:jar:3.6.0:compile
commons-cli:commons-cli:jar:1.4:compile
commons-codec:commons-codec:jar:1.10:compile
commons-io:commons-io:jar:2.6:compile
commons-logging:commons-logging:jar:1.2:compile
io.grpc:grpc-context:jar:1.13.1:compile
io.grpc:grpc-core:jar:1.13.1:compile
io.grpc:grpc-netty:jar:1.13.1:compile
io.grpc:grpc-protobuf-lite:jar:1.13.1:compile
io.grpc:grpc-protobuf:jar:1.13.1:compile
io.grpc:grpc-stub:jar:1.13.1:compile
io.netty:netty-buffer:jar:4.1.25.Final:compile
io.netty:netty-codec-http2:jar:4.1.25.Final:compile
io.netty:netty-codec-http:jar:4.1.25.Final:compile
io.netty:netty-codec-socks:jar:4.1.25.Final:compile
io.netty:netty-codec:jar:4.1.25.Final:compile
io.netty:netty-common:jar:4.1.25.Final:compile
io.netty:netty-handler-proxy:jar:4.1.25.Final:compile
io.netty:netty-handler:jar:4.1.25.Final:compile
io.netty:netty-resolver:jar:4.1.25.Final:compile
io.netty:netty-tcnative-boringssl-static:jar:2.0.10.Final:compile
io.netty:netty-transport:jar:4.1.25.Final:compile
io.opencensus:opencensus-api:jar:0.12.3:compile
io.opencensus:opencensus-contrib-grpc-metrics:jar:0.12.3:compile
javax.json:javax.json-api:jar:1.1.2:compile
junit:junit:jar:4.12:test
log4j:log4j:jar:1.2.17:compile
org.apache.commons:commons-compress:jar:1.17:compile
org.apache.httpcomponents:httpclient:jar:4.5.6:compile
org.apache.httpcomponents:httpcore:jar:4.4.10:compile
org.apache.httpcomponents:httpmime:jar:4.5.6:test
org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
org.bouncycastle:bcprov-jdk15on:jar:1.60:compile
org.glassfish:javax.json:jar:1.1.2:compile
org.hamcrest:hamcrest-core:jar:1.3:test
org.yaml:snakeyaml:jar:1.21:compile

Any help appreciated
Thanks!

Carl Mastrangelo

unread,
Jul 10, 2018, 2:33:15 PM7/10/18
to grpc.io
It looks like netty-tcnative is not linking for some reason.   You should probably bring this up on https://github.com/netty/netty-tcnative (the maintainers there are very responsive!).

Eric Anderson

unread,
Jul 13, 2018, 4:43:59 PM7/13/18
to Carl Mastrangelo, grpc-io
netty-tcnative isn't API-stable, and so the Netty version you use with it is important. netty-tcnative 2.0.12.Final included changes for netty 4.1.26/4.1.27, so I'm not surprised it is broken. In this particular case, I believe our version of grpc's usage of netty is compatible with netty 4.1.26/4.1.27, so you could bump the version of netty as well to resolve the problem. But in general, we can't guarantee compatibility with newer netty releases.

I suggest looking at our table providing matching versions of the packages, or swapping to grpc-netty-shaded to avoid the problem.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/5b80302d-3cd9-42f5-919c-4dabac1ac826%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages