GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DEADLINE_EXCEEDED when using Cloud Pub/Sub library from Compute Engine · Issue #1430 · googleapis/google-cloud-java

DEADLINE_EXCEEDED when using Cloud Pub/Sub library from Compute Engine #1430

New issue
Copy link
New issue
Copy link
Closed
Closed
DEADLINE_EXCEEDED when using Cloud Pub/Sub library from Compute Engine#1430
Copy link
Assignees
garrettjonesgoogle
Labels
api: coreapi: loggingIssues related to the Cloud Logging API.api: pubsubIssues related to the Pub/Sub API.

Description

@codemoped
codemoped
opened on Nov 28, 2016
Issue body actions

When using the Cloud Pub/Sub library in a Java application that has been deployed in a Google Compute Engine instance, a DEADLINE_EXCEEDED exception occurs. The application resides in a Docker container within a Container Engine-managed Compute Engine instance. The Pub/Sub topic and the Compute Engine instance are in the same project.

The Compute Engine service account has project editor permissions.

No problems with the old google-api-services-pubsub library.

The code to create the instance looks like this:

InputStream credentialsStream = IOUtils.toInputStream(SERVICE_ACCOUNT_JSON, StandardCharsets.UTF_8);
Credentials credentials = ServiceAccountCredentials.fromStream(credentialsStream);
PubSubOptions options = PubSubOptions.newBuilder().setCredentials(credentials).build();
PubSub pubsub = options.getService();

Then doing something like this (or alternatively, create a topic):

for (Subscription subscription : pubsub.listSubscriptions().getValues()) {
...
}

results in the following:

com.google.cloud.pubsub.PubSubException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED

Versions:

google-cloud-pubsub - v0.6.0
google-auth-library-oauth2-http - v0.6.0
google-auth-library-credentials - v0.6.0
google-* - v1.22.0

I also found this issue at Stackoverflow

Activity

Next
  1. colintemple commented on Nov 28, 2016

    @colintemple
    colintemple
    on Nov 28, 2016
    More actions

    +1. I was the one who asked the question on Stack Overflow.

    In my case, the following simple code caused DEADLINE_EXCEEDED errors when run on a Compute Engine instance within the same project as the Pub/Sub topic I wanted to publish to:

    PubSub pubSub = PubSubOptions.getDefaultInstance().toBuilder()
            .build().getService();
    
    String messageId = pubSub.publish(topic, message);
    

    I could communicate with Pub/Sub using google-api-services-pubsub library, or via gcloud from the command line on the instance.

  2. garrettjonesgoogle commented on Nov 29, 2016

    @garrettjonesgoogle
    garrettjonesgoogle
    on Nov 29, 2016
    Contributor
    More actions

    I intend on investigating but it will take a couple days due to other commitments.

  3. garrettjonesgoogle
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: pubsubIssues related to the Pub/Sub API.
    on Dec 1, 2016
  4. timkettering commented on Dec 8, 2016

    @timkettering
    timkettering
    on Dec 8, 2016
    More actions

    +1. Encountering this issue with any type of call made w/ the PubSub client.

  5. garrettjonesgoogle
    added
    blocking GA
    on Dec 8, 2016
  6. jonatanpettersson commented on Dec 9, 2016

    @jonatanpettersson
    jonatanpettersson
    on Dec 9, 2016
    More actions

    +1. We had to revert back to the API while waiting for a fix to this.

  7. BodySplash commented on Dec 14, 2016

    @BodySplash
    BodySplash
    on Dec 14, 2016
    More actions

    +1 I'm trying to find why in the mean time, even if I have no clue.

  8. garrettjonesgoogle commented on Dec 14, 2016

    @garrettjonesgoogle
    garrettjonesgoogle
    on Dec 14, 2016
    Contributor
    More actions

    Investigating now.

  9. BodySplash commented on Dec 14, 2016

    @BodySplash
    BodySplash
    on Dec 14, 2016
    More actions

    So far, not good. I tought maybe I was polling pubsub a bit to aggressively, but It works like a charm on my machine. Maybe a network issue of some sort in the way k8n nodes are configured ? 

  10. qtxo commented on Dec 15, 2016

    @qtxo
    qtxo
    on Dec 15, 2016
    More actions

    I had the same DEADLINE_EXCEEDED problem (for any pubsub request) in my windows 7 laptop, in GCE the same application runs fine. I fixed my problem forcing the Netty version to the one expected by google-cloud 0.8.0 that is 4.1.3.Final.
    Before the fix I was using the version 4.1.5.Final as a dependency of vertx-core-3.3.3.jar. (I hope vertx is not affected by this change, but at least I know what the problem is)

    I can reproduce DEADLINE_EXCEEDED errors in google-cloud-examples forcing Netty version to 4.1.5.Final or 4.16.Final, look at the pom.xml

  11. BodySplash commented on Dec 15, 2016

    @BodySplash
    BodySplash
    on Dec 15, 2016
    More actions

    interesting, I have indeed a version conflict with netty. I'll try to fix my version to 4.1.3.

  12. BodySplash commented on Dec 16, 2016

    @BodySplash
    BodySplash
    on Dec 16, 2016
    More actions

    didn't seem to change anything on my side :(

  13. garrettjonesgoogle commented on Dec 21, 2016

    @garrettjonesgoogle
    garrettjonesgoogle
    on Dec 21, 2016
    Contributor
    More actions

    I was able to make a successful call to Pub/Sub from a docker image on GCE. Could someone who is still having a problem give their pom.xml (or build.gradle as the case may be)?

  14. BodySplash commented on Dec 22, 2016

    @BodySplash
    BodySplash
    on Dec 22, 2016
    More actions

    Here you are. I tried de strip this files to the bare minimum.

    • build.gradle for the executable jar
    • build.gradle for my common jar containing pub-sub
  15. 47 remaining items

  16. JustinBeckwith
    assigned
    garrettjonesgoogle
    on Feb 1, 2021
  17. github-actions
    added 2 commits that reference this issue on Aug 9, 2022

    deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…

    befed25

    chore(main): release 2.3.3 (#1437)

    3733745
  18. meltsufin
    added a commit that references this issue on Dec 22, 2025

    deps: update dependency org.graalvm.buildtools:junit-platform-native …

    9e750a3
  19. chingor13
    added a commit that references this issue on Jan 6, 2026

    chore(deps): update dependency com.google.cloud:google-cloud-logging-…

    e6b0dcd
  20. chingor13
    added a commit that references this issue on Feb 24, 2026

    chore: add dependency dashboard to renovate config (#1430)

    12a40b8
  21. suztomo
    added a commit that references this issue on Mar 11, 2026

    deps: update dependency org.graalvm.buildtools:junit-platform-native …

    1802655
  22. chingor13
    added a commit that references this issue on Mar 12, 2026

    chore: add dependency dashboard to renovate config (#1430)

    ed8134f
  23. suztomo
    added a commit that references this issue on Mar 23, 2026

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    73f3a62
  24. suztomo
    added a commit that references this issue on Mar 30, 2026

    test(deps): update dependency com.google.truth:truth to v1.4.4 (#1430)

    2131a18
  25. lqiu96
    added a commit that references this issue on Apr 1, 2026

    test(deps): update dependency com.google.truth:truth to v1.4.4 (#1430)

    5ce78a1
  26. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    chore(main): release 1.122.1-SNAPSHOT (#1430)

    09b41e8

    chore(main): release 1.122.1-SNAPSHOT (#1430)

    257211f
  27. benjaminp
    added 2 commits that reference this issue on Jul 13, 2026

    fix: add a UUID in the task value (googleapis#1430)

    337b24f

    chore(main): release 2.13.0 (googleapis#1407)

    331e128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @garrettjonesgoogle
    garrettjonesgoogle

Labels

api: coreapi: loggingIssues related to the Cloud Logging API.api: pubsubIssues related to the Pub/Sub API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.