簡體   English   中英

使用Zend_Ldap連接到遠程LDAP服務器時遇到問題

[英]Trouble Connecting to Remote LDAP Server using Zend_Ldap

我們正在嘗試使用Zend_Ldap通過訂戶的LDAP服務器對我們網站的用戶進行身份驗證。 我們已經有幾個客戶端已經設置並且可以正常工作,但是當我們添加一個新客戶端時,連接剛剛掛起,並且在30分鍾后(!),我們收到以下錯誤消息(沒有幫助):

0x51(無法聯系LDAP服務器):ldap:// xxxx

我知道的唯一其他調試步驟是使用ldapsearch 如果我只是執行ldapsearch -h xxxx ,那么很長一段時間都不會發生任何事情(我不想等待30分鍾,但我想我會收到“無法連接到LDAP服務器”錯誤),並且如果運行它使用-d5我得到以下輸出。

ldap_create
ldap_url_parse_ext(ldap://x.x.x.x)
ldap_extended_operation_s
ldap_extended_operation
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP x.x.x.x:389
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying x.x.x.x:389
ldap_pvt_connect: fd: 3 tm: -1 async: 0
ldap_open_defconn: successful
ldap_send_server_request
ber_scanf fmt ({it) ber:
ber_scanf fmt ({) ber:
ber_flush2: 31 bytes to sd 3
ldap_result ld 0x7f9ad5666410 msgid 1
wait4msg ld 0x7f9ad5666410 msgid 1 (infinite timeout)
wait4msg continue ld 0x7f9ad5666410 msgid 1 all 1
** ld 0x7f9ad5666410 Connections:
* host: x.x.x.x  port: 389  (default)
  refcnt: 2  status: Connected
  last used: Mon Jul 13 09:14:44 2015


** ld 0x7f9ad5666410 Outstanding Requests:
 * msgid 1,  origid 1, status InProgress
   outstanding referrals 0, parent count 0
  ld 0x7f9ad5666410 request count 1 (abandoned 0)
** ld 0x7f9ad5666410 Response Queue:
   Empty
  ld 0x7f9ad5666410 response count 0
ldap_chkResponseList ld 0x7f9ad5666410 msgid 1 all 1
ldap_chkResponseList returns ld 0x7f9ad5666410 NULL
ldap_int_select

<20+ minute delay>

read1msg: ld 0x7f9ad5666410 msgid 1 all 1
ber_get_next
ldap_err2string
ldap_start_tls: Can't contact LDAP server (-1)
ldap_free_request (origid 1, msgid 1)
ldap_free_connection 1 1
ldap_free_connection: actually freed

客戶端的LDAP服務器是Windows Server 2008 R2,我們正在使用Ubuntu 12.04.4 LTS和OpenLDAP 2.4.28中的ldapsearch。

關於下一步要解決的問題有什么建議嗎? 我的猜測是它位於客戶網絡中的某個位置,但是在開始詢問客戶之前,我想盡可能檢查一下自己的結局。

更新:

我補充說:

ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7);

到我的PHP腳本,並得到與ldapsearch返回的輸出相同的輸出。

總而言之,客戶端防火牆被設置為允許連接,但防火牆設置為不同的協議,因此深度數據包檢查將其關閉。 希望如果這一切發生在別人身上,將對您有所幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM