pihole-exporter icon indicating copy to clipboard operation
pihole-exporter copied to clipboard

Stuck on "starting pihole-exporter"

Open hexxone opened this issue 11 months ago • 4 comments

I cannot get pihole-exporter container to start at all.

This is the only things its logging:

time="2025-05-06T07:50:24Z" level=info msg=------------------------------------

time="2025-05-06T07:50:24Z" level=info msg="starting pihole-exporter"

... NOTHING more.

Steps for Reproduction

  1. Set up the following docker compose

networks:
  # 10.42.0.0/24 - up.sh
  # docker dns 127.0.0.11
  # needed for DNS static IP in VPN
  dns:
    external: true

services:
  pihole:
    image: pihole/pihole:latest
    container_name: pihole
    hostname: pihole
    restart: unless-stopped
    environment:
      TZ: ${RUN_TZ}
      FTLCONF_dns_domainNeeded: false
      FTLCONF_dns_upstreams: '127.0.0.11;9.9.9.10'
      FTLCONF_dns_listeningMode: 'all'
      FTLCONF_webserver_api_password: ${PIHOLE_PASS}
    networks:
      dns:
        priority: 100
        ipv4_address: 10.42.0.4

  pihole-exporter:
    image: ekofr/pihole-exporter:latest
    container_name: pihole-exporter
    hostname: pihole-exporter
    restart: always
    depends_on:
      - pihole
    environment:
      PIHOLE_PROTOCOL: http
      PIHOLE_HOSTNAME: 10.42.0.4
      # configure in env
      PIHOLE_PASSWORD: ${PIHOLE_PASS}
      PIHOLE_PORT: 80
      PORT: 9617
    networks:
      dns: # needed for pihole access
        priority: 100
      stat_net:
        priority: 10
    # expose:
    #   - 9617
    # logging:
    #   driver: "json-file"
    #   options:
    #     max-size: "5k"
    #     max-file: "5"
    healthcheck:
      test: [ "CMD", "wget", "--tries=1", "--spider", "http://localhost:9617/metrics" ]
      interval: 300s
      retries: 5
      timeout: 10s

  1. Launch with docker compose up -d
  2. Pihole gets up and running and is reachable
  3. pihole-exporter STAYS stuck in "Starting" mode.

Expected behavior:

pihole-exporter should START or CRASH/EXIT.

Actual behavior:

pihole-exporter STAYS STUCK in "Starting" mode.

Platforms:

docker debian12 linux

Versions:

latest

hexxone avatar May 06 '25 07:05 hexxone

I am having a similar issue. On the "details" page for the container in Portainer, I see this:

"OCI runtime exec failed: exec failed: unable to start container process: exec: "wget": executable file not found in $PATH: unknown"

EDIT: I tried going to the metrics page (http://192.168.1.52:9617/metrics) for pihole-exporter and it displays values like would expect, so maybe just a weird docker status issue.

anderfrank avatar Jun 04 '25 21:06 anderfrank

I have the same issue, container is reporting as "unhealthy", however metrics are being generated but health check is failing with error:

"OCI runtime exec failed: exec failed: unable to start container process: exec: "wget": executable file not found in $PATH: unknown"

Looking at the Dockerfile it seems to be too minimal, there is no wget being installed, hence the error above:

$ docker export pihole-exporter | tar tf -
.dockerenv
dev/
dev/console
dev/pts/
dev/shm/
etc/
etc/hostname
etc/hosts
etc/mtab
etc/resolv.conf
proc/
root/
root/pihole-exporter
sys/

hattersley avatar Jun 10 '25 10:06 hattersley

same

nicanordlc avatar Aug 09 '25 03:08 nicanordlc

I was having similar looking problems. Where

docker logs pihole-exporter -f
time="2025-08-30T11:42:48Z" level=info msg="starting pihole-exporter"

Was the only thing showing and running query in Prometheus resulted in nothing.

My setup differs from OP in that my Pihole-Exporter lives with my monitoring stack. The docs say to use

  - job_name: "pihole"
    static_configs:
        - targets: ["localhost:9617"]

As your scrape config but this makes zero sense in a docker-compose setup. Flipping it to

  - job_name: "pihole"
    static_configs:
        - targets: ["pihole-exporter:9617"]

Started to stream my Pihole data into prometheus.

This is just akward documentation. You're scrapers might just be pointing somewhere that doesnt exist.

MarkDPierce avatar Aug 30 '25 11:08 MarkDPierce