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

pubsub: deadline exceeds when behind VPN #11011

Open
boranby opened this issue Oct 18, 2024 · 3 comments
Open

pubsub: deadline exceeds when behind VPN #11011

boranby opened this issue Oct 18, 2024 · 3 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. status: investigating The issue is under investigation, which is determined to be non-trivial.

Comments

@boranby
Copy link

boranby commented Oct 18, 2024

Client

PubSub

Environment

Redhat Enterprise Linux (no container)

Code and Dependencies

package main

func main() {
  // ...
  client, err := pubsub.NewClient(ctx, projectID)
  // ...
  t := client.Topic(topicID)
  // ...
  msg, err := proto.Marshal(message)
  result := t.Publish(ctx, &pubsub.Message {
    Data: msg,
  })

  id, err := result.Get(ctx)
  if err != nil {
    return fmt.Errorf("pubsub: Get: %w", err)
  }
  log.Printf("Published a message; msg ID: %v\n", id)
}
go.mod
module modname

go 1.23.0

require (
  cloud.google.com/go/pubsub v1.44.0
  google.golang.org/protobuf v1.35.1
)

Expected behavior

It shouldn't matter for Pub/Sub client that the computer it runs has an open VPN connection. It should publish without any issues.

Actual behavior

If I enable VPN to access a private network from the machine, Pub/Sub publish returns context deadline exceeded error. When I close the VPN, it publishes and get the id of the publish. It can generate the client, get the Topic, list the topics. However, it stucks at the result.Get(ctx).

@boranby boranby added the triage me I really want to be triaged. label Oct 18, 2024
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Oct 18, 2024
@hongalex hongalex added status: investigating The issue is under investigation, which is determined to be non-trivial. and removed triage me I really want to be triaged. labels Oct 18, 2024
@hongalex
Copy link
Member

Thanks for filing this issue.

  1. Is this something that has always happened, or started happening v1.44.0?
  2. Just to clarify, are you actually calling c.Topics in your code when you say you "list the topics"? I couldn't find it in that snippet you listed above and I wonder if the first API call being made is actually Publish
  3. Can you test that this happens with any other gRPC-based library (e.g. with Firestore or any other Go library in this repo)

@boranby
Copy link
Author

boranby commented Oct 19, 2024

Hi @hongalex , thanks for your quick response.

  1. I started development with v1.44.0, I haven't tried the previous versions.
  2. You are right. It can't also list the topics. I commented out the list topics sections and remember it wrong, it also stuck.
  3. Tried using this example. https://github.com/GoogleCloudPlatform/golang-samples/blob/main/firestore/increment.go It also stuck at the line dc.Update

@hongalex
Copy link
Member

Hm, given that this issue occurs with other products like Firestore, this likely isn't an issue with our library specifically. I would recommend checking your VPN settings to narrow down the issue: is it an issue with gRPC specifically or do HTTP calls also timeout? Is it something to do with the VPN connection itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. status: investigating The issue is under investigation, which is determined to be non-trivial.
Projects
None yet
Development

No branches or pull requests

2 participants