Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

OcAgentMetricsExporter Channel ManagedChannelImpl was not shutdown properly #2016

Open
yiyijin opened this issue Feb 21, 2020 · 0 comments
Open
Labels

Comments

@yiyijin
Copy link

yiyijin commented Feb 21, 2020

Please answer these questions before submitting a bug report.

What version of OpenCensus are you using?

0.23

here are the dependencies configure:

"io.opencensus:opencensus-api:0.23.0",
  "io.opencensus:opencensus-impl:0.23.0",
  "io.opencensus:opencensus-exporter-metrics-ocagent:0.23.0", // uses gRPC version 1.19
  "io.opencensus:opencensus-exporter-trace-ocagent:0.23.0",
  "io.netty:netty-tcnative-boringssl-static:2.0.20.Final" // this is the compatiable version with gRPC

What JVM are you using (java -version)?

java version "1.8.0_192"

What did you do?

In our application, we use opencensus library to collect metrics, and configured using OcAgentMetricsExporter. The application and oc-agents are both running in the same kubernetes cluster.

OcAgentMetricsExporterConfiguration configuration = OcAgentMetricsExporterConfiguration.builder()
          .setEndPoint(metricsExporterEndpoint)
          .setServiceName(serviceName)
          .setUseInsecure(true)
          .build();
        OcAgentMetricsExporter.createAndRegister(configuration);

occasionally we see the following Exception:

io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference cleanQueue
SEVERE: *~*~*~ Channel ManagedChannelImpl{logId=1, target=oc-agent.opencensus:55678} was not shutdown properly!!! ~*~*~*
    Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
	at io.grpc.internal.ManagedChannelOrphanWrapper$ManagedChannelReference.<init>(ManagedChannelOrphanWrapper.java:94)
	at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:52)
	at io.grpc.internal.ManagedChannelOrphanWrapper.<init>(ManagedChannelOrphanWrapper.java:43)
	at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:512)
	at io.opencensus.exporter.metrics.ocagent.OcAgentMetricsExporterWorker.connect(OcAgentMetricsExporterWorker.java:107)
	at io.opencensus.exporter.metrics.ocagent.OcAgentMetricsExporterWorker.run(OcAgentMetricsExporterWorker.java:83)
	at java.lang.Thread.run(Thread.java:748)

Question:

  1. does this impact the metrics send to oc-agent? meaning will the metrics get lost due to this error?

  2. how to fix this issue?

@yiyijin yiyijin added the bug label Feb 21, 2020
@yiyijin yiyijin changed the title Channel ManagedChannelImpl was not shutdown properly OcAgentMetricsExporter Channel ManagedChannelImpl was not shutdown properly Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant