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

Compatibility shims issue with protobuf dependency #289

Open
jayhof opened this issue Dec 5, 2024 · 0 comments
Open

Compatibility shims issue with protobuf dependency #289

jayhof opened this issue Dec 5, 2024 · 0 comments

Comments

@jayhof
Copy link

jayhof commented Dec 5, 2024

Thank you for all the work in keeping this platform open-source ❤️

I'm trying to deploy opensnowcat-enrich on GCP with the pubsub connector and ran into an issue with the version of the protobuf dependency.

Here's the relevant part of the logged error:

ERROR com.snowplowanalytics.snowplow.enrich.common.fs2.Enrich - Unexpected error in enrich
com.permutive.pubsub.consumer.grpc.PubsubGoogleConsumer$InternalPubSubError: Internal Java PubSub consumer failed
Caused by: java.lang.IllegalStateException: Expected the service InnerService [FAILED] to be RUNNING, but the service has FAILED
        at com.google.common.util.concurrent.AbstractService.checkCurrentState(AbstractService.java:384)
        at com.google.common.util.concurrent.AbstractService.awaitRunning(AbstractService.java:308)
        at com.google.api.core.AbstractApiService.awaitRunning(AbstractApiService.java:95)
        at com.google.cloud.pubsub.v1.Subscriber.startConnections(Subscriber.java:379)
        at com.google.cloud.pubsub.v1.Subscriber.startStreamingConnections(Subscriber.java:341)
        at com.google.cloud.pubsub.v1.Subscriber.access$1400(Subscriber.java:91)
        at com.google.cloud.pubsub.v1.Subscriber$1.run(Subscriber.java:282)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/google/protobuf/GeneratedMessageV3$Builder
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
        at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        at com.google.pubsub.v1.StreamingPullRequest.toBuilder(StreamingPullRequest.java:866)
        at com.google.pubsub.v1.StreamingPullRequest.newBuilder(StreamingPullRequest.java:857)
        at com.google.cloud.pubsub.v1.StreamingSubscriberConnection.initialize(StreamingSubscriberConnection.java:237)
        at com.google.cloud.pubsub.v1.StreamingSubscriberConnection.doStart(StreamingSubscriberConnection.java:146)
        at com.google.api.core.AbstractApiService$InnerService.doStart(AbstractApiService.java:147)
        at com.google.common.util.concurrent.AbstractService.startAsync(AbstractService.java:252)
        at com.google.api.core.AbstractApiService.startAsync(AbstractApiService.java:119)
        at com.google.cloud.pubsub.v1.Subscriber.startConnections(Subscriber.java:376)
        ... 4 more
Caused by: java.lang.ClassNotFoundException: com.google.protobuf.GeneratedMessageV3$Builder
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        ... 21 more

This issue was introduced with protobuf 4.26.0 and has since been fixed: protocolbuffers/protobuf@df8a11e

I've forked the repo, updated protobuf to version 4.28.3, pushed to my own docker repo, deployed this updated image and was able to verify this fixed the issue.

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

Successfully merging a pull request may close this issue.

1 participant