我正在尝试在 Docker 上迁移我们的 GLPI。
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 配置在专用服务器上运行
- 在容器中复制了 prod /var/lib/mysql:它正在运行
- config/config_db.php 正常(GLPI 出现,因此 DB 连接正常)
- 域控制器 ping
TCPDUMP 显示 php 已到达域控制器并且 DC 回复
09:20:24.474705 IP 192.168.96.3.52420 > 10.106.1.1.636:标志 [S],序列 979141056,win 29200,选项 [mss 1460,sackOK,TS val 1691184423 ecr 0,nop,wscale 7],长度 0
09:20:24.475006 IP 10.106.1.1.636 > 192.168.96.3.52420:标志 [S.],seq 3465462514,ack 979141057,win 8192,选项 [mss 1460,nop,wscale 8,sackOK,TS val 549593976 ecr 1691184423],长度 0
09:20:24.475027 IP 192.168.96.3.52420 > 10.106.1.1.636:标志[.],ack 1,win 229,选项[nop,nop,TS val 1691184423 ecr 549593976],长度0
09:20:24.482416 IP 192.168.96.3.52420 > 10.106.1.1.636:标志 [P.],seq 1:338,ack 1,win 229,选项 [nop,nop,TS val 1691184431 ecr 549593976],长度 337
09:20:24.483234 IP 10.106.1.1.636 > 192.168.96.3.52420:标志 [P.],seq 1:1772,ack 338,win 8235,选项 [nop,nop,TS val 549593976 ecr 1691184431],长度 1771
[...]
但我仍然收到以下错误:
[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 流量通过,但身份验证不起作用。
答案1
vx3r 引导我检查证书问题,我发现了这篇帖子:无法在 Docker 中联系 LDAP 服务器(使用 ldaps),现在它可以正常工作了。