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.
````
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
````
````
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
````
v1.2.5 and v1.2.2 did not helppermissions.ldif did not helpAm I doing anything wrong or is this a bug?
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
Most helpful comment
Removing
domainnameandhostnamefrom thedocker-compose.ymlfixed this issue, thanks @asdftemp