-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
api: coreapi: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.
Description
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
Metadata
Metadata
Assignees
Labels
api: coreapi: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.