unifi-utilities / unifios-utilities

A collection of enhancements for UnifiOS based devices
GNU General Public License v3.0
3.84k stars 415 forks source link

[PiHole with DoTe] Restart loop (normal pi-hole runs fine) #351

Open simkin opened 2 years ago

simkin commented 2 years ago

Describe the bug PiHole with DoTe crashes and restarts continuously

To Reproduce Steps to reproduce the behavior:

  1. Stop and remove pihole
  2. Install https://github.com/boostchicken-dev/udm-utilities/tree/master/run-pihole "PiHole with DoTe"
  3. Check log: podman logs pihole

UDM Information

Additional context

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 05-changer-uid-gid.sh: executing...
[cont-init.d] 05-changer-uid-gid.sh: exited 0.
[cont-init.d] 10-dote.sh: executing...
Not running on VyOS, config through parameters

 Usage: /opt/dote [OPTIONS]

  Options:
   -s --server IP[:port]     The server to listen on with optional port.
                             May be specified multiple times.  IPv6
                             addresses must be encapsulated in square
                             brackets (i.e. [::1])
   -f --forwarder IP[:port]  A forwarder to send requests on to with an
                             optional port number.
   -h --hostname  hostname   The hostname of the previously specified
                             forwarders' certificate.
   -p --pin  hash            The Base64 encoding of a SHA-256 hash of the
                             previously specified forwarders' public key.
   -i --insecure             Disable any certificate verification for the
                             forwarder
   -c --ciphers  ciphers     The OpenSSL ciphers to use for connecting
   -m --connections  max     The maximum number of outgoing requests at a
                             time before buffering the requests.
   -d --daemonise            Daemonise this application
   -P --pid_file  filename   Write the PID of the process to a given file
   -l --ip_lookup  IP        Lookup the hostname and certificate pin for
                             an IP address and then exit.
   -t --timeout  timeout     The number of seconds to allow a forwarder

[cont-init.d] 10-dote.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
emlynmac commented 2 years ago

I've been running into this too; is the container config somehow not working? I've downloaded the dote binary directly to my UDMP and it runs fine without any parameters. I got it working by using the customdote script to make the container work.

boostchicken commented 2 years ago

I dont maintain that guy. Ill see if I can try to see whats up

emlynmac commented 2 years ago

Thanks @boostchicken I can get that container to start with dote, but it does not work as a resolver.

emlynmac commented 1 year ago

Just ran into this again and did a little debugging. I think the $DOTE_OPTS substitution is not happening inside the 10-dote.sh script, so the call to /opt/dote fails

emlynmac commented 1 year ago

Oh and one more little thing I ran into @boostchicken with your dote enabled docker file - the 10-dote.sh script needs chmod +x to get it to run.