All, Running OpenLDAP 2.3.32 on Ubuntu 6.06.1 x86. slapd fails to start. If anyone could shed some light on why that would be great. Below is strace output. It looks like it is having some problems with syslog. Is there anyway to have slapd use some other logging mechanism?
strace output: root@ssdelta:/var/run/slapd# strace slapd -h 'ldap:/// ldaps:/// ldapi:///' execve("/usr/sbin/slapd", ["slapd", "-h", "ldap:/// ldaps:/// ldapi:///"], [/* 19 vars */]) = 0 uname({sys="Linux", node="ssdelta", ...}) = 0 brk(0) = 0x8143000 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f73000 . . (lines omitted for brevity sake) . open("/root/ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory) open("/root/.ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory) open("ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory) socket(PF_FILE, SOCK_DGRAM, 0) = 3 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0 time([1175874880]) = 1175874880 open("/etc/localtime", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 fstat64(4, {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f70000 read(4, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) = 1017 close(4) = 0 munmap(0xb7f70000, 4096) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 send(3, "<167>Apr 6 08:54:40 slapd[28178"..., 145, MSG_NOSIGNAL
and slapd hangs at this point.
Tim Garton wrote, on 14-04-2007 01:59:
Running OpenLDAP 2.3.32 on Ubuntu 6.06.1 x86. slapd fails to start. If anyone could shed some light on why that would be great. Below is strace output. It looks like it is having some problems with syslog. Is there anyway to have slapd use some other logging mechanism?
[...]
and slapd hangs at this point.
In my experience the best debugging of *this kind of thing* is not by running strace or any other trace debugger, but the native logging built into slapd.
Start the daemon from the CLI, as you apparently have done, *with the correct user* and other parameters, and add anything from 'd -1' thru '-d 1 ... 256'.
To find out what these do consult first the admin guide for your OL version, then 'man slad.conf' and look for loglevel <integer> [...].
Obviously slaptest (configuration test) has passed for your setup, or you couldn't have started the daemon.
Best,
--Tonni
On 4/13/07, Tim Garton tim.garton@monsoonworks.com wrote:
All, Running OpenLDAP 2.3.32 on Ubuntu 6.06.1 x86. slapd fails to start. If anyone could shed some light on why that would be great. Below is strace output. It looks like it is having some problems with syslog. Is there anyway to have slapd use some other logging mechanism?
strace output: root@ssdelta:/var/run/slapd# strace slapd -h 'ldap:/// ldaps:/// ldapi:///' execve("/usr/sbin/slapd", ["slapd", "-h", "ldap:/// ldaps:/// ldapi:///"], [/* 19 vars */]) = 0 uname({sys="Linux", node="ssdelta", ...}) = 0 brk(0) = 0x8143000 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f73000 . . (lines omitted for brevity sake) . open("/root/ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory) open("/root/.ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory) open("ldaprc", O_RDONLY) = -1 ENOENT (No such file or directory) socket(PF_FILE, SOCK_DGRAM, 0) = 3 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0 time([1175874880]) = 1175874880 open("/etc/localtime", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 fstat64(4, {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f70000 read(4, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 4096) = 1017 close(4) = 0 munmap(0xb7f70000, 4096) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 send(3, "<167>Apr 6 08:54:40 slapd[28178"..., 145, MSG_NOSIGNAL
and slapd hangs at this point.
Instead of jumping right to strace, can you post the output of starting slapd with full debugging? (slapd -d -1)
matthew sporleder wrote:
On 4/13/07, Tim Garton tim.garton@monsoonworks.com wrote:
All, Running OpenLDAP 2.3.32 on Ubuntu 6.06.1 x86. slapd fails to start. If anyone could shed some light on why that would be great. Below is strace output. It looks like it is having some problems with syslog. Is there anyway to have slapd use some other logging mechanism?
munmap(0xb7f70000, 4096) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1017, ...}) = 0 send(3, "<167>Apr 6 08:54:40 slapd[28178"..., 145, MSG_NOSIGNAL
and slapd hangs at this point.
Instead of jumping right to strace, can you post the output of starting slapd with full debugging? (slapd -d -1)
No point in that. The strace output clearly shows that syslog() is hanging. Specifically, the send() on the Unix Domain socket that the syslog daemon ought to be listening on. This is obviously a problem with either the OS or the syslog daemon, and no amount of OpenLDAP debugging will shed any further light on it. The right way to solve this problem is to identify why the syslog daemon isn't listening, but that's not a question for the OpenLDAP Software list to resolve.
The workaround, to disable slapd's use of syslog, is to read the slapd(8) manpage and look at the command line options pertaining to syslog.
openldap-software@openldap.org