Docker-openldap: bind(6) failed errno=99 (Cannot assign requested address)

Created on 29 Sep 2019  路  2Comments  路  Source: osixia/docker-openldap

Hi.

I cannot create an openldap container with v1.3.0. I get the following error which crashes my openldap container:

Start OpenLDAP... production-ldap | Waiting for OpenLDAP to start... production-ldap | 5d90c989 @(#) $OpenLDAP: slapd (Jul 30 2019 16:24:19) $ production-ldap | Debian OpenLDAP Maintainers <[email protected]> production-ldap | 5d90c989 daemon: bind(6) failed errno=99 (Cannot assign requested address) production-ldap | 5d90c989 slapd stopped. production-ldap | 5d90c989 connections_destroy: nothing to destroy.

docker-compose.yml

````
version: '2'

services:
production-ldap:
container_name: production-ldap
domainname: "ldap.example.org"
hostname: "ldap.example.org"
image: osixia/openldap:stable
expose:
- "389"
volumes:
- /srv/openldap/ldap:/var/lib/ldap
- /srv/openldap/config/slapd.d:/etc/ldap/slapd.d
- ./permissions.ldif:/container/service/slapd/assets/config/bootstrap/ldif/custom/permissions.ldif
environment:
LDAP_ORGANISATION: "Example"
LDAP_DOMAIN: "ldap.example.org"
LDAP_BASE_DN: ""
LDAP_CONFIG_PASSWORD: "AAAA"
LDAP_ADMIN_PASSWORD: "BBBB"
LDAP_TLS: 'false'
LDAP_READONLY_USER: 'true'
LDAP_READONLY_USER_USERNAME: 'readonlyuser'
LDAP_READONLY_USER_PASSWORD: 'CCCC'
tty: true
stdin_open: true
command: "--copy-service --loglevel debug"
networks:
- production-network

production-ldap-phpldapadmin:
container_name: production-ldap-phpldapadmin
image: osixia/phpldapadmin:latest
ports:
- "9090:80"
environment:
PHPLDAPADMIN_LDAP_HOSTS: "production-ldap"
PHPLDAPADMIN_HTTPS: 'false'
PHPLDAPADMIN_TRUST_PROXY_SSL: 'true'
depends_on:
- production-ldap
networks:
- production-network

networks:
production-network:
external: true
````

permissions.ldif

````

disable anonymous login

dn: cn=config
changetype: modify
add: olcDisallows
olcDisallows: bind_anon

dn: cn=config
changetype: modify
add: olcRequires
olcRequires: authc

dn: olcDatabase={-1}frontend,cn=config
changetype: modify
add: olcRequires
olcRequires: authc
````

What I have tried

  • Changing to v1.2.5 and v1.2.2 did not help
  • Removing the permissions.ldif did not help
  • Using docker volumes and not the bind mounts dikd not help
  • Not using any volumes did not help

Am I doing anything wrong or is this a bug?

Most helpful comment

Removing domainname and hostname from the docker-compose.yml fixed this issue, thanks @asdftemp

All 2 comments

Hi this is "fixable" by removing the domainname: "ldap.example.org"(or make it a comment with a note if you ever have to start a new server somewhere else)

Credits go to jwpritchard found the solution in this comment comment

Removing domainname and hostname from the docker-compose.yml fixed this issue, thanks @asdftemp

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mzayikin picture mzayikin  路  3Comments

dalareo picture dalareo  路  5Comments

adambom picture adambom  路  6Comments

Cinux90 picture Cinux90  路  5Comments

gpcimino picture gpcimino  路  5Comments