Skip to content

Errors when shading io.netty for use with pubsub #2089

@autodidacticon

Description

@autodidacticon

I have pubsub 0.18.0 included in my project with netty dependencies shaded as follows:

       ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.grpc" % "grpc-netty" % grpcVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-transport" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-handler" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-codec-http2" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-codec-http" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-codec-socks" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-codec" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-common" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-buffer" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-resolver" % grpcNettyVersion),
        ShadeRule.rename("io.netty.**" -> "shade.io.netty.@1").inLibrary("io.netty" % "netty-handler-proxy" % grpcNettyVersion),

However when I start the Subscriber I get the following warning:

javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

Followed by the following error:

java.lang.IllegalStateException: Expected the service to be RUNNING, but the service has FAILED
	at shade.com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:310)
	at shade.com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:255)
	at shade.com.google.api.core.AbstractApiService.awaitRunning(AbstractApiService.java:97)
	at org.apache.spark.streaming.gcp.PubSubReceiver$$anon$1.run(PubSubReceiver.scala:37)
Caused by: java.lang.IllegalStateException: Expected the service to be RUNNING, but the service has FAILED
	at shade.com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:310)
	at shade.com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:255)
	at shade.com.google.api.core.AbstractApiService.awaitRunning(AbstractApiService.java:97)
	at shade.com.google.cloud.pubsub.spi.v1.Subscriber.startConnections(Subscriber.java:406)
	at shade.com.google.cloud.pubsub.spi.v1.Subscriber.startPollingConnections(Subscriber.java:375)
	at shade.com.google.cloud.pubsub.spi.v1.Subscriber.access$200(Subscriber.java:77)
	at shade.com.google.cloud.pubsub.spi.v1.Subscriber$4.run(Subscriber.java:256)
	at java.lang.Thread.run(Thread.java:745)
Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: Transport closed for unknown reason
	at io.grpc.Status.asRuntimeException(Status.java:540)
	at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:439)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:428)
	at io.grpc.internal.ClientCallImpl.access$100(ClientCallImpl.java:76)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:514)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$700(ClientCallImpl.java:431)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:546)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:52)
	at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:152)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	... 1 more

I am running the subscriber from GCP Dataproc.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions