-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Can't contact LDAP server (-1) for user when using openldap #29
Comments
@Karel-van-de-Plassche, I got it working with the following docker-compose file. Note that it doesn't using docker links, since they are superseded by networks. version: '2'
services:
ldap-host:
image: osixia/openldap:1.1.8
networks:
mynet:
environment:
- LDAP_ORGANISATION="My Company"
- LDAP_DOMAIN=my-company.com
- LDAP_ADMIN_PASSWORD=admin
ldap-admin:
image: osixia/phpldapadmin:0.6.12
networks:
mynet:
ports:
- "6080:80"
environment:
- PHPLDAPADMIN_LDAP_HOSTS=ldap-host
- PHPLDAPADMIN_HTTPS=false
networks:
mynet:
driver: bridge
ipam:
config:
- subnet: 172.31.0.0/16
gateway: 172.31.0.1 |
Thanks for this workaround. In the end, I worked around it by creating my own image. Somehow then it works with the default docker-compose network. |
For all those poor souls that end up here alongside myself - the issue in this case (or at least what it was for me) was that you should NOT use quotation marks when defining the ENV variable Example (from first compose file snippet):
|
In my case it was the host computer firewall. The two docker container (openldap and phpldapadmin) can ping each other, but can not see any other port. Turning off firewall solved this problem. (Better is you configure firewall) |
Setting up a new network resolved the issue for me. It doesn’t require a subnet or a gateway. The problem arose because the default network created doesn’t have
|
Using the following docker-compose file, I cannot log in on the phpLDAPadmin page:
Gives errors:
When I log into
phpldapadmin-service
usingand install ldap-utils, I can connect to the ldap-host correctly:
Also, starting the containers using
docker run
works correctly:The text was updated successfully, but these errors were encountered: