Skip to content

Can't contact LDAP server (-1) for user when using openldap #100

@Marketos-Damigos

Description

@Marketos-Damigos

I am getting this error message when I try to login to the server as in #29 :

Unable to connect to LDAP server openldap
Error: Can't contact LDAP server (-1) for user
Failed to Authenticate to server
Invalid Username or Password.

If i use ldapsearch inside the container, using either the env variable or directly specifying openldap:1389 it works perfectly.
I have the following docker-compose file:

  openldap:
    image: bitnami/openldap:2.6-debian-10
    container_name: openldap
    environment:
      PUID: 1000
      PGID: 1000
      LDAP_ALLOW_ANON_BINDING: no
      LDAP_ADMIN_USERNAME: admin
      LDAP_ADMIN_PASSWORD: 
      LDAP_CUSTOM_LDIF_DIR: /ldifs
      LDAP_ROOT: dc=example,dc=com
    restart: always
    networks:
      web:
        ipv4_address: 172.20.0.43
    ports:
      - 1389:1389    
    volumes:
      - ./containers/openldap/ldifs:/ldifs:ro
      - ./containers/openldap/ldap:/bitnami/openldap
    labels:
      - traefik.enable=true
      ## HTTP Routers
      - "traefik.http.routers.openldap-rtr.entrypoints=https"
      - "traefik.http.routers.openldap-rtr.rule=Host(`openldap.$DOMAINNAME_CLOUD_SERVER`)"
      - "traefik.http.routers.openldap-rtr.tls=true"
      ## Middlewares
      # - "traefik.http.routers.wiki-rtr.middlewares=middlewares-oauth@file"
      ## HTTP Services
      - "traefik.http.routers.openldap-rtr.service=openldap-svc"
      - "traefik.http.services.openldap-svc.loadbalancer.server.port=1389"
      - "com.centurylinklabs.watchtower.enable=true"


  phpldapadmin:
    image: osixia/phpldapadmin:latest
    container_name: phpldapadmin
    environment:
      PHPLDAPADMIN_LDAP_HOSTS: "openldap:1389"
      PHPLDAPADMIN_HTTPS: "false"
    ports:
      - "9214:80"
    command: --loglevel=debug
    depends_on:
      - openldap
    networks:
      web:
        ipv4_address: 172.20.0.45
    restart: always

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions