chriscrowe / docker-pihole-unbound

Run Pi-Hole + Unbound on Docker
1.04k stars 270 forks source link

Unable to stop/start unbound service from command line #227

Open paulrobinsontkd opened 8 months ago

paulrobinsontkd commented 8 months ago

It seems something is missing to allow the unbound service to stop/start from cli

Everything else is working as it should when deployed and unbound starts on boot but when i try to stop or restart the service it just hangs

root@pihole1:/# service unbound status up (pid 281) 57 seconds

root@pihole1:/# ps -ef | grep unbound root 279 1 0 09:50 ? 00:00:00 s6-supervise unbound unbound 315 281 0 09:50 ? 00:00:00 /usr/sbin/unbound -d root 710 691 0 09:51 pts/0 00:00:00 grep unbound

root@pihole1:/# service unbound stop

root@pihole1:/# ps -ef | grep unbound root 279 1 0 09:50 ? 00:00:00 s6-supervise unbound unbound 315 1 0 09:50 ? 00:00:00 /usr/sbin/unbound -d root 721 691 0 09:51 pts/0 00:00:00 grep unbound

Process is still running

root@pihole1:/# service unbound restart

Hangs indefinitely when i run start/restart and does not give an error

paulrobinsontkd commented 8 months ago

Think i have answered my own question, i can use unbound-control to stop/start service

root@pihole1:/etc/services.d/unbound# unbound-control status version: 1.13.1 verbosity: 0 threads: 1 modules: 3 [ subnet validator iterator ] uptime: 603 seconds options: reuseport control(ssl) unbound (pid 315) is running...

root@pihole1:/etc/services.d/unbound# unbound-control stop ok

root@pihole1:/etc/services.d/unbound# ps -ef | grep unbound root 279 1 0 09:50 ? 00:00:00 s6-supervise unbound root 1919 691 0 10:00 pts/0 00:00:00 grep unbound

root@pihole1:/etc/services.d/unbound# unbound-control status [1701252258] unbound-control[2036:0] error: connect: Connection refused for 127.0.0.1 port 8953 unbound is stopped

root@pihole1:/etc/services.d/unbound# unbound-control start

root@pihole1:/etc/services.d/unbound# ps -ef | grep unbo root 279 1 0 09:50 ? 00:00:00 s6-supervise unbound unbound 1925 1 0 10:00 ? 00:00:00 unbound -c /etc/unbound/unbound.conf root 1927 691 0 10:01 pts/0 00:00:00 grep unbo

root@pihole1:/etc/services.d/unbound# unbound-control status version: 1.13.1 verbosity: 0 threads: 1 modules: 3 [ subnet validator iterator ] uptime: 28 seconds options: reuseport control(ssl) unbound (pid 1925) is running...