I have a Grafana/Loki Server running in AWS. Promtail can connect and upload logs within the Grafana/Loki server but when I try to connect from the remote host I am getting “Connection Refused”. I am able to telnet from the remote server to port 3100 but when I look at the logs the confusing part is promtail is throwing the following error:
msg=“error sending batch, will retry” status=-1 tenant= error="Post "http://Public_IP/:3100/loki/api/v1/push": dial tcp Public_IP:80: connect: connection refused.
From this I can’t understand why Promtail is sending a “Dial TCP” to port 80 and not 3100. I have found no information as to why this is the behavior.
My current Promtail Config:
server:
http_listen_port: 9080
grpc_listen_port: 0
positions:
filename: /tmp/positions.yaml
clients:
- url: ‘http://public_ip/:3100/loki/api/v1/push’
scrape_configs:
- job_name: system
static_configs:- targets:
- localhost
labels:
job: memaDEV
path: /home2/tefsof5/logs/http_access.log
stream: stdout
- localhost
- targets:
On a final note I am able to confirm both promtail and loki are in the ready status. Also as mentioned telnet from the remote host to the Grafana/Loki server is able to connect. Both Servers are Rocky Linux