CZ-NIC / knot-resolver

Knot Resolver - resolve DNS names like it's 2024
https://www.knot-resolver.cz/
Other
364 stars 59 forks source link

Running resolver as service on macos will fail to run as a service #63

Closed jaysonsantos closed 5 years ago

jaysonsantos commented 5 years ago

Hey there, I am trying to use knot-resolver on macos as a service through homebrew but it fails because stdin is /dev/null. To reproduce it you can check with this:

make && sudo python -c 'import subprocess; subprocess.call(["daemon/kresd"], stdin=subprocess.DEVNULL)'

and this will be the output

[system] error error: couldn't start event poller
# I changed the code to also print the error that happened
Return of uv_strerror(ret): invalid argument%    

but that is funny that it only happens when install http lib with luarocks using this luarocks --lua-dir=/usr/local/opt/lua@5.1 --tree /usr/local/ install http CRYPTO_DIR=/usr/local/opt/openssl OPENSSL_DIR=/usr/local/opt/openssl/ i found out if i remove this guard or make it go to the else it spawns the daemon fine.

Let me know if you need more information to find out what the bug is

vcunat commented 5 years ago

Thanks! Removing the guard is the way to go: https://gitlab.labs.nic.cz/knot/knot-resolver/merge_requests/778

jaysonsantos commented 5 years ago

Cool, thank you!

vcunat commented 5 years ago

Merged and will be contained in future releases.