1

I'm trying to migrate our GLPI on Docker.

version: "3"
services:
    glpi1-front:
        restart: unless-stopped
        image: glpi1_front
        build: ./glpi1_front
        volumes:
            - "/var/_prod/volumes/glpi1/glpi/files:/var/www/html/files:rw"
            - "/var/_prod/volumes/glpi1/glpi/config:/var/www/html/config:rw"
        networks:
            glpi1-front-mysql-network:
            proxy-network:
                aliases:
                    - "glpi1"
    glpi1-mysql:
        restart: unless-stopped
        image: mariadb:latest
        networks:
            glpi1-front-mysql-network:
                aliases:
                    - "mysql"
        volumes:
            - "/var/_prod/volumes/glpi1/mysql:/var/lib/mysql:rw"
networks:
    glpi1-front-mysql-network:
    proxy-network:
        external:
            name: "reverse_proxy-glpi1-network"
  • LDAP config works on dedicated server
  • copied prod /var/lib/mysql in the container: it's working
  • config/config_db.php is ok (GLPI shows up so DB connection is ok)
  • Domain controller pings
  • TCPDUMP shows php reaching domain controller and DC replies

    09:20:24.474705 IP 192.168.96.3.52420 > 10.106.1.1.636: Flags [S], seq 979141056, win 29200, options [mss 1460,sackOK,TS val 1691184423 ecr 0,nop,wscale 7], length 0

    09:20:24.475006 IP 10.106.1.1.636 > 192.168.96.3.52420: Flags [S.], seq 3465462514, ack 979141057, win 8192, options [mss 1460,nop,wscale 8,sackOK,TS val 549593976 ecr 1691184423], length 0

    09:20:24.475027 IP 192.168.96.3.52420 > 10.106.1.1.636: Flags [.], ack 1, win 229, options [nop,nop,TS val 1691184423 ecr 549593976], length 0

    09:20:24.482416 IP 192.168.96.3.52420 > 10.106.1.1.636: Flags [P.], seq 1:338, ack 1, win 229, options [nop,nop,TS val 1691184431 ecr 549593976], length 337

    09:20:24.483234 IP 10.106.1.1.636 > 192.168.96.3.52420: Flags [P.], seq 1:1772, ack 338, win 8235, options [nop,nop,TS val 549593976 ecr 1691184431], length 1771
    [...]

But I still get the following error :

[2019-08-29 09:24:43] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/inc/toolbox.class.php line 659
  *** PHP Warning(2): ldap_bind(): Unable to bind to server: Can't contact LDAP server
  Backtrace :
  :
  inc/authldap.class.php:2575                        ldap_bind()
  inc/authldap.class.php:2604                        AuthLDAP::connectToServer()
  inc/auth.class.php:211                             AuthLDAP::tryToConnectToServer()
  inc/authldap.class.php:2723                        Auth->connection_ldap()
  inc/authldap.class.php:2778                        AuthLDAP::ldapAuth()
  inc/auth.class.php:757                             AuthLDAP::tryLdapAuth()
  front/login.php:84                                 Auth->login()
  {"user":"@75e0ec127885"}
[2019-08-29 09:24:43] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/inc/toolbox.class.php line 659
  *** PHP Warning(2): ldap_bind(): Unable to bind to server: Can't contact LDAP server
  Backtrace :
  :
  inc/authldap.class.php:2575                        ldap_bind()
  inc/authldap.class.php:2611                        AuthLDAP::connectToServer()
  inc/auth.class.php:211                             AuthLDAP::tryToConnectToServer()
  inc/authldap.class.php:2723                        Auth->connection_ldap()
  inc/authldap.class.php:2778                        AuthLDAP::ldapAuth()
  inc/auth.class.php:757                             AuthLDAP::tryLdapAuth()
  front/login.php:84                                 Auth->login()
  {"user":"@75e0ec127885","mem_usage":"0.003\", 1.76Mio)"}

TL;DR trafic goes through, but authentication does not work.

5
  • can you please get debug logs ? with something like ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);, you are using port 636 LDAPS im suspecting SSL verification problem here. I need debug logs to be sure
    – vx3r
    Aug 29, 2019 at 9:51
  • Yep : TLS: peer cert untrusted or revoked (0x142)
    – JeanneD4RK
    Aug 29, 2019 at 10:03
  • Followed instrucitons here link . Please post an answer with this link since you lead me to this way and I'll accept it as an answer.
    – JeanneD4RK
    Aug 29, 2019 at 10:10
  • You should post an answer yourself. Aug 29, 2019 at 10:25
  • 1
    Does this answer your question? Can't contact LDAP server (with ldaps) in Docker Aug 18, 2021 at 0:27

1 Answer 1

0

vx3r led me to check the cert problem, I found this post : Can't contact LDAP server (with ldaps) in Docker , now it's working.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .