#support

Log Monitoring Connection Error in Signoz

TLDR Utkarsh encountered a connection error while adding log monitoring using Signoz. nitya-signoz identified the incorrect otlp exporter port and suggested using 4317.

Powered by Struct AI

1

8
9mo
Solved
Join the chat
Mar 16, 2023 (9 months ago)
Utkarsh
Photo of md5-5a20fdd51ad1bf0c6e3c0b54d9d00534
Utkarsh
08:50 AM
Hi Signoz team,

We are looking to add log monitoring to our product and following this doc----->https://signoz.io/docs/userguide/collect_logs_from_file/

In our case signoz is running on a different host.
But after mounting our logs file, we are getting this error in out docker logs---->

 Err: connection error: desc = "transport: Error while dialing dial tcp: address tcp/8080/: unknown port"     {"grpc_log": true}
2023-03-16T08:48:25.681Z        info    fileconsumer/file.go:178        Started watching file   {"kind": "receiver", "name": "filelog", "pipeline": "logs", "component": "fileconsumer", "path": "/home/ubuntu/.pm2/logs/DISHA-PROD-out.log"}
2023-03-16T08:48:25.682Z        error   helper/transformer.go:110       Failed to process entry {"kind": "receiver", "name": "filelog", "pipeline": "logs", "operator_id": "json_parser", "operator_type": "json_parser", "error": "ReadMapCB: expect { or n, but found 2, error found in #1 byte of ...|2023-03-15 |..., bigger context ...|2023-03-15 12:37:31.260 +00:00: socket sever starte|...", "action": "send", "entry": {"observed_timestamp":"2023-03-16T08:48:25.682141943Z","timestamp":"0001-01-01T00:00:00Z","body":"2023-03-15 12:37:31.260 +00:00: socket sever started on PORT 4000","attributes":{"log.file.name":"DISHA-PROD-out.log"},"severity":0,"scope_name":""}}

Would really appreciate some help with this.
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
09:42 AM
nitya-signoz
nitya-signoz
Photo of md5-a52b9d6c34f193d9a1ff940024f36f77
nitya-signoz
09:45 AM
I can see there are two errors
1. There is some connection error.
2. There is a parsing error in json_parser
can you share your config file and some sample logs which you are parsing using that config file.
Pranay
Photo of md5-8df7ce0274b2473ec07403336e48b574
Pranay
11:54 AM
Utkarsh 👆

1

Utkarsh
Photo of md5-5a20fdd51ad1bf0c6e3c0b54d9d00534
Utkarsh
12:09 PM
nitya-signoz
God rid of the parsing error but still facing connection error.

led to connect to {
  "Addr": "localhost:8080/",
  "ServerName": "localhost:8080/",
  "Attributes": null,
  "BalancerAttributes": null,
  "Type": 0,
  "Metadata": null
}. Err: connection error: desc = "transport: Error while dialing dial tcp: address tcp/8080/: unknown port"     {"grpc_log": true}
2023-03-16T12:07:39.656Z        info    fileconsumer/file.go:178        Started watching file   {"kind": "receiver", "name": "filelog", "pipeline": "logs", "component": "fileconsumer", "path": "/home/ubuntu/.pm2/logs/DISHA-PROD-out.log"}

Did anyone come across this before?
nitya-signoz
Photo of md5-a52b9d6c34f193d9a1ff940024f36f77
nitya-signoz
12:18 PM
please share your config it will help me understand what you are trying to do.
Utkarsh
Photo of md5-5a20fdd51ad1bf0c6e3c0b54d9d00534
Utkarsh
12:58 PM
nitya-signoz Sure.

receivers:
  filelog:
    include: [ /home/ubuntu/.pm2/logs/DISHA-PROD-out.log ]
    start_at: beginning
processors:
  batch:
    send_batch_size: 10000
    send_batch_max_size: 11000
    timeout: 10s
exporters:
  otlp/log:
    endpoint: 
    tls:
      insecure: true
service:
  pipelines:
    logs:
      receivers: [filelog]
      processors: [batch]
      exporters: [ otlp/log ]

Path----->/signoz/deploy/docker/clickhouse-setup.



Our log file is at this path----->/home/ubuntu/.pm2/logs/DISHA-PROD-out.log


We are using this command to mount it ----->

docker run -d --name signoz-host-otel-collector --user root -v /home/ubuntu/.pm2/logs/DISHA-PROD-out.log:/home/ubuntu/.pm2/logs/DISHA-PROD-out.log:ro -v $(pwd)/otel-collector-config.yaml:/etc/otel/config.yaml signoz/signoz-otel-collector:0.55.0-rc.3
nitya-signoz
Photo of md5-a52b9d6c34f193d9a1ff940024f36f77
nitya-signoz
04:10 PM
the otlp exporter port is not correct, it should be 4317

SigNoz Community

Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI

Indexed 1023 threads (61% resolved)

Join Our Community