Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pihole connection refused #249

Open
vanharen07 opened this issue Nov 27, 2024 · 0 comments
Open

Pihole connection refused #249

vanharen07 opened this issue Nov 27, 2024 · 0 comments

Comments

@vanharen07
Copy link

vanharen07 commented Nov 27, 2024

When trying to setup the pihole exporter I'm running into some problems. No matter the way I try to connect to my pihole using the tool it gives the error connection refused. I'm running both services in docker using the latest non dev versions of both.

pihole exporter compose:

services:
  pihole-exporter:
    container_name: pihole-exporter
    image: ekofr/pihole-exporter:latest
    environment:
      PIHOLE_HOSTNAME: pihole
      #PIHOLE_API_TOKEN: "also secret"
      PIHOLE_PASSWORD: secret
      PIHOLE_PORT: 801
    ports: 
      
9617:9617
  networks:
t3_proxy

pihole compose:

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      
"53:53/tcp"
"53:53/udp"
"67:67/udp"
"801:80/tcp"
environment:
  TZ: 'Europe/Amsterdam'
  WEBPASSWORD: 'secret'
volumes:
'$DOCKERDIR/appdata/pihole:/etc/pihole'
'$DOCKERDIR/appdata/pihole/etc-dnsmasq.d:/etc/dnsmasq.d'
cap_add:
NET_ADMIN
restart: unless-stopped
networks:
t3_proxy

Pihole exporter logs:

2024-11-27T22:22:36.957750211Z time="2024-11-27T22:22:36Z" level=info msg=------------------------------------
2024-11-27T22:22:36.957772981Z time="2024-11-27T22:22:36Z" level=info msg="-  Pi-hole exporter configuration  -"
2024-11-27T22:22:36.957777891Z time="2024-11-27T22:22:36Z" level=info msg=------------------------------------
2024-11-27T22:22:36.957781941Z time="2024-11-27T22:22:36Z" level=info msg="Go version: go1.21.5"
2024-11-27T22:22:36.957843952Z time="2024-11-27T22:22:36Z" level=info msg="PIHoleProtocol : [http]"
2024-11-27T22:22:36.957856842Z time="2024-11-27T22:22:36Z" level=info msg="PIHoleHostname : [pihole]"
2024-11-27T22:22:36.957861272Z time="2024-11-27T22:22:36Z" level=info msg="PIHolePort : [801]"
2024-11-27T22:22:36.957865123Z time="2024-11-27T22:22:36Z" level=info msg="Pi-hole Authentication Method : PIHolePassword"
2024-11-27T22:22:36.957868873Z time="2024-11-27T22:22:36Z" level=info msg="BindAddr : 0.0.0.0"
2024-11-27T22:22:36.957872543Z time="2024-11-27T22:22:36Z" level=info msg="Port : 9617"
2024-11-27T22:22:36.957876123Z time="2024-11-27T22:22:36Z" level=info msg="Timeout : 5s"
2024-11-27T22:22:36.957879753Z time="2024-11-27T22:22:36Z" level=info msg=------------------------------------
2024-11-27T22:22:36.957883353Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: domains_blocked"
2024-11-27T22:22:36.957887013Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: dns_queries_today"
2024-11-27T22:22:36.957890713Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: ads_blocked_today"
2024-11-27T22:22:36.957894273Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: ads_percentag_today"
2024-11-27T22:22:36.957897853Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: unique_domains"
2024-11-27T22:22:36.957901463Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: queries_forwarded"
2024-11-27T22:22:36.957905023Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: queries_cached"
2024-11-27T22:22:36.957908913Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: clients_ever_seen"
2024-11-27T22:22:36.957912583Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: unique_clients"
2024-11-27T22:22:36.957916293Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: dns_queries_all_types"
2024-11-27T22:22:36.957919983Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: reply"
2024-11-27T22:22:36.957923554Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: top_queries"
2024-11-27T22:22:36.957927184Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: top_ads"
2024-11-27T22:22:36.957937604Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: top_sources"
2024-11-27T22:22:36.957941354Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: forward_destinations"
2024-11-27T22:22:36.957948374Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: querytypes"
2024-11-27T22:22:36.957952204Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: status"
2024-11-27T22:22:36.957955874Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: queries_last_10min"
2024-11-27T22:22:36.957959504Z time="2024-11-27T22:22:36Z" level=info msg="New Prometheus metric registered: ads_last_10min"
2024-11-27T22:22:36.957963114Z time="2024-11-27T22:22:36Z" level=info msg="Creating client with config <Config@C000052138 PIHoleProtocol=http, PIHoleHostname=pihole, PIHolePort=801, PIHolePassword=*****, BindAddr=, Port=0>\n"
2024-11-27T22:22:36.957967274Z time="2024-11-27T22:22:36Z" level=info msg="Starting HTTP server"
2024-11-27T22:31:20.602919033Z time="2024-11-27T22:31:20Z" level=info msg="Collecting from pihole"
2024-11-27T22:31:20.604693580Z time="2024-11-27T22:31:20Z" level=info msg="An error occured while contacting pihole: an error has occurred authenticating the request: loging in to Pi-hole: Post \"http://pihole:801/admin/index.php?login\": dial tcp 192.168.90.5:801: connect: connection refused"

This all is run on a simple debian install with amd64 hardware.

If there is anymore information I need to provide or something I can do please let me know. I'm a bit clueless at this point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant