Каталог ldap ошибка операции

Собственно, возникла задача: можно ли сделать общую адресную книгу Outlook для всех пользователей домена без использования сервера Exchange. Что, собственно,

Собственно, возникла задача: можно ли сделать общую адресную книгу Outlook для всех пользователей домена без использования сервера Exchange. Что, собственно, имеется: домен Active Directore, клиентские ОС (Windows Xp SP3 и Windows 7) и установленный на них MS Outlook версий 2003/2007/2010. Необходимо чтобы все пользователи домена в Outlook имели общий список внешних контактов.

При реализации этой задачки рассматривались различные варианты, начиная от необходимости разработки скриптов по синхронизации контактов между клиентами до различных сторонних решений. Однако все это было признано достаточно трудоемким и неудобным, пока в голову не пришла идея – а что если воспользоваться уже имеющейся единой базой данных под именем Active Directory для хранения информации обо всех общих контактах. Поэтому стали копать в сторону поддержки LDAP в Outlook (которая как оказывается имеется!!!).

Подготовительные шаги. В структуре Active Directory создадим отдельный организационный элемент OU, с именем, например, Contact. В данной OU будут храниться все наши внешние контакты. Заполним созданный нами OU элементами AD типа «Контакты», задав им необходимые имена и email адреса (у контактов обязательно должные быть заполнены поля Display Name и E-mail).

Контакты Active Directory

Настроим клиент Outlook на использование общей базы контактов по LDAP. В данной инструкции я буду настраивать Outlook 2010, в Outlook 2007/2003 процедура аналогично за исключением различий в интерфейсе и расположении/названии пунктов меню, я думаю, вы сами все найдете.

Настройка Outlook 2010 на общую адресную книгу LDAP

  1. Откроем Outlook 2010 и перейдем к настройке учетной записи почты (File-> Info-> Account Settings) настройка outlook 2010
  2. Перейдите на вкладку Адресные книги (Address Books) и создадим новую адресную книгу (New) Новая адрессная книга в outlook
  3. Тип адресной книги выберем Internet Directory Service (LDAP)
  4. В качестве имени сервера укажем FQDN имя ближайшего к нам контроллера домена Active Directory (у меня это dc1.wintpro.ru) и перейдем в раздел дополнительной настройки (More Settings) Адресная книга ldap
  5. Перейдем на вкладку Search и в поле Custom укажем DN имя ранее созданного организационного юнита Active Directory, в котором хранится список контактов для нашей адресной книги (ou=contact,dc=winitpro,dc=ru) и включаем опцию “Enable Browsing” ldap запрос к active directory из outlook
  6. Сохраняем все изменения и перезапускаем Outlook
  7. Открываем Outlook. Запускаем адресную книгу. В качестве источника контактов выбираем адресную книгу с именем dc1.winitpro.ru. И, о чудо, перед вами появится список всех контактов, заведенных вами в Active Directory. Данную адресную книгу можно задать в качестве дефолтной. Адресная книга outlook 2010 из active directory

Таким образом, мы настроили наш Outlook 2010 на использование общей адресной книги контактов, хранящейся в каталоге AD.

Содержание

  1. Глава 12. Ошибки и устранение неисправностей LDAP
  2. Стандартные сообщения об ошибках LDAP
  3. Журналы OpenLDAP

Глава 12. Ошибки и устранение неисправностей LDAP

Иногда OpenLDAP подвергается критике за скудность сообщений об ошибках и слабую диагностику. Отчасти это связано с генеральной линией стандартизации сообщений об ошибках, ограничивающей возможности реализаций служб каталогов по выдаче более информативных и творческих сообщений (справедливости ради стоит отметить, что в стандартах предусмотрено наличие в сообщении текстового элемента для более точного освещения проблемы), отчасти с тем, что многие сообщения об ошибках выводятся через клиентские программы, которые могут делать серьёзные искажения исходных диагностических сообщений.

Лучший источник диагностической информации — журналы OpenLDAP необходимого уровня (безусловно, наиболее полный из которых loglevel -1).

Ниже мы приводим некоторые сведения о том, как правильно читать журналы OpenLDAP, а также стандартные сообщения об ошибках LDAP с некоторыми подсказками о том, в чём может заключаться причина ошибки.

Стандартные сообщения об ошибках LDAP

Данные сообщения об ошибках определены в разделе 4.1.9 RFC 4511, черновом RFC LDAP C API (датированным 2000-м годом), а также выяснены путём изучения заголовочного файла LDAPResult.h дистрибутива OpenLDAP.

Название ошибки Номер Пояснения/причины
LDAP_SUCCESS 0 (x’00) Успешное завершение запроса.
LDAP_OPERATIONS_ERROR 1 (x’01) Произошла ошибка операции.
LDAP_PROTOCOL_ERROR 2 (x’02) Обнаружено нарушение протокола.
LDAP_TIMELIMIT_EXCEEDED 3 (x’03) Превышено ограничение по времени LDAP.
LDAP_SIZELIMIT_EXCEEDED 4 (x’04) Превышено ограничение по размеру LDAP.
LDAP_COMPARE_FALSE 5 (x’05) Операция сравнения вернула «ложь».
LDAP_COMPARE_TRUE 6 (x’06) Операция сравнения вернула «истину».
LDAP_STRONG_AUTH_NOT_SUPPORTED 7 (x’07) Сервер LDAP не поддерживает строгую аутентификацию.
LDAP_STRONG_AUTH_REQUIRED 8 (x’08) Для данной операции требуется прохождение строгой аутентификации.
LDAP_PARTIAL_RESULTS 9 (x’09) Возвращены только частичные результаты.
LDAP_REFERRAL 10 (x’0A) Указывает, что в ответе присутствует отсылка LDAP. Данное сообщение будет содержать один или несколько LDAP URL, по которым клиент должен перенаправить последующие операции для получения данного DN.
LDAP_ADMINLIMIT_EXCEEDED 11 (x’0B) Указывает на то, что какие-либо ограничения, установленные на стороне сервера на количество записей, возвращаемое при поиске, были превышены.
LDAP_UNAVAILABLE_CRITICAL_EXTENSION 12 (x’0C) Указывает на то, что элемент управления или правило соответствия, запрашиваемые в операции, не поддерживаются данным сервером.
LDAP_CONFIDENTIALITY_REQUIRED 13 (x’0D) Конфигурация данного сервера требует обеспечения какой-либо формы конфиденциальности (TLS/SSL или SASL) при выполнении подсоединения с предоставляемым DN, например, определённая на глобальном уровне или в разделе database директива security может требовать соблюдения некоторой формы SSF при выполнении simple_bind или операции обновления.
LDAP_SASL_BIND_IN_PROGRESS 14 (x’0E) Данный сервер в настоящий момент выполняет SASL-подсоединение и в этом контексте запрашиваемая операция является неверной.
15 (x’0F) Не используется.
LDAP_NO_SUCH_ATTRIBUTE 16 (x’10) Указанный в запросе атрибут не присутствует в записи.
LDAP_UNDEFINED_TYPE 17 (x’11) Указанный в запросе тип атрибута был неверным.
LDAP_INAPPROPRIATE_MATCHING 18 (x’12) Указывает на то, что правило соответствия с расширяемым фильтром соответствия не поддерживается для указываемого типа атрибута.
LDAP_CONSTRAINT_VIOLATION 19 (x’13) Указываемое в операции значение атрибута нарушает некоторые ограничения.
Возможные причины:
1. Строка слишком большой длины.
2. Неверный тип — строка записывается в числовой атрибут.
3. Неправильное значение, например, атрибут может принимать только определённое значение, либо одно из набора значений.
LDAP_TYPE_OR_VALUE_EXISTS 20 (x’14) Указываемый тип атрибута или значение атрибута уже присутствует в записи.
Возможные причины:
1. При добавлении записи — один или несколько атрибутов в LDIF (или операции добавления/замены) для записи в точности совпадают (дублируются).
LDAP_INVALID_SYNTAX 21 (x’15) Было указано неверное значение атрибута.
22 — 31 (x’16 — x’1F). Не используются.
LDAP_NO_SUCH_OBJECT 32 (x’20) Указанная запись не существует в каталоге (DIT).
LDAP_ALIAS_PROBLEM 33 (x’21) Псевдоним в DIT указывает на несуществующую запись.
LDAP_INVALID_DN_SYNTAX 34 (x’22) Был указан синтаксически неверный DN. Может также возникнуть, если Вы используете файл в формате LDIF (dn: cn=xxx и т.д.) с утилитой ldapdelete, которой требуется только указание простого DN.
35 (x’23) Зарезервировано и не используется в LDAPv3 (LDAPv2: LDAP_IS_LEAF — указанный объект является листовым, то есть у него нет дочерних объектов).
LDAP_ALIAS_DEREF_PROBLEM 36 (x’24) Возникла проблема при разыменовании псевдонима. Смотрите также описание ошибки 33.
37 — 47 (x’25 — x’2F). Не используются.
LDAP_INAPPROPRIATE_AUTH 48 (x’30) Была указана проверка подлинности, которую невозможно осуществить, например, была указана LDAP_AUTH_SIMPLE, а у записи нет атрибута userPassword.
LDAP_INVALID_CREDENTIALS 49 (x’31) Были предоставлены неверные учётные данные, например, неправильный пароль.
Дополнительный текст: unable to get TLS Client DN (невозможно получить DN клиента TLS).
Возможные причины:
1. Не предоставлен сертификат клиента в случае, если директива TLSVerifyClient установлена в ‘demand’.
2. Не предоставлен сертификат клиента в случае, если директива TLSVerifyClient установлена в ‘never’. В этом случае данное сообщение об ошибке не является фатальным и обслуживание клиента продолжается.
LDAP_INSUFFICIENT_ACCESS 50 (x’32) У данного пользователя недостаточно прав доступа на осуществление запрашиваемой операции.
LDAP_BUSY 51 (x’33) Данный сервер (DSA) слишком занят, чтобы выполнить запрашиваемую операцию.
LDAP_UNAVAILABLE 52 (x’34) DSA недоступен. Он может быть, например, остановлен, поставлен на паузу или находится в процессе инициализации.
LDAP_UNWILLING_TO_PERFORM 53 (x’35) Данный сервер (DSA) не желает выполнять запрашиваемую операцию.
Дополнительный текст: no global superior knowledge (нет сведений о глобальном вышестоящем каталоге) — имя записи, которую собираются добавить или модифицировать, не находится ни в одном из контекстов именования и у сервера нет правильной отсылки на вышестоящий каталог.
Возможная причина: не задан атрибут olcSuffix (директива suffix в slapd.conf) для DIT, на которое идёт ссылка.
Дополнительный текст: Shadow context; no update referral (теневой контекст (реплика); отсылки для выполнения обновлений не указано) — DIT, в которое собираются вносить изменения, является репликой в режиме «только для чтения», и, из-за отсутствия директивы updateref, невозможно возвратить отсылку.
Возможные причины:
1. Была попытка произвести запись в реплику «только для чтения» (в конфигурации syncrepl потребитель всегда в режиме «только для чтения»).
2. В конфигурации syncrepl multi-master в файле slapd.conf возможно пропущена директива mirrormode true.
3. Если slapd при запуске использовал файл slapd.conf, а директория slapd.d (cn=config) также существует, то при последующих модификациях DIT могут возникать ошибки с выдачей этого сообщения. В частности, в FreeBSD требуется наличие явного указания в rc.conf (slapd_cn_config=»YES») для принудительного использования slapd.d.
LDAP_LOOP_DETECT 54 (x’36) Выявлено зацикливание.
54 — 59 (x’37 — x’3B). Не используются.
LDAP_SORT_CONTROL_MISSING 60 (x’3C) В стандартах не используется. Только для Sun LDAP Directory Server. Сервер не получил требуемый элемент управления сортировки на стороне сервера.
LDAP_RANGE_INDEX_ERROR 61 (x’3D) В стандартах не используется. Только для Sun LDAP Directory Server. Результаты запроса превысили диапазон, указанный в запросе.
62 — 63 (x’3E — x’3F). Не используются.
LDAP_NAMING_VIOLATION 64 (x’40) Указывает на то, что данный запрос содержит нарушение именования в отношении текущего DIT.
LDAP_OBJECT_CLASS_VIOLATION 65 (x’41) Произошло нарушение объектного класса при использовании текущего набора схемы данных, например, при добавлении записи был пропущен обязательный (must) атрибут.
LDAP_NOT_ALLOWED_ON_NONLEAF 66 (x’42) Операция на нелистовой записи (то есть той, у которой есть дочерние записи) не разрешается.
LDAP_NOT_ALLOWED_ON_RDN 67 (x’43) Операция над RDN, например, удаление атрибута, использующегося в качестве RDN в DN, не разрешается.
LDAP_ALREADY_EXISTS 68 (x’44) Данная запись уже существует в этом DIT.
LDAP_NO_OBJECT_CLASS_MODS 69 (x’45) Не разрешена модификация объектного класса.
LDAP_RESULTS_TOO_LARGE 70 (x’46) Только C API (черновой RFC). Результаты слишком велики и не могут содержаться в данном сообщении.
LDAP_AFFECTS_MULTIPLE_DSAS 71 (x’47) Указывает на то, что операцию необходимо выполнить на нескольких серверах (DSA), а это не разрешено.
72 — 79 (x’48 — x’4F). Не используются.
LDAP_OTHER 80 (x’50) Произошла неизвестная ошибка.
Возможная причина:
Попытка удаления атрибута (особенно в cn=config), удаление которого запрещено.
Дополнительный текст: olcDbDirectory: value #0: invalid path: No such file or directory
Возможная причина: перед инициализацией новой базы данных директория для её размещения должна существовать.
LDAP_SERVER_DOWN 81 (x’51) Только C API (черновой RFC). Библиотека LDAP не может связаться с LDAP-сервером.
LDAP_LOCAL_ERROR 82 (x’52) Только C API (черновой RFC). Произошла некоторая локальная ошибка. Обычно это неудачная попытка выделения динамической памяти.
LDAP_ENCODING_ERROR 83 (x’53) Только C API (черновой RFC). Произошла ошибка при кодировании параметров, отправляемых на LDAP-сервер.
LDAP_DECODING_ERROR 84 (x’54) Только C API (черновой RFC). Произошла ошибка при декодировании результатов, полученных от LDAP-сервера.
LDAP_TIMEOUT 85 (x’55) Только C API (черновой RFC). При ожидании результатов было превышено ограничение по времени.
LDAP_AUTH_UNKNOWN 86 (x’56) Только C API (черновой RFC). В ldap_bind() был указан неизвестный метод аутентификации.
LDAP_FILTER_ERROR 87 (x’57) Только C API (черновой RFC). Операции ldap_search() был предоставлен неправильный фильтр (например, количество открывающихся и закрывающихся скобок в фильтре не совпадает).
LDAP_USER_CANCELLED 88 (x’58) Только C API (черновой RFC). Указывает на то, что пользователь прервал запрошенную операцию.
LDAP_PARAM_ERROR 89 (x’59) Только C API (черновой RFC). Процедура ldap была вызвана с неверными параметрами.
LDAP_NO_MEMORY 90 (x’5A) Только C API (черновой RFC). Выделение памяти (например, с помощью malloc(3) или другого механизма динамического выделения памяти) вызвало сбой в процедуре из библиотеки ldap.
LDAP_CONNECT_ERROR 91 (x’5B) Только C API (черновой RFC). Библиотека/клиент не может соединиться с LDAP-сервером, указанным в URL.
LDAP_NOT_SUPPORTED 92 (x’5C) Только C API (черновой RFC). Указывает на то, что в запросе используется функция, не поддерживаемая данным сервером.
LDAP_CONTROL_NOT_FOUND 93 (x’5D) Только C API (черновой RFC). Запрашиваемый элемент управления не найден на данном сервере.
LDAP_NO_RESULTS_RETURNED 94 (x’5E) Только C API (черновой RFC). Запрашиваемая операция завершилась успешно, но никаких результатов возвращено (получено) не было.
LDAP_MORE_RESULTS_TO_RETURN 95 (x’5F) Только C API (черновой RFC). Запрашиваемая операция завершилась успешно, но должны быть возвращены дополнительные результаты, которые можно уместить в текущее сообщение.
LDAP_CLIENT_LOOP 96 (x’60) Только C API (черновой RFC). Клиент выявил зацикливание, например, при следовании по отсылкам.
LDAP_REFERRAL_LIMIT_EXCEEDED 97 (x’61) Только C API (черновой RFC). Сервер или клиент превысил какое-либо установленное ограничение при следовании по отсылкам.

Журналы OpenLDAP

В данном разделе показаны журналы OpenLDAP с нашими пояснениями. Строки, начинающиеся с # — комментарии, добавленные в целях пояснения, в нормальных журналах (логах) их не будет.

Проблемы, комментарии, предположения, исправления (включая битые ссылки) или есть что добавить? Пожалуйста, выкроите время в потоке занятой жизни, чтобы написать нам, вебмастеру или в службу поддержки. Оставшийся день Вы проведёте с чувством удовлетворения.

Источник

Most LDAP result codes are intended to be included in responses from the directory server to the client. However, there are also a number of possible client-side error conditions that may arise in the course of attempting to process operations, and it’s often convenient for LDAP APIs to allow developers to treat those client-side problems in the same way that they would treat an error response from the server.

There are a couple of specifications, draft-ietf-ldapext-ldap-c-api and draft-ietf-ldapext-ldap-java-api, that suggest APIs that C-based and Java-based libraries could expose to facilitate communication with an LDAP directory server. Although you can certainly debate how good the proposed APIs are (and there are many LDAP libraries that have chosen to expose different interfaces), they are at the very least useful because they define a number of result codes that can be used to represent client-side error conditions. This chapter explores these client-side result codes.

serverDown (81)

The serverDown result code doesn’t necessarily mean that the directory server has gone down. It merely indicates that an existing connection to the server is no longer valid. Some of the possible reasons for this result code include:

  • The directory server (or the system, virtual machine, or container on which it was running) crashed or was shut down.
  • The server closed the connection (for example, because the connection remained idle for too long).
  • An administrator caused the connection to be terminated.
  • A networking problem interfered with the communication between the client and the server, or a piece of networking hardware is configured to drop connections after they are idle for too long.
  • The client attempted to negotiate a security layer (for example, with a StartTLS extended request), but a problem was encountered.

Regardless of the cause of the connection closure, the client will need to re-establish the connection, or establish a connection to a different server, before it can submit additional requests.

In the event that the directory server software closed the connection to the client (whether because it was being shut down or for some other reason), it may send a notice of disconnection unsolicited notification with a reason for the closure. Clients should watch for unsolicited notifications because if the server does send a notice of disconnection, it can help the client detect and react to certain connection closures more quickly.

localError (82)

The localError result code indicates that a problem occurred in the client for which none of the other client-side result codes is more appropriate. It’s the client-side equivalent of the other (80) result code, and it often means that an unexpected error has occurred in the library that the client is using to perform LDAP communication.

encodingError (83)

The encodingError result code indicates that a problem occurred while the client was attempting to encode a request to send to the directory server. This is not a commonly-used result code, since there are other result codes that are more appropriate for many of the conditions that can lead to encoding failures (for example, paramError (89) if there is a problem with one of the request parameters, or noMemory (90) if a problem occurs while attempting to allocate memory to hold the request).

decodingError (84)

The decodingError result code indicates that a problem occurred while the client was trying to decode a response received from the directory server. This generally means that either the server sent a malformed response or that the LDAP client library has a bug in it that prevents it from parsing a valid response.

timeout (85)

The timeout result code indicates that the client did not receive an expected response to a request after waiting for some maximum length of time. Clients often provide some mechanism for configuring the maximum request time limit (whether global, connection-wide, or operation-specific), and if that time limit is reached without receiving a response, then the client will stop waiting for the response and report an error with this result code.

