[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Problem running slapd...




Angela Liang wrote:
> The error is:
> slapd[9030]: bind() failed errno 13 (Permission denied)

Looks like you are not starting slapd as root.  User processes on UNIX
cannot bind port numbers below 1024.  Since LDAP runs by default on
port 389, you have to start slapd as root or start it on a port number
over 1024.

> Is that because I use the option "--enable-passwd" in the configuration when I
> built?

No.

> How is the place to find out those error information.

On my system, man errno explains most error numbers, in particular, it
lists code EACCES as 'Permission denied'.  EACCES happens to be that
13 the message shows, but you don't actually need to know this, since
from the man page you get to know about EACCES from the 'Permission
denied' string.  Then man 2 bind tells me that:

       EACCES  The  address is protected, and the user is not the
               super-user.

You can also find the header file where the correspondence is defined,
but it can get tricky.  In theory, the program obtains those definitions
by including <errno.h>, typically, /usr/include/errno.h.  In practice,
that header can include other files.  In my case, a Linux RedHat 5.2:

	/usr/include/errno.h includes:
		/usr/include/errnos.h that includes:
			/usr/include/linux/errno.h that defines a few
			    codes and includes:
				/usr/include/asm/errno.h

The last file contains most error numbers, in its numerical form,
symbolic tag and, in my case, even a comment with the text.

There are lots of differences in this respect in systems.  Spare some
time one day to find out how your system does it so that you can get
to it in an emergency.

------------------------------------------------------------------------------------------------------------------
> Apr 28 14:31:58 shrike slapd[20572]: conn=0 op=0 BIND dn="" method=128
> Apr 28 14:31:58 shrike slapd[20572]: conn=0 op=0 RESULT err=0 tag=97 nentries=0
> Apr 28 14:31:58 shrike slapd[20572]: conn=0 op=1 SRCH base="O=UNIVERSITY OF MICHIGAN,C=US" scope=2 filter="(cn=MONITOR)"
> Apr 28 14:31:58 shrike slapd[20572]: conn=0 op=1 RESULT err=32 tag=101 nentries=0
> Apr 28 14:31:58 shrike slapd[20572]: conn=0 op=2 UNBIND
> Apr 28 14:31:58 shrike slapd[20572]: conn=0 op=2 fd=6 closed errno=11

You did not ask correctly for the monitor entry, 'cn=monitor' should be the base
and the universal filter (objectclass=*) your filter.  Like this:

	ldapsearch -s base -b 'cn=monitor' '(objectclass=*)'

> Apr 28 14:31:58 shrike slapd[20572]: conn=5 fd=6 connection from localhost (127.0.0.1) accepted.
> Apr 28 14:31:58 shrike slapd[20572]: conn=5 op=0 BIND dn="CN=MANAGER,O=UNIVERSITY OF MICHIGAN,C=US" method=128
> Apr 28 14:31:58 shrike slapd[20572]: conn=5 op=0 RESULT err=0 tag=97 nentries=0
> Apr 28 14:31:58 shrike slapd[20572]: conn=5 op=1 ADD dn="O=UNIVERSITY OF MICHIGAN,C=US"
> Apr 28 14:31:58 shrike slapd[20572]: next_id_read: could not open "./test-db/NEXTID"
> Apr 28 14:32:00 shrike slapd[20572]: conn=5 op=1 RESULT err=0 tag=105 nentries=0
> Apr 28 14:32:00 shrike slapd[20572]: conn=5 op=2 ADD dn="OU=PEOPLE,O=UNIVERSITY OF MICHIGAN,C=US"
> Apr 28 14:32:01 shrike slapd[20572]: conn=5 op=3 ADD dn="OU=GROUPS,O=UNIVERSITY OF MICHIGAN,C=US"
> Apr 28 14:32:01 shrike slapd[20572]: conn=5 op=2 RESULT err=0 tag=105 nentries=0
> Apr 28 14:32:02 shrike slapd[20572]: conn=5 op=3 RESULT err=0 tag=105 nentries=0

[Etc.]

Is this while running the tests?  What version you were running?  Maybe we
should make slapd report its version on syslog on start.

Julio