mirror of
https://github.com/rroemhild/docker-test-openldap.git
synced 2026-04-25 15:15:53 +03:00
[GH-ISSUE #47] ldapsearch not connecting #29
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/docker-test-openldap#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ncphins on GitHub (Jul 21, 2023).
Original GitHub issue: https://github.com/rroemhild/docker-test-openldap/issues/47
I am fairly confident this is an issue with my setup, but I am struggling to get this setup and working. We are really wanting to use this for our integration testing of our project.
I have the container running on my Intel Mac. It seems to be running fine. I started it with the command line provided, and it is using port 389.

The port is in use:
$ lsof -i:389
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
com.docke 37827 xxxxxx 187u IPv6 0x35efde1bfd4dcf0d 0t0 TCP *:ldap (LISTEN)
I see logs every minute (which seems to indicate it is running):
2023-07-21 12:54:49 64bab859 conn=1046 fd=16 ACCEPT from IP=127.0.0.1:53282 (IP=0.0.0.0:10389)
2023-07-21 12:54:49 64bab859 conn=1046 op=0 BIND dn="cn=admin,dc=planetexpress,dc=com" method=128
2023-07-21 12:54:49 64bab859 conn=1046 op=0 BIND dn="cn=admin,dc=planetexpress,dc=com" mech=SIMPLE ssf=0
2023-07-21 12:54:49 64bab859 conn=1046 op=0 RESULT tag=97 err=0 text=
2023-07-21 12:54:49 64bab859 conn=1046 op=1 SRCH base="cn=admin,dc=planetexpress,dc=com" scope=2 deref=0 filter="(objectClass=*)"
2023-07-21 12:54:49 64bab859 conn=1046 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
2023-07-21 12:54:49 64bab859 conn=1046 op=2 UNBIND
2023-07-21 12:54:49 64bab859 conn=1046 fd=16 closed
However, when I attempt a simple ldapsearch, I get an error. I have tried several variations.
$ ldapsearch -x -b "dc=planetexpress,dc=com" -h localhost -p 389 -D "cn=admin,dc=planetexpress,dc=com" -W "(&(objectClass=person))"
Enter LDAP Password:
ldap_result: Can't contact LDAP server (-1)
I also tried (which I found in an older issue here):
$ ldapsearch -x -h localhost -p 389 -D "cn=Hubert J. Farnsworth,ou=people,dc=planetexpress,dc=com" -w "professor" -b "dc=planetexpress,dc=com" -s sub '(objectClass=*)' givenName
ldap_result: Can't contact LDAP server (-1)
I apologize for opening the issue for a case when I am confident I am doing something wrong, but I am not sure where to go from here.
@ncphins commented on GitHub (Jul 24, 2023):
I apologize but I opened this issue in the wrong location by accident. I have this container working properly with ldapsearch now on my Mac. I am closing this.