小编Pau*_*yer的帖子

Promtail:“发送批次时出错,将重试”status=500

启动 promtail 客户端时,出现错误: component=client host=loki:3100 msg="发送批处理时出错,将重试" status=500 error="服务器返回 HTTP 状态 500 内部服务器错误 (500): rpc 错误: code = ResourceExhausted desc = grpc:收到的消息大于最大值(6780207 与 4194304)”

promtail 配置

server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

clients:
  - url: 'http://loki:3100/loki/api/v1/push'


scrape_configs:
  - job_name: server-log
    pipeline_stages:
    static_configs:
      - targets:
          - localhost
        labels:
          job:  server-log
          __path__: /opt/log/*.log
          __path_exclude__: /opt/log/jck_*,*.log

Run Code Online (Sandbox Code Playgroud)

我尝试开始更改服务器上的限制,并使用参数运行 promtail:

/usr/local/bin/promtail-linux-amd64 -config.file=/etc/config-promtail.yml -server.grpc-max-recv-msg-size-bytes 16777216 -server.grpc-max-concurrent-streams 0 -server.grpc-max-send-msg-size-bytes 16777216 -limit.readline-rate-drop -client.batch-size-bytes 2048576

但根据我发现的情况来看,这是一个 grpc 协议错误,或者更确切地说,是传输消息的大小错误,其中最大为 4 mb

grafana-loki promtail

3
推荐指数
1
解决办法
3559
查看次数

标签 统计

grafana-loki ×1

promtail ×1