[Pdns-users] Alternative way to log in pdns_recursor when OS holds Syslog hostage

Nicholas Williams nicholas at nicholaswilliams.net
Sat Nov 4 16:20:26 UTC 2017


I believe it was just some kind of facility conflict related to my quickly
switching between running it directly and running it via systemd. I changed
the facility to a different value and it started logging (running via
systemd). But then I restarted pdns_recursor to test something else and it
stopped logging. So I changed the facility again and it started logging
again. To test again, I restarted pdns_recursor and again it stopped
logging. So I just restarted the whole server (and left the facility alone)
and it started logging again after restarting the server. I've never seen
that behavior before, but best I can figure it was some kind of facility
conflict. ¯\_(ツ)_/¯

Thanks for your help!

Nick

On Sat, Nov 4, 2017 at 3:26 AM, Brian Candler <b.candler at pobox.com> wrote:

> On 04/11/2017 05:22, Nick Williams wrote:
>
>> If I start `/usr/sbin/pdns_recursor --daemon=no --write-pid=no
>> --disable-syslog=no` manually from the command prompt (as root), it logs to
>> syslog-ng perfectly. If I start it with `systemctl start pdns-recursor`, it
>> does not log to syslog-ng no matter what I do.
>>
>
> Assuming that the systemd unit file is starting pdns_recursor with the
> right flags - which it seems to be according to your ps output - then the
> two most likely differences are:
>
> 1. something to do with running as pdns user.  Try switching to the pdns
> user (with su) before starting pdns_recursor at the command line, and see
> if you get any additional output, and whether it can write to logs.
>
> 2. something to do with environment variables, although I'm not aware of
> any that pdns_recursor needs.
>
> You could also try attaching strace to the pdns_recursor process to see if
> you can see its attempts to find or open the log; that depends whether your
> tiny Linux distro has strace though.
>
> I am guessing this tiny Linux doesn't do SELinux or AppArmor, but might be
> worth checking.
>
> Sorry can't be more specific; those are just general Linux debugging hints.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20171104/d80a67d7/attachment.html>


More information about the Pdns-users mailing list