dhcp 4.3.2 with ldap backend

Kristof Van Doorsselaere kristof.vandoorsselaere at hogent.be
Tue May 12 08:06:50 UTC 2015


Peter

On 12/05/15 09:08, "Peter Rathlev" <peter at rathlev.dk> wrote:

>On Mon, 2015-05-11 at 13:07 +0000, Kristof Van Doorsselaere wrote:
>> The fact I’m always getting: configuration file errors encountered, make me think this is a new bug, isn’t it?
>
>It sure does sound something like that. A few other possible ideas:
>
>You mentioned that tcpdump on the LDAP server shows nothing. What about
>a local tcpdump on the DHCP server, using the "any" interface?

I ran tcpdump locally today on the dhcp server, and again I do don’t see any outgoing data during dhcpd startup attempt

>
>Does the daemon start and release the PTY, just logging the errors to
>syslog? Or does it not release the PTY and dump the syntax error to
>STDERR? I would expect the latter for an actual configuration syntax
>error. I'm not sure how systemd's systemctl starts a daemon and if you
>would actually see the STDERR output.

I’m currently testing manually (so avoiding systemd), and output looks like this:

[root at new_server dhcp-4.3.2]# dhcpd  -4 -pf /run/dhcpd4.pid -cf /etc/dhcp/dhcp_test.conf -lf /var/db/dhcpd/dhcpd4.leases -d -tf /tmp/debug
Internet Systems Consortium DHCP Server 4.3.2
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
WARNING: Overwriting trace file "/tmp/debug"
Cannot set LDAP TLS crl check option: Can't contact LDAP server
Cannot init ldap session to ldap://ldaptest.example.com:389
Configuration file errors encountered -- exiting


If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging..


exiting.
[root at new_server dhcp-4.3.2]# echo $?
1
[root at new_server dhcp-4.3.2]# ps aux | grep dhcp | grep -v grep
[root at new_server dhcp-4.3.2]#
[root at new_server dhcp-4.3.2]#

In the dhcp_test.conf I have: log-facility local4;

Rsyslog redirects local4 to:


local4.*                                                /var/log/dhcpd4.log

During startup nothing is logged to this file (while trying to start 4.3.2), so I think its not releasing the PTY and dumping the syntax error to
STDERR



>
>You could also try starting the daemon in the foreground (-f) in an
>"strace" session and look at what actually happens. Like if the daemon
>actually creates a socket ("socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)")
>and what the "connect" returns.

I tried but I don’t see a different behavior while using -f to run in foreground

[root at new_server dhcp-4.3.2]# dhcpd  -4 -pf /run/dhcpd4.pid -cf /etc/dhcp/dhcp_test.conf -lf /var/db/dhcpd/dhcpd4.leases -f
Internet Systems Consortium DHCP Server 4.3.2
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Cannot set LDAP TLS crl check option: Can't contact LDAP server
Cannot init ldap session to ldap://ldaptest.example.com:389
Configuration file errors encountered -- exiting


If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug.  These pages explain the proper
process and the information we find helpful for debugging..


exiting.
[root at new_server dhcp-4.3.2]#


For extra debugging, I started with strace, output is attached as file: strace_output.txt

I also tried to start with gdb, to see some more debug output, but it’s hard for me to tell where it goes wrong as I’m not a developer

Gdb output is attached as gdb_output.txt

Kristof



>
>I'm afraid we don't use the LDAP backend and I try to avoid Windows RHEL
>2007 like the plague. Not a fan of systemd on servers. :-)
>
>-- 
>Peter
>
>
>_______________________________________________
>dhcp-users mailing list
>dhcp-users at lists.isc.org
>https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: strace_putput.txt
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20150512/07da2f3d/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gdb_output.txt
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20150512/07da2f3d/attachment-0003.txt>


More information about the dhcp-users mailing list