Promtail port 80 error

Hi,

I am trying to collect logs from a windows host and send them over to a remote grafana/loki/promtail server.

This host is also running IIS which I believe may create the issue which I experience then again, unsure as of why.

When running promtail-windows-amd64.exe --config.file=sei_logs.yaml we then receive level=error ts=2022-02-24T21:32:02.4816473Z caller=main.go:115 msg="error creating promtail" error="listen tcp :80: bind: An attempt was made to access a socket in a way forbidden by its access permissions."

Config file

positions:
  filename: D:\scripts\x3_logs_positions.yaml

clients:
  - url: http://everest-docker02:3100/loki/api/v1/push

scrape_configs:
- job_name: objserver
  static_configs:
  - targets:
      - localhost
    labels:
      job: BIService
      __path__: C:\Program Files\Sage\Sage Enterprise Intelligence\Service\objserver\BIService*.log

- job_name: objDistribution
  static_configs:
  - targets:
      - localhost
    labels:
      job: distribution_trace
      __path__: C:\Program Files\Sage\Sage Enterprise Intelligence\DistributionService\objDistribution\distributiontrace*.log

- job_name: DistributionLogs
  static_configs:
  - targets:
      - localhost
    labels:
      job: distribution
      __path__: C:\Program Files\Sage\Sage Enterprise Intelligence\Service\objserver\DistributionLogs\Distribution*.log

We already have it working on a different non IIS host, hence the suspicion of something related to IIS and port 80, if that is the case, why would promtail use local 80 port for, and how to get around it?

From the server configuration here 80 is the default port for the http API and metrics endpoints. You may need to change the port that the webserver listens on to something else or disable it with disable: true. Or in my case, you need to make sure that promtail is actually reading your config file and not silently failing when it can’t find it in the container. Best of luck

Thank you, that was it!!

Hi,

would disable:true just be the answer as you pointed out, reading the URL you attached I see no reference to it, which makes it weird knowing how to disable listening to begin with?
as a work around I set the port to 8080, truth be told I have no use for having this port listening to begin with when all we are doing is sending data away.

Thanks,