Optionally, the client may also send an abandon or cancel request to the directory server to indicate that it should stop processing the operation, but the client should not assume that the server will not complete the associated processing. If the request was for a write operation, then the requested change may still eventually be applied.

authUnknown (86)

The authUnknown result code indicates that the client attempted to process some kind of authentication (presumably, a SASL mechanism) that the LDAP library does not recognize or support.

filterError (87)

The filterError result code indicates that the LDAP client encountered an error related to a search filter. This usually means that the client encountered a problem while trying to parse a string as a search filter, but there may be other cases in which it may be used. For example, the matched values request control (described in RFC 3876) may be used to indicate that the server should only return values for a specified attribute that match a given filter, but not all filter types may be used in conjunction with this filter, and an attempt to include an unsupported filter type may trigger the filterError result code.

userCanceled (88)

The userCanceled result code indicates that the operation was canceled by the client. It may have been interactively canceled (for example, by pressing Ctrl+C on a command-line tool, or clicking a cancel button in a graphical interface), or it may have been automatically generated by the client for some reason (for example, because another thread using the same connection sent an abandon request for the operation).

paramError (89)

The paramError result code indicates that the client application or end user provided an inappropriate value for some parameter. This may be an invalid argument for a function or method, an invalid value provided for a command-line argument, illegal input into some form field, or any other area in which the LDAP client API may encounter and reject invalid data.

noMemory (90)

The noMemory result code indicates that the client encountered a memory-related problem during processing. It usually means that the client failed to allocate memory or its memory consumption would have exceeded some maximum allowed amount.

connectError (91)

The connectError result code indicates that the client encountered a problem while attempting to establish a connection to the directory server. There are a number of potential reasons for this result code, including:

  • The directory server is currently down or not accepting new connections.
  • A networking problem prevents the client from reaching the directory server.
  • There was a problem negotiating a security layer between the client and the server (for example, the server’s certificate is expired of the client doesn’t trust it).
  • The client encounters a connection timeout before the connection can be established.

The connectError result code is different from the serverDown (81) result code in that connectError applies when trying to establish a new connection, while serverDown applies when the client detects that an already-established connection is no longer valid.

notSupported (92)

The notSupported result code indicates that the client attempted to perform some operation that is not supported by the LDAP client library. This result code should only be used if there isn’t another result code that is more specific to the condition at hand. For example, if the client is trying to use an unsupported SASL mechanism, then the authUnknown (86) result code is more appropriate. Or if the client doesn’t support StartTLS, then the tlsNotSupported (112) result code is more appropriate.

controlNotFound (93)

The controlNotFound result code indicates that a response received from the directory server did not include an expected response control. There are a number of request controls that, if successfully processed, should cause the result to include a corresponding response control. This result code may be used if the client expected a particular response control to be returned, but it wasn’t found in the response.

noResultsReturned (94)

The noResultsReturned result code indicates that the client didn’t receive any expected response messages (in addition to the final response indicating that the operation has completed). This usually means that the client expected the server to return one or more entries in response to a search operation, but it could also apply to search result references or intermediate responses.

moreResultsToReturn (95)

The moreResultsToReturn result code indicates that the client has received some of the responses for an operation, but that it also expects there are more responses available to be retrieved. The most likely use for this result code would be for the case in which the client attempts to retrieve only a portion of search results with the simple paged results control (RFC 2696) or the virtual list view request control (draft-ietf-ldapext-ldapv3-vlv). If the server returns all of the entries in the page of results, but the response indicates that there may be more pages that can be returned, the client may use this result code to indicate that. However, there may also be other uses for this result code involving a case in which the client expects that there may be search result entries, search result references, or intermediate responses.

clientLoop (96)

The clientLoop result code indicates that the client has detected some kind of loop while processing results from the server. It usually applies when the client is trying to follow a referral (or a search result reference) and encounters a referral URL that it has already tried to follow.

referralLimitExceeded (97)

The referralLimitExceeded result code indicates that the client has reached some limit when trying to follow referrals returned during processing. The two most likely reasons for this result code include:

  • While trying to follow referral returned by the server, the client has encountered additional referrals. Most clients have a limit on the maximum number of hops they will make while trying to follow a referral, and this result code may be used if that hop limit would have been exceeded.
  • The client may impose a limit on the maximum number of search result references it can handle when processing a search operation. The client may use this result code if that limit would have been exceeded.

invalidResponse (100)

The invalidResponse result code indicates that the client has received some kind of invalid response. It’s like a client-side version of the protocolError (2) result code, and can be used to indicate a couple of possible problems:

  • The client received a malformed response from the server that can’t be parsed as a valid LDAP message.
  • The client received a response message that isn’t appropriate for the request that it sent. For example, if it sent a search request but got back an add response.

ambiguousResponse (101)

The ambiguousResponse result code indicates that the client received more than one final response message for the same request. You will probably never encounter this result code because it depends on two highly unlikely events: the server would have to send multiple final responses for the same request, and the client would have to recognize that it received multiple final responses for the same request. Even if the server were to incorrectly return multiple final responses to the same request, the client would probably just take the first one and ignore any subsequent final responses for that request.

tlsNotSupported (112)

The tlsNotSupported result code indicates that the client indicated a desire to begin TLS (Transport Layer Security, formerly known as the Secure Sockets Layer, or SSL) negotiation on a connection, but the client library does not support (or is not configured properly to handle) TLS encryption. This may be used when trying to establish a connection that is secured with TLS from the beginning, or when trying to use the StartTLS extended operation to add TLS security to an existing insecure connection.

intermediateResponse (113)

The intermediateResponse result code indicates that the client received an intermediate response message from the server. Intermediate response messages were introduced in RFC 3771 and can be used to convey additional information in messages before the final response. This result code could be useful for client APIs that don’t provide some other means of handling intermediate responses (like an intermediate response listener) but still want to make them available to the client application.

unknownType (114)

The unknownType result code indicates that the client received a response with an unrecognized BER type. Every LDAP message has a message ID, a protocol operation, and an optional set of controls. The protocol operation element contains the bulk of the response, but it also has a BER type, which indicates what kind of response it is. The unknownType result code may be used if the client receives a response message with a protocol operation that has an unknown BER type.

I would have expected more debug output. This looks like it’s from the very end of the TLS negotiation process, right when it fails. It would be helpful to see what led up to it.

However, as far as I can tell, it looks like the failure is in some way related to TLS renegotiation. The «waiting for close_notify or alert» indicates that the connection already considers itself closed, and it’s just waiting for either the socket to be closed or an SSL alert message with additional information, and the «state 3» indicates that it’s in the process of attempting to renegotiate the session.

Immediately after that, you can see that it reads data, but it’s not able to interpret it, and that leads to the «fatal, unexpected_message». It follows that by invalidating two existing TLS sessions, closing the connection, and throwing the exception that the LDAP SDK catches and wraps with its own LDAPException.

All of this is happening inside Java’s TLS processing code, and the LDAP SDK doesn’t really have much more control over or insight into what’s going on. Without debug information from earlier in the process, I can’t really say what caused the failure. I also don’t know why inserting a delay would change things. However, it does look like there had already been a couple of TLS sessions that had been successfully established. Given that there is a renegotiation in progress, maybe it’s related to an attempt to reuse a session that’s being destroyed or invalidated.

You mention that you’re using a custom socket factory. That also raises some questions:

  • Does that socket factory do anything unusual? Might it be invalidating sessions?
  • Might there be a thread safety problem in that socket factory that you had been protected from by defaulting to not allowing concurrent socket factory use in unrecognized JVM implementations in earlier versions of the LDAP SDK? Does the problem still occur if you call LDAPConnectionOptions.setAllowConcurrentSocketFactoryUse(false)? Perhaps injecting the delay has a similar effect to reducing contention and avoids the thread safety problem.
  • Do you see the problem if you take your socket factory out of the picture?

It also sounds like it only happens in one specific environment. It would obviously be good to look at what might be different in that environment, and especially related to the server’s TLS configuration, whether you have any networking equipment in the picture that might do weird things (especially something that might involve TLS, like a load balancer that acts as an SSL endpoint).

All of this is just speculation based on a few pieces of information, but it’s really about all there is to go on right now.

Понравилась статья? Поделить с друзьями:
  • Кассовый аппарат меркурий ошибка 065 как исправить ошибку
  • Каталитический нейтрализатор ошибка уаз патриот
  • Кассовый аппарат меркурий ошибка 025 как исправить
  • Катализатор выдает ошибку
  • Кассовый аппарат меркурий ошибка 017 как исправить