opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

zapgrpc : Warning http2Server.HandleStreams failed to read frame - when client close

Open elvince opened this issue 2 years ago • 1 comments

Describe the bug During the lifetime of my application, everything is working properly. Once I closed it, I have a "warning" in the collector:

warn zapgrpc/zapgrpc.go:191 [transport] transport: http2Server.HandleStreams failed to read frame: read tcp [::1]:4317->[::1]:64933: wsarecv: Une connexion existante a dû être fermée par l’hôte distant. {"grpc_log": true}

"Une connexion existante a dû être fermée par l’hôte distant." means "an existing connection might have been close by remote host"

Steps to reproduce Launch the collector with the config below.

Launch a .net console project with in main:

var serviceName = "MDS.TestSerilog.Test";
              var serviceVersion = "1.0.0";
              // Configure important OpenTelemetry settings and the console exporter
              using var tracerProvider = Sdk.CreateTracerProviderBuilder()
                  .AddSource(serviceName)
                  .SetResourceBuilder(
                      ResourceBuilder.CreateDefault()
                          .AddService(serviceName: serviceName, serviceVersion: serviceVersion))
                  .AddConsoleExporter()
                  .AddOtlpExporter(opt =>
                  {
                      opt.Endpoint = new Uri("http://localhost:4317");
                  })
                  .Build();

              var MyActivitySource = new ActivitySource(serviceName);

              using var activity = MyActivitySource.StartActivity("SayHello");
              activity?.SetTag("foo", 1);
              activity?.SetTag("bar", "Hello, World32!");
              activity?.SetTag("baz", new int[] { 1, 2, 3 });

What did you expect to see? As my application is closing properly I shouldn't see any warning on the collector side

What did you see instead? in the log I'm seeing a warning: " zapgrpc : Warning http2Server.HandleStreams failed to read frame"

What version did you use? Version: 0.48 Windows

What config did you use? Config:

  otlp:
    protocols:
      grpc:

# Configure exporters
exporters:
  # Export prometheus endpoint
  prometheus:
    endpoint: "0.0.0.0:8889"

  # log to the console
  logging:

  # Export to zipkin
 #zipkin:
 #  endpoint: "http://zipkin-all-in-one:9411/api/v2/spans"
 #  format: proto

  # Export to a file
  file:
    path: C:\Formation\ElasticSearch\otelcol_0.48.0_windows_amd64.tar\otelcol_0.48.0_windows_amd64\logs.json

# Configure processors (batch, sampling, filtering, hashing sensitive data, etc.)
# https://opentelemetry.io/docs/collector/configuration/#processors
processors:
  batch:

# Configure pipelines. Pipeline defines a path the data follows in the Collector
# starting from reception, then further processing or modification and finally
# exiting the Collector via exporters.
# https://opentelemetry.io/docs/collector/configuration/#service
# https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/design.md#pipelines
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, file]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, file]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [logging, file]

Environment OS: Windows

Thanks,

elvince avatar Apr 08 '22 16:04 elvince

Can I pick this up?

deepto98 avatar Jul 04 '22 06:07 deepto98

@jpkrohling Hi, could this be assigned to me? I'm an outreachy applicant

GuddyTech avatar Oct 15 '22 19:10 GuddyTech

It's yours. Start by verifying this issue is still happening. Chances are that this is not relevant anymore.

jpkrohling avatar Oct 19 '22 00:10 jpkrohling

@GuddyTech If you want to debug it, I'm seeing similar issue in some of our opentelemetry collector logs. Let me know what you need

otelcol-contrib[20433]: 2022-10-24T20:46:39.936Z warn zapgrpc/zapgrpc.go:191 [transport] transport: http2Server.HandleStreams failed to read frame: read tcp 96.117.33.53:4317->10.138.30.13:52236: read: connection reset by peer {"grpc_log": true}

dixanms avatar Oct 24 '22 21:10 dixanms

thank you.

GuddyTech avatar Oct 25 '22 04:10 GuddyTech

Hi @elvince, I have a still same problem. How to solved problem?

enesconf avatar Nov 11 '22 12:11 enesconf

This issue appears in my logs too

AlexDCraig avatar Dec 14 '22 17:12 AlexDCraig

How should I solve it? This issue appears in my logs too

bearxiongzhen avatar Apr 09 '23 15:04 bearxiongzhen

2023-04-09T23:23:10.575+0800 warn zapgrpc/zapgrpc.go:195 [transport] transport: http2Server.HandleStreams failed to read frame: read tcp 11.157.2.143:4317->11.157.2.138:16112: read: connection reset by peer {"grpc_log": true}

bearxiongzhen avatar Apr 09 '23 15:04 bearxiongzhen

2023-04-25T14:26:47.052Z warn zapgrpc/zapgrpc.go:195 [core] [Server #1] grpc: Server.Serve failed to create ServerTransport: connection error: desc = "transport: http2Server.HandleStreams failed to receive the preface from client: read tcp 10.11.14.194:55680->10.11.14.202:56722: read: connection reset by peer" {"grpc_log": true}

bitomaxsp avatar Apr 25 '23 14:04 bitomaxsp

Hi @jpkrohling can this issue to be assigned to me for my outreachy contribution?

eniworoeva avatar Oct 17 '23 05:10 eniworoeva

Assigned

jpkrohling avatar Oct 23 '23 13:10 jpkrohling

@jpkrohling please assign this issue to me if it has not been fixed

Kimbohlovette avatar Mar 14 '24 21:03 Kimbohlovette