Setting localhost in otel endpoint throws error "No connection could be made because the target machine actively refused it.”

21 views Asked by At

I am setting up self-managed grafana & Tempo in my windows server. Open telemetry collecotr agent is running on my application server and sending the trace data to this local Tempo service. But getting error when configure endpoint as localhost:4317 and no error when use endpoint with 0.0.0.0:4317.

Error

2024-03-12T12:28:53.089Z warn zapgrpc/zapgrpc.go:195 [core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {Addr: “xx.xx.xx.xx:4317”, ServerName: “xx.xx.xx.xx:4317”, }. Err: connection error: desc = “transport: Error while dialing: dial tcp xx.xx.xx.xx:4317: connectex: No connection could be made because the target machine actively refused it.” {“grpc_log”: true}

and configuration details are,

Tempo.yaml

server:
  http_listen_port: 3200

distributor: # receive spans and forward them to the appropriate ingesters.
  receivers:
    otlp:
      protocols:
        http:
          endpoint: localhost:4318
        grpc:
          endpoint: localhost:4317

compactor:
  compaction:
    block_retention: 720h # configure total trace retention here. 30days.

storage:
  trace:
    backend: local
    wal:
      path: C:\Program Files\GrafanaLabs\tempo\wal
    local:
      path: C:\Program Files\GrafanaLabs\tempo\blocks # where to store the blocks.

Otel collecot agent config

receivers:
  otlp:
    protocols:
      grpc:
      http:

exporters:       
   otlp:
     endpoint: <IP address of the Tempo instance>:4317
     tls:
       insecure: true

processors:
  batch:

service:      
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug, otlp]

Any fix or recommendations? Thanks.

0

There are 0 answers