gcloud-pubsub-emulator icon indicating copy to clipboard operation
gcloud-pubsub-emulator copied to clipboard

Creating subscriptions with latest local build

Open parity-error opened this issue 4 years ago • 5 comments

When I use your image messagebird/gcloud-pubsub-emulator:latest everything works for me as described, including the ability to create topics, etc with the environment variables.

However when I build the image myself and run it with the environment set to create a topic and subscription (same values that worked with your image) it creates the topic then gets the following error when creating a subscription. clipped message from the log follows:

Exception in thread "grpc-default-executor-10" java.lang.NoClassDefFoundError: java/time/Duration [pubsub] at com.google.cloud.pubsub.testing.v1.MessageBacklog.(MessageBacklog.java:89) [pubsub] at com.google.cloud.pubsub.testing.v1.MessageBacklog.(MessageBacklog.java:78) [pubsub] at com.google.cloud.pubsub.testing.v1.FakePubsubServer$SubscriptionData.(FakePubsubServer.java:1353) [pubsub] at com.google.cloud.pubsub.testing.v1.FakePubsubServer.createSubscription(FakePubsubServer.java:455) [pubsub] at com.google.cloud.pubsub.testing.v1.PubsubGrpcServerAdapter$2.createSubscription(PubsubGrpcServerAdapter.java:177) [pubsub] at com.google.pubsub.v1.SubscriberGrpc$MethodHandlers.invoke(SubscriberGrpc.java:2323) [pubsub] at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171) [pubsub] at io.grpc.PartialForwardingServerCallListener.onHalfClose(PartialForwardingServerCallListener.java:35) [pubsub] at io.grpc.ForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:23) [pubsub] at io.grpc.ForwardingServerCallListener$SimpleForwardingServerCallListener.onHalfClose(ForwardingServerCallListener.java:40) [pubsub] at io.grpc.Contexts$ContextualizedServerCallListener.onHalfClose(Contexts.java:86) [pubsub] at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283) [pubsub] at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:761) [pubsub] at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) [pubsub] at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123) [pubsub] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) [pubsub] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) [pubsub] at java.lang.Thread.run(Thread.java:748)

Is it possible that some of the dependencies of this dockerfile have drifted?

parity-error avatar Mar 09 '20 17:03 parity-error

To reproduce you can use your own examples from the readme. (for creating topic, subscriptions, etc. )

parity-error avatar Mar 09 '20 18:03 parity-error

+1 I'm facing the same issue

KeirSweeney avatar Mar 25 '20 12:03 KeirSweeney

I've got a fix, I'll open up a PR shortly

KeirSweeney avatar Mar 25 '20 12:03 KeirSweeney

@parity-error https://github.com/marcelcorso/gcloud-pubsub-emulator/pull/10

You can find how I got it working in my PR here, really simple change, just updating the JDK version did the trick.

KeirSweeney avatar Mar 25 '20 12:03 KeirSweeney

Nice. Thank you!

parity-error avatar Mar 25 '20 17:03 parity-error