Promtail: “error sending batch, will retry” status=-1 context deadline exceeded”

I have a promtail client sending logs to a remote server.
My promtail config

server:
  http_listen_port: 9080
  grpc_listen_port: 0

positions:
  filename: /tmp/positions.yaml

clients:
  - url: http://<remote server>:3100/loki/api/v1/push

scrape_configs:
- job_name: system
  static_configs:
  - targets:
      - localhost
    labels:
      job: varlogs
      instance: <local server>
      __path__: /var/log/*.log

when I have my iptables configured like

Chain INPUT (policy DROP)
Chain OUTPUT (policy ACCEPT)

I get the error

msg="error sending batch, will retry" status=-1 tenant= error="Post \"http://<remote server>:3100/loki/api/v1/push\": context deadline exceeded"

When I change it to

Chain INPUT (policy ACCEPT)

it works.

Which ports needs to be configured in iptables. It seems that allowing outgoing traffic is not enough.
Thanks in advance!!

Anyone can help with configuring IP tables correctly?
Many thanks!!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.