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 — Stackdriver Monitoring internal error HTTP/2 · Issue #2066 · googleapis/google-cloud-java

Stackdriver Monitoring internal error HTTP/2 #2066

New issue
Copy link
New issue
Copy link
Closed
Closed
Stackdriver Monitoring internal error HTTP/2#2066
Copy link
Assignees
garrettjonesgoogle
Labels
api: monitoringIssues related to the Cloud Monitoring API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@zsiegel
zsiegel
opened on May 18, 2017
Issue body actions

We are testing the stackdriver monitoring class and seeing a large amount of the exceptions attached on and off in our environments.

com.google.api.gax.grpc.ApiException: io.grpc.StatusRuntimeException: 
INTERNAL: HTTP/2 error code: 
INTERNAL_ERROR Received Rst Stream at
com.google.api.gax.grpc.ExceptionTransformingCallable$ExceptionTransformingFuture.onFailure(ExceptionTransformingCallable.java:108)

exception.txt

Reacted by yonran and Stefano Massera

Activity

Next
  1. tcoffee-google commented on May 22, 2017

    @tcoffee-google
    tcoffee-google
    on May 22, 2017
    Contributor
    More actions

    @garrettjonesgoogle is there someone on the gRPC team who might have better insight here?

  2. garrettjonesgoogle commented on May 30, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on May 30, 2017
    Contributor
    More actions

    @zsiegel I think we will need more details to investigate. Can you provide information on the environment you're running in, and the versions of your dependencies? Also, could you describe the conditions that this happens in more specifically?

  3. zsiegel commented on May 30, 2017

    @zsiegel
    zsiegel
    on May 30, 2017
    Author
    More actions

    We are running this on a number of nodes in a GKE cluster.

    We have 3 web services running and we use an end of request handler to calculate the request timing and send them to stackdriver as a custom metric.

    We inserted the middleware on just our /health endpoints to test out the dependency which was the latest in maven central at the time of testing (com.google.cloud:google-cloud-monitoring:0.17.2-alpha). We then let the Google Cloud load balancers hit our health endpoints as the normal do and watched our metrics (the load balancers in gcloud hit the endpoint 2-3 times a second)

    After a few minutes of metrics we notice a ton of the stacktraces above. We are not doing anything to batch this data up we are simply logging a single Int64Value with a timestamp to StackDriver.

    Let me know if you need anything else.

  4. garrettjonesgoogle commented on May 30, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on May 30, 2017
    Contributor
    More actions

    I don't know if you can provide the exact code you use to call StackDriver, but would you be able to at least provide a distilled version? It would help to know both the API method and types of parameters you are passing in.

  5. zsiegel commented on May 30, 2017

    @zsiegel
    zsiegel
    on May 30, 2017
    Author
    More actions

    sure can. see the near complete method call below.

          long endTime = System.currentTimeMillis();
          long responseTime = Math.max(1, endTime - startTime);
    
          TimeInterval interval = TimeInterval.newBuilder()
                                                    .setEndTime(Timestamps.fromMillis(System.currentTimeMillis()))
                                                    .build();
    
          TypedValue value = TypedValue.newBuilder()
                                             .setInt64Value(responseTime)
                                             .build();
    
          Point point = Point.newBuilder()
                                   .setInterval(interval)
                                   .setValue(value)
                                   .build();
    
          List<Point> dataPoints = Collections.singletonList(point);
    
          Metric metric = Metric.newBuilder()
                                      .setType(CUSTOM_METRIC_DOMAIN + "/" + env + "/response_time")
                                      .build();
    
          Map<String, String> resourceLabels = new HashMap<>();
          resourceLabels.put("project_id", LoggingOptions.getDefaultProjectId());
          MonitoredResource resource = MonitoredResource.newBuilder()
                                                              .setType("global")
                                                              .putAllLabels(resourceLabels)
                                                              .build();
    
          TimeSeries timeSeries = TimeSeries.newBuilder()
                                                  .setMetric(metric)
                                                  .setResource(resource)
                                                  .addAllPoints(dataPoints)
                                                  .build();
    
          CreateTimeSeriesRequest request = CreateTimeSeriesRequest.newBuilder()
                                                                         .setNameWithProjectName(ProjectName.create(LoggingOptions.getDefaultProjectId()))
                                                                         .addAllTimeSeries(Collections.singleton(timeSeries))
                                                                         .build();
    
          metricsClient.createTimeSeries(request);
           
    
  6. garrettjonesgoogle commented on May 30, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on May 30, 2017
    Contributor
    More actions

    Thanks! I'll see if I can reproduce this.

  7. garrettjonesgoogle
    added
    api: monitoringIssues related to the Cloud Monitoring API.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on May 30, 2017
  8. garrettjonesgoogle commented on Jun 2, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Jun 2, 2017
    Contributor
    More actions

    I tried out code similar to yours and I observed the error once. Since this is a purely auto-generated client and our other auto-generated clients don't have this issue, this seems to be a server-side problem.

  9. zsiegel commented on Jun 12, 2017

    @zsiegel
    zsiegel
    on Jun 12, 2017
    Author
    More actions

    Hmm thats quite interesting... So if it indeed is a server side issue how would you go about reporting this to the Google Cloud / Stackdriver team? @garrettjonesgoogle

  10. tracycollins commented on Jun 12, 2017

    @tracycollins
    tracycollins
    on Jun 12, 2017
    More actions

    +1

    I'm seeing similar errors. It had been working fine for months. Errors started appearing consistently a few days ago:

    "Received RST_STREAM with error code 2"
    {
    "code": 13,
    "metadata": {
    "_internal_repr": {}
    },
    "note": "Exception occurred in retry method that was not classified as transient"
    }

    I'm using the google monitoring node api:

    https://github.com/googleapis/googleapis/tree/master/google/monitoring/v3

    I thought I was updating too quickly, so I've throttled way below the quota but still get errors.

    It is Alpha, so I've not been complaining.

  11. sundewei commented on Jun 14, 2017

    @sundewei
    sundewei
    on Jun 14, 2017
    More actions

    +1 I am having the same errors.

    I only wanted to send 20 metrics in a for-loop and this error showed up after 4th attempt...

    Any update on what we should do in our end to avoid it?

    Thanks.

    Dewei

  12. sundewei commented on Jun 15, 2017

    @sundewei
    sundewei
    on Jun 15, 2017
    More actions

    Just FYI...
    As of now, this error happens so frequently that I cannot even sent metrics any more.

    Exception in thread "main" com.google.api.gax.grpc.ApiException: io.grpc.StatusRuntimeException: INTERNAL: HTTP/2 error code: INTERNAL_ERROR
    Received Rst Stream

     <dependency>
            <groupId>com.google.cloud</groupId>
            <artifactId>google-cloud-monitoring</artifactId>
            <version>0.19.0-alpha</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    
    
    
      private static void sendDataPoints(final MetricServiceClient client, String projectId, String metricType,
                                       String monitoredResourceType, Map<String, String> resLabels,
                                       long endTimeMs, TypedValue... values) throws Exception {
        // Prepares an individual data point
        TimeInterval interval = TimeInterval.newBuilder()
            .setEndTime(Timestamps.fromMillis(endTimeMs))
            .build();
    
        Point[] points = getPoints(interval, values);
    
        ProjectName name = ProjectName.create(projectId);
    
        // Prepares the metric descriptor
        Metric metric = Metric.newBuilder()
            .setType(metricType)
            .putAllLabels(resLabels)
            .build();
    
        // Prepares the monitored resource descriptor
        MonitoredResource resource = MonitoredResource.newBuilder().setType(monitoredResourceType).build();
    
        // Prepares the time series request
        TimeSeries timeSeries = TimeSeries.newBuilder()
            .setMetric(metric)
            .setResource(resource)
            .addAllPoints(Arrays.asList(points))
            .build();
    
        List<TimeSeries> timeSeriesList = new ArrayList<>();
        timeSeriesList.add(timeSeries);
    
        CreateTimeSeriesRequest request = CreateTimeSeriesRequest.newBuilder()
            .setNameWithProjectName(name)
            .addAllTimeSeries(timeSeriesList)
            .build();
    
        // Writes time series data
        client.createTimeSeries(request);
        System.out.println("Done writing time series value.");
    }
    
  13. sundewei commented on Jun 15, 2017

    @sundewei
    sundewei
    on Jun 15, 2017
    More actions

    FYI:
    Here is some more info...
    This error only happens to the CustomMetric that have been explicitly created.

    If I don't send the create request and just let it be "automatically" created, then the subsequent send metric requests are successfully.

    I am guessing maybe the resource allocation logic at the server side for explicitly created CustomMetric has some problem.
    Thanks.
    Dewei

  14. 7 remaining items

  15. anthmgoogle
    assigned
    garrettjonesgoogle
    on Nov 9, 2017
  16. anthmgoogle
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Nov 9, 2017
  17. pongad commented on Jan 25, 2018

    @pongad
    pongad
    on Jan 25, 2018
    Contributor
    More actions

    @garrettjonesgoogle Have we ever reached out to API team about this? I have been able to publish about 1000 times with no error.

  18. pongad commented on Jan 30, 2018

    @pongad
    pongad
    on Jan 30, 2018
    Contributor
    More actions

    @SJAnderson @manuellazzarijr @mrunesson @zsiegel
    Could you provide us with some additional information?

    1. Are you creating time series close to metric creation? If so, we might encounter error since the metric hasn't been fully created yet.
    2. Could you give us your project ID and some of your CreateTimeSeriesRequest? This will help the monitoring team debug this.
  19. pongad commented on Feb 16, 2018

    @pongad
    pongad
    on Feb 16, 2018
    Contributor
    More actions

    I'll close this for now due to inactivity. Please reopen if the issue persist.

  20. pongad
    closed this as completedon Feb 16, 2018
  21. chingor13
    added 2 commits that reference this issue on Feb 20, 2026

    feat: add public api to stream writer to set the maximum wait time (#…

    1e9a8ca

    chore(main): release 2.35.0 (#2074)

    3e3fdc9
  22. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore(main): release 2.30.3-SNAPSHOT (googleapis#2066)

    3b68390
  23. meltsufin
    added 4 commits that reference this issue on Apr 29, 2026

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

    dfcaeb5

    chore(main): release 1.133.0 (#2206)

    a3b6539

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

    699bbc9

    chore(main): release 1.133.0 (#2206)

    1180af9
  24. benjaminp
    added a commit that references this issue on Jul 13, 2026

    chore(docs): fix javadoc for readRowSettings (googleapis#2066)

    a0d3a76
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: monitoringIssues related to the Cloud Monitoring API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

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.