mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
22.33.2013 ea43e9de6d23aaf93ff60ff5e0850471cfe39826
OPENDJ-918 (CR-1723) - HTTP Connection Handler - Server cannot start with horked http-config.json


Protected the HTTP Connection Handler against a failing initialization: after two consecutive startup failures, the HTTP connection handler will be disabled, errors will be logged and alerts will be output.


HTTPConnectionHandler.java:
Added instance member enabled to decouple the enable/disable state from the config.
Implemented getAlerts() method.
In startHttpServer(), moved the try / catch block and the call to notify() to the run() method.
In run(), handle failing initialization.
In stopHttpServer(), added a null check in case of failed intitialization.
Extracted method cleanUpHttpServer().

ServerConstants.java:
Added alerts for HTTP connection handler.

protocol*.properties:
Modified the name of the LDAP specific properties to be more generic.

LDAPConnectionHandler.java
Consequence of the change to protocol.properties.
11 files modified
166 ■■■■■ changed files
opends/src/messages/messages/protocol.properties 12 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/protocol_de.properties 4 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/protocol_es.properties 4 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/protocol_fr.properties 4 ●●●● patch | view | raw | blame | history
opends/src/messages/messages/protocol_ja.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/protocol_ko.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/protocol_zh_CN.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/protocol_zh_TW.properties 2 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java 109 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java 6 ●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/util/ServerConstants.java 19 ●●●●● patch | view | raw | blame | history
opends/src/messages/messages/protocol.properties
@@ -507,13 +507,11 @@
INFO_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT_182=An internal error \
 prevented the Directory Server from properly registering the client \
 connection from %s to %s with an appropriate request handler:  %s
MILD_ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=The LDAP connection \
 handler defined in configuration entry %s was unable to accept a new client \
 connection:  %s
FATAL_ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=The LDAP \
 connection handler defined in configuration entry %s has experienced \
 consecutive failures while trying to accept client connections:  %s.  This \
 connection handler will be disabled
MILD_ERR_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=The %s defined in \
 configuration entry %s was unable to accept a new client connection:  %s
FATAL_ERR_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=The %s defined in \
 configuration entry %s has experienced consecutive failures while trying to \
 accept client connections:  %s.  This connection handler will be disabled
FATAL_ERR_LDAP_CONNHANDLER_UNCAUGHT_ERROR_185=The LDAP connection handler \
 defined in configuration entry %s caught an unexpected error while trying to \
 listen for new connections:  %s.  This connection handler will be disabled
opends/src/messages/messages/protocol_de.properties
@@ -201,8 +201,8 @@
MILD_ERR_CONNHANDLER_DENIED_CLIENT_180=Der Verbindungsversuch von Client %s zu %s wurde abgelehnt, da der Client in einem der Bereiche f\u00fcr verweigerte Adressen enthalten war
MILD_ERR_CONNHANDLER_DISALLOWED_CLIENT_181=Der Verbindungsversuch von Client %s zu %s wurde abgelehnt, da der Client nicht in einem der Bereiche f\u00fcr zul\u00e4ssige Adressen enthalten war
INFO_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT_182=Aufgrund eines internen Fehlers konnte Directory-Server die Clientverbindung von %s zu %s nicht mit einer geeigneten Behandlungsroutine f\u00fcr Anforderungen registrieren:  %s
MILD_ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=Die im Konfigurationseintrag %s definierte LDAP-Verbindungsbehandlungsroutine konnte eine neue Clientverbindung nicht annehmen:  %s
FATAL_ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=Der in Konfigurationseintrag %s definierte LDAP-Verbindungshandler hat beim Versuch, die Client-Verbindungen zu akzeptieren, aufeinander folgende Fehler verursacht:  %s.  Dieser Verbindungshandler wird deaktiviert
MILD_ERR_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=Die im Konfigurationseintrag %s definierte %s konnte eine neue Clientverbindung nicht annehmen:  %s
FATAL_ERR_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=Der in Konfigurationseintrag %s definierte %s hat beim Versuch, die Client-Verbindungen zu akzeptieren, aufeinander folgende Fehler verursacht:  %s.  Dieser Verbindungshandler wird deaktiviert
FATAL_ERR_LDAP_CONNHANDLER_UNCAUGHT_ERROR_185=Der in Konfigurationseintrag %s definierte LDAP-Verbindungshandler hat beim Versuch, neue Verbindungen abzuh\u00f6ren, einen unerwarteten Fehler verursacht:  %s.  Dieser Verbindungshandler wird deaktiviert
FATAL_ERR_LDAP_REQHANDLER_OPEN_SELECTOR_FAILED_186=%s konnte keinen Selektor \u00f6ffnen, um Lesevorg\u00e4nge von Clients zu multiplexen:  %s.  Dieser Anforderungshandler kann die Verarbeitung nicht fortsetzen
FATAL_ERR_LDAP_REQHANDLER_CANNOT_REGISTER_187=%s konnte diese Client-Verbindung mit dem Selektor nicht registrieren:  %s
opends/src/messages/messages/protocol_es.properties
@@ -201,8 +201,8 @@
MILD_ERR_CONNHANDLER_DENIED_CLIENT_180=El intento de conexi\u00f3n desde el cliente %s a %s se ha rechazado, el cliente se incluy\u00f3 en uno de los rangos de direcciones denegados
MILD_ERR_CONNHANDLER_DISALLOWED_CLIENT_181=El intento de conexi\u00f3n desde el cliente %s a %s se ha rechazado, el cliente no se incluy\u00f3 en uno de los rangos de direcciones permitidos
INFO_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT_182=Un error interno impidi\u00f3 a Directory Server registrar correctamente la conexi\u00f3n de cliente de %s a %s con un controlador de solicitud adecuado:  %s
MILD_ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=El controlador de conexi\u00f3n LDAP definido en la entrada de configuraci\u00f3n %s no pudo aceptar una nueva conexi\u00f3n de cliente:  %s
FATAL_ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=El controlador de conexi\u00f3n LDAP definido en la entrada de configuraci\u00f3n %s ha experimentado errores consecutivos al tratar de aceptar las conexiones de cliente:  %s.  Este controlador de conexi\u00f3n se inhabilitar\u00e1
MILD_ERR_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=El %s definido en la entrada de configuraci\u00f3n %s no pudo aceptar una nueva conexi\u00f3n de cliente:  %s
FATAL_ERR_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=El %s definido en la entrada de configuraci\u00f3n %s ha experimentado errores consecutivos al tratar de aceptar las conexiones de cliente:  %s.  Este controlador de conexi\u00f3n se inhabilitar\u00e1
FATAL_ERR_LDAP_CONNHANDLER_UNCAUGHT_ERROR_185=El controlador de conexi\u00f3n LDAP definido en la entrada de configuraci\u00f3n %s detect\u00f3 un error inesperado al tratar de escuchar nuevas conexiones:  %s.  Este controlador de conexi\u00f3n se inhabilitar\u00e1
FATAL_ERR_LDAP_REQHANDLER_OPEN_SELECTOR_FAILED_186=%s no pudo abrir un selector para multiplexar lecturas de los clientes:  %s.  Este controlador de solicitudes no puede continuar su procesamiento
FATAL_ERR_LDAP_REQHANDLER_CANNOT_REGISTER_187=%s no pudo registrar esta conexi\u00f3n de cliente con el selector:  %s
opends/src/messages/messages/protocol_fr.properties
@@ -201,8 +201,8 @@
MILD_ERR_CONNHANDLER_DENIED_CLIENT_180=La tentative de connexion du client %s \u00e0 %s a \u00e9t\u00e9 refus\u00e9e, car le client \u00e9tait inclus dans l'une des plages d'adresses refus\u00e9es
MILD_ERR_CONNHANDLER_DISALLOWED_CLIENT_181=La tentative de connexion du client %s \u00e0 %s a \u00e9t\u00e9 refus\u00e9e, car le client n'\u00e9tait pas inclus dans l'une des plages d'adresses autoris\u00e9es
INFO_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT_182= Une erreur interne a emp\u00each\u00e9 Directory Server d'enregistrer correctement la connexion cliente de %s \u00e0 %s avec un gestionnaire de demandes appropri\u00e9\u00a0: %s
MILD_ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=Le gestionnaire de connexion LDAP d\u00e9fini dans l'entr\u00e9e de configuration %s n'a pas pu accepter une nouvelle connexion cliente\u00a0: %s
FATAL_ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=Le gestionnaire de connexion LDAP d\u00e9fini dans l\u2019entr\u00e9e de configuration %s a rencontr\u00e9 des \u00e9checs successifs lors de la tentative d\u2019acceptation des connexions client\u00a0: %s. Ce gestionnaire de connexion va \u00eatre d\u00e9sactiv\u00e9
MILD_ERR_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=Le %s d\u00e9fini dans l'entr\u00e9e de configuration %s n'a pas pu accepter une nouvelle connexion cliente\u00a0: %s
FATAL_ERR_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=Le %s d\u00e9fini dans l\u2019entr\u00e9e de configuration %s a rencontr\u00e9 des \u00e9checs successifs lors de la tentative d\u2019acceptation des connexions client\u00a0: %s. Ce gestionnaire de connexion va \u00eatre d\u00e9sactiv\u00e9
FATAL_ERR_LDAP_CONNHANDLER_UNCAUGHT_ERROR_185=Le gestionnaire de connexion LDAP d\u00e9fini dans l\u2019entr\u00e9e de configuration %s a d\u00e9tect\u00e9 une erreur inattendue lors de la tentative d\u2019\u00e9coute des nouvelles connexions\u00a0: %s. Ce gestionnaire de connexion va \u00eatre d\u00e9sactiv\u00e9
FATAL_ERR_LDAP_REQHANDLER_OPEN_SELECTOR_FAILED_186=%s n\u2019a pas pu ouvrir de s\u00e9lecteur pour multiplexer les lectures \u00e0 partir des clients\u00a0: %s. Ce gestionnaire de requ\u00eate ne peut pas continuer son traitement
FATAL_ERR_LDAP_REQHANDLER_CANNOT_REGISTER_187=%s n\u2019a pas pu enregistrer cette connexion client aupr\u00e8s du s\u00e9lecteur\u00a0: %s
opends/src/messages/messages/protocol_ja.properties
@@ -201,8 +201,6 @@
MILD_ERR_CONNHANDLER_DENIED_CLIENT_180=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 %s \u304b\u3089 %s \u3078\u306e\u63a5\u7d9a\u8a66\u884c\u306f\u62d2\u5426\u3055\u308c\u307e\u3057\u305f\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u3001\u62d2\u5426\u3055\u308c\u308b\u30a2\u30c9\u30ec\u30b9\u7bc4\u56f2\u306e 1 \u3064\u306b\u542b\u307e\u308c\u3066\u3044\u307e\u3057\u305f
MILD_ERR_CONNHANDLER_DISALLOWED_CLIENT_181=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 %s \u304b\u3089 %s \u3078\u306e\u63a5\u7d9a\u8a66\u884c\u306f\u62d2\u5426\u3055\u308c\u307e\u3057\u305f\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u3001\u8a31\u53ef\u3055\u308c\u308b\u30a2\u30c9\u30ec\u30b9\u7bc4\u56f2\u306e 1 \u3064\u306b\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3067\u3057\u305f
INFO_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT_182=\u5185\u90e8\u30a8\u30e9\u30fc\u306e\u305f\u3081\u3001\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30b5\u30fc\u30d0\u30fc\u306f\u3001%s \u304b\u3089 %s \u3078\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u63a5\u7d9a\u3092\u9069\u5207\u306a\u8981\u6c42\u30cf\u30f3\u30c9\u30e9\u306b\u6b63\u3057\u304f\u767b\u9332\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f:  %s
MILD_ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=\u69cb\u6210\u30a8\u30f3\u30c8\u30ea %s \u3067\u5b9a\u7fa9\u3055\u308c\u305f LDAP \u63a5\u7d9a\u30cf\u30f3\u30c9\u30e9\u306f\u3001\u65b0\u3057\u3044\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u63a5\u7d9a\u3092\u53d7\u3051\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f:  %s
FATAL_ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u63a5\u7d9a\u306e\u53d7\u3051\u5165\u308c\u4e2d\u306b\u3001\u69cb\u6210\u30a8\u30f3\u30c8\u30ea %s \u3067\u5b9a\u7fa9\u3055\u308c\u305f LDAP \u63a5\u7d9a\u30cf\u30f3\u30c9\u30e9\u3067\u969c\u5bb3\u304c\u9023\u7d9a\u3057\u3066\u767a\u751f\u3057\u307e\u3057\u305f:  %s\u3002\u3053\u306e\u63a5\u7d9a\u30cf\u30f3\u30c9\u30e9\u306f\u7121\u52b9\u306b\u306a\u308a\u307e\u3059
FATAL_ERR_LDAP_CONNHANDLER_UNCAUGHT_ERROR_185=\u65b0\u3057\u3044\u63a5\u7d9a\u306e\u5f85\u6a5f\u4e2d\u306b\u3001\u69cb\u6210\u30a8\u30f3\u30c8\u30ea %s \u3067\u5b9a\u7fa9\u3055\u308c\u305f LDAP \u63a5\u7d9a\u30cf\u30f3\u30c9\u30e9\u3067\u4e88\u671f\u3057\u306a\u3044\u30a8\u30e9\u30fc\u304c\u30ad\u30e3\u30c3\u30c1\u3055\u308c\u307e\u3057\u305f:  %s\u3002\u3053\u306e\u63a5\u7d9a\u30cf\u30f3\u30c9\u30e9\u306f\u7121\u52b9\u306b\u306a\u308a\u307e\u3059
FATAL_ERR_LDAP_REQHANDLER_OPEN_SELECTOR_FAILED_186=%s \u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u8aad\u307f\u53d6\u308a\u3092\u591a\u91cd\u5316\u3059\u308b\u305f\u3081\u306e\u30bb\u30ec\u30af\u30bf\u3092\u958b\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f:  %s\u3002\u3053\u306e\u8981\u6c42\u30cf\u30f3\u30c9\u30e9\u306e\u51e6\u7406\u3092\u7d9a\u884c\u3067\u304d\u307e\u305b\u3093
FATAL_ERR_LDAP_REQHANDLER_CANNOT_REGISTER_187=%s \u306f\u3053\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u63a5\u7d9a\u3092\u30bb\u30ec\u30af\u30bf\u306b\u767b\u9332\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f:  %s
opends/src/messages/messages/protocol_ko.properties
@@ -201,8 +201,6 @@
MILD_ERR_CONNHANDLER_DENIED_CLIENT_180=\ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \uac70\ubd80\ub41c \uc8fc\uc18c \ubc94\uc704 \uc911 \ud558\ub098\uc5d0 \ud3ec\ud568\ub418\uc5b4 \uc788\uae30 \ub54c\ubb38\uc5d0 \ud074\ub77c\uc774\uc5b8\ud2b8 %s\uc5d0\uc11c %s(\uc73c)\ub85c\uc758 \uc5f0\uacb0 \uc2dc\ub3c4\uac00 \uac70\ubd80\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
MILD_ERR_CONNHANDLER_DISALLOWED_CLIENT_181=\ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \ud5c8\uc6a9\ub41c \uc8fc\uc18c \ubc94\uc704 \uc911 \ud558\ub098\uc5d0 \ud3ec\ud568\ub418\uc5b4 \uc788\uc9c0 \uc54a\uae30 \ub54c\ubb38\uc5d0 \ud074\ub77c\uc774\uc5b8\ud2b8 %s\uc5d0\uc11c %s(\uc73c)\ub85c\uc758 \uc5f0\uacb0 \uc2dc\ub3c4\uac00 \uac70\ubd80\ub418\uc5c8\uc2b5\ub2c8\ub2e4.
INFO_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT_182=\ub0b4\ubd80 \uc624\ub958\uac00 \ubc1c\uc0dd\ud558\uc5ec \ub514\ub809\ud1a0\ub9ac \uc11c\ubc84\uac00 %s\uc5d0\uc11c %s(\uc73c)\ub85c\uc758 \ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0\uc744 \uc801\uc808\ud55c \uc694\uccad \ucc98\ub9ac\uae30\uc5d0 \uc62c\ubc14\ub85c \ub4f1\ub85d\ud558\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4: %s
MILD_ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=\uad6c\uc131 \ud56d\ubaa9 %s\uc5d0 \uc815\uc758\ub41c LDAP \uc5f0\uacb0 \ucc98\ub9ac\uae30\uac00 \uc0c8 \ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0\uc744 \ud5c8\uc6a9\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: %s
FATAL_ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=\uad6c\uc131 \ud56d\ubaa9 %s\uc5d0 \uc815\uc758\ub41c LDAP \uc5f0\uacb0 \ucc98\ub9ac\uae30\uc5d0\uc11c \ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0\uc744 \ud5c8\uc6a9\ud558\ub294 \ub3d9\uc548 \uc5f0\uc18d\ud574\uc11c \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s. \uc774 \uc5f0\uacb0 \ucc98\ub9ac\uae30\uac00 \ube44\ud65c\uc131\ud654\ub429\ub2c8\ub2e4.
FATAL_ERR_LDAP_CONNHANDLER_UNCAUGHT_ERROR_185=\uad6c\uc131 \ud56d\ubaa9 %s\uc5d0 \uc815\uc758\ub41c LDAP \uc5f0\uacb0 \ucc98\ub9ac\uae30\uc5d0\uc11c \uc0c8 \uc5f0\uacb0\uc744 \uc218\uc2e0\ud558\ub294 \ub3d9\uc548 \uc608\uae30\uce58 \uc54a\uc740 \uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4: %s. \uc774 \uc5f0\uacb0 \ucc98\ub9ac\uae30\uac00 \ube44\ud65c\uc131\ud654\ub429\ub2c8\ub2e4.
FATAL_ERR_LDAP_REQHANDLER_OPEN_SELECTOR_FAILED_186=%s\uc774(\uac00) \uc120\ud0dd\uae30\ub97c \uc5f4\uc5b4 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0\uc11c \uc77d\uae30\ub97c \uba40\ud2f0\ud50c\ub809\uc2f1\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: %s. \uc774 \uc694\uccad \ucc98\ub9ac\uae30\uac00 \ucc98\ub9ac\ub97c \uacc4\uc18d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.
FATAL_ERR_LDAP_REQHANDLER_CANNOT_REGISTER_187=%s\uc774(\uac00) \uc774 \ud074\ub77c\uc774\uc5b8\ud2b8 \uc5f0\uacb0\uc744 \uc120\ud0dd\uae30\uc5d0 \ub4f1\ub85d\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4: %s
opends/src/messages/messages/protocol_zh_CN.properties
@@ -201,8 +201,6 @@
MILD_ERR_CONNHANDLER_DENIED_CLIENT_180=\u5df2\u62d2\u7edd\u4ece\u5ba2\u6237\u7aef %s \u5230 %s \u7684\u8fde\u63a5\u5c1d\u8bd5\uff0c\u56e0\u4e3a\u8be5\u5ba2\u6237\u7aef\u5305\u542b\u5728\u67d0\u4e2a\u62d2\u7edd\u7684\u5730\u5740\u8303\u56f4\u5185
MILD_ERR_CONNHANDLER_DISALLOWED_CLIENT_181=\u5df2\u62d2\u7edd\u4ece\u5ba2\u6237\u7aef %s \u5230 %s \u7684\u8fde\u63a5\u5c1d\u8bd5\uff0c\u56e0\u4e3a\u8be5\u5ba2\u6237\u7aef\u4e0d\u5305\u542b\u5728\u67d0\u4e2a\u5141\u8bb8\u7684\u5730\u5740\u8303\u56f4\u5185
INFO_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT_182=\u51fa\u73b0\u5185\u90e8\u9519\u8bef\uff0c\u5bfc\u81f4\u76ee\u5f55\u670d\u52a1\u5668\u65e0\u6cd5\u5728\u76f8\u5e94\u7684\u8bf7\u6c42\u5904\u7406\u7a0b\u5e8f\u4e2d\u6b63\u786e\u6ce8\u518c\u4ece %s \u5230 %s \u7684\u5ba2\u6237\u7aef\u8fde\u63a5: %s
MILD_ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=\u914d\u7f6e\u6761\u76ee %s \u4e2d\u5b9a\u4e49\u7684 LDAP \u8fde\u63a5\u5904\u7406\u7a0b\u5e8f\u65e0\u6cd5\u63a5\u53d7\u65b0\u7684\u5ba2\u6237\u7aef\u8fde\u63a5: %s
FATAL_ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=\u914d\u7f6e\u6761\u76ee %s \u4e2d\u5b9a\u4e49\u7684 LDAP \u8fde\u63a5\u5904\u7406\u7a0b\u5e8f\u5728\u5c1d\u8bd5\u63a5\u53d7\u5ba2\u6237\u7aef\u8fde\u63a5\u65f6\u8fde\u7eed\u5931\u8d25: %s\u3002\u5c06\u7981\u7528\u8be5\u8fde\u63a5\u5904\u7406\u7a0b\u5e8f
FATAL_ERR_LDAP_CONNHANDLER_UNCAUGHT_ERROR_185=\u914d\u7f6e\u6761\u76ee %s \u4e2d\u5b9a\u4e49\u7684 LDAP \u8fde\u63a5\u5904\u7406\u7a0b\u5e8f\u5728\u5c1d\u8bd5\u4fa6\u542c\u65b0\u8fde\u63a5\u65f6\u51fa\u73b0\u610f\u5916\u9519\u8bef: %s\u3002\u5c06\u7981\u7528\u8be5\u8fde\u63a5\u5904\u7406\u7a0b\u5e8f
FATAL_ERR_LDAP_REQHANDLER_OPEN_SELECTOR_FAILED_186=%s \u65e0\u6cd5\u6253\u5f00\u9009\u5b9a\u5668\u4ee5\u4ece\u5ba2\u6237\u7aef\u591a\u8def\u590d\u7528\u8bfb\u53d6: %s\u3002\u8be5\u8bf7\u6c42\u5904\u7406\u7a0b\u5e8f\u65e0\u6cd5\u7ee7\u7eed\u5904\u7406
FATAL_ERR_LDAP_REQHANDLER_CANNOT_REGISTER_187=%s \u65e0\u6cd5\u4f7f\u7528\u9009\u5b9a\u5668\u6ce8\u518c\u8be5\u5ba2\u6237\u7aef\u8fde\u63a5: %s
opends/src/messages/messages/protocol_zh_TW.properties
@@ -201,8 +201,6 @@
MILD_ERR_CONNHANDLER_DENIED_CLIENT_180=\u5f9e\u7528\u6236\u7aef %s \u81f3 %s \u7684\u9023\u7dda\u5617\u8a66\u5df2\u88ab\u62d2\u7d55\uff0c\u56e0\u70ba\u8a72\u7528\u6236\u7aef\u5df2\u88ab\u7d0d\u5165\u62d2\u7d55\u7684\u4f4d\u5740\u7bc4\u570d\u4e4b\u4e00
MILD_ERR_CONNHANDLER_DISALLOWED_CLIENT_181=\u5f9e\u7528\u6236\u7aef %s \u81f3 %s \u7684\u9023\u7dda\u5617\u8a66\u5df2\u88ab\u62d2\u7d55\uff0c\u56e0\u70ba\u8a72\u7528\u6236\u7aef\u4e26\u672a\u7d0d\u5165\u5141\u8a31\u7684\u4f4d\u5740\u7bc4\u570d\u4e4b\u4e00
INFO_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT_182=\u767c\u751f\u5167\u90e8\u932f\u8aa4\uff0c\u4f7f\u76ee\u9304\u4f3a\u670d\u5668\u7121\u6cd5\u4ee5\u9069\u7576\u7684\u8acb\u6c42\u8655\u7406\u7a0b\u5f0f\u6b63\u78ba\u8a3b\u518a %s \u81f3 %s \u7684\u7528\u6236\u7aef\u9023\u7dda: %s
MILD_ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION_183=\u914d\u7f6e\u9805\u76ee %s \u4e2d\u6240\u5b9a\u7fa9\u7684 LDAP \u9023\u7dda\u8655\u7406\u7a0b\u5f0f\u7121\u6cd5\u63a5\u53d7\u65b0\u7684\u7528\u6236\u7aef\u9023\u7dda: %s
FATAL_ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES_184=\u914d\u7f6e\u9805\u76ee %s \u4e2d\u6240\u5b9a\u7fa9\u7684 LDAP \u9023\u7dda\u8655\u7406\u7a0b\u5f0f\u5728\u5617\u8a66\u63a5\u53d7\u7528\u6236\u7aef\u9023\u7dda\u6642\u9023\u7e8c\u5931\u6557\u6578\u6b21: %s\u3002\u6b64\u9023\u7dda\u8655\u7406\u7a0b\u5f0f\u5c07\u6703\u505c\u7528
FATAL_ERR_LDAP_CONNHANDLER_UNCAUGHT_ERROR_185=\u914d\u7f6e\u9805\u76ee %s \u4e2d\u6240\u5b9a\u7fa9\u7684 LDAP \u9023\u7dda\u8655\u7406\u7a0b\u5f0f\u5728\u5617\u8a66\u5075\u807d\u65b0\u9023\u7dda\u6642\uff0c\u767c\u751f\u672a\u9810\u671f\u7684\u932f\u8aa4: %s\u3002\u6b64\u9023\u7dda\u8655\u7406\u7a0b\u5f0f\u5c07\u6703\u505c\u7528
FATAL_ERR_LDAP_REQHANDLER_OPEN_SELECTOR_FAILED_186=%s \u7121\u6cd5\u958b\u555f\u9078\u64c7\u5668\u8b93\u8b80\u53d6\u7528\u6236\u7aef\u7684\u4f5c\u696d\u591a\u5de5\u5316: %s\u3002\u6b64\u8acb\u6c42\u8655\u7406\u7a0b\u5f0f\u7121\u6cd5\u7e7c\u7e8c\u9032\u884c\u8655\u7406
FATAL_ERR_LDAP_REQHANDLER_CANNOT_REGISTER_187=%s \u7121\u6cd5\u4ee5\u9078\u64c7\u5668\u8a3b\u518a\u6b64\u7528\u6236\u7aef\u9023\u7dda: %s
opends/src/server/org/opends/server/protocols/http/HTTPConnectionHandler.java
@@ -30,6 +30,7 @@
import static org.opends.messages.ProtocolMessages.*;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import java.io.File;
@@ -142,6 +143,9 @@
   */
  private volatile boolean shutdownRequested;
  /** Indicates whether this connection handler is enabled. */
  private boolean enabled;
  /** The set of listeners for this connection handler. */
  private List<HostPort> listeners = new LinkedList<HostPort>();
@@ -181,9 +185,7 @@
   */
  private final Object waitListen = new Object();
  /**
   * The friendly name of this connection handler.
   */
  /** The friendly name of this connection handler. */
  private String friendlyName;
  /**
@@ -279,6 +281,7 @@
    this.initConfig = config;
    this.currentConfig = config;
    this.enabled = this.currentConfig.isEnabled();
    return new ConfigChangeResult(ResultCode.SUCCESS, adminActionRequired,
        messages);
@@ -373,8 +376,12 @@
  @Override
  public LinkedHashMap<String, String> getAlerts()
  {
    // TODO Auto-generated method stub
    return null;
    LinkedHashMap<String, String> alerts = new LinkedHashMap<String, String>();
    alerts.put(ALERT_TYPE_HTTP_CONNECTION_HANDLER_CONSECUTIVE_FAILURES,
        ALERT_DESCRIPTION_HTTP_CONNECTION_HANDLER_CONSECUTIVE_FAILURES);
    return alerts;
  }
  /** {@inheritDoc} */
@@ -535,6 +542,7 @@
    this.initConfig = config;
    this.currentConfig = config;
    this.enabled = this.currentConfig.isEnabled();
  }
  private String getHandlerName(HTTPConnectionHandlerCfg config)
@@ -558,8 +566,7 @@
  {
    HTTPConnectionHandlerCfg config = (HTTPConnectionHandlerCfg) configuration;
    if ((currentConfig == null)
        || (!currentConfig.isEnabled() && config.isEnabled()))
    if ((currentConfig == null) || (!this.enabled && config.isEnabled()))
    {
      // Attempt to bind to the listen port on all configured addresses to
      // verify whether the connection handler will be able to start.
@@ -713,11 +720,12 @@
  {
    setName(handlerName);
    boolean lastIterationFailed = false;
    while (!shutdownRequested)
    {
      // If this connection handler is not enabled, then just sleep
      // for a bit and check again.
      if (!currentConfig.isEnabled())
      if (!this.enabled)
      {
        if (isListening())
        {
@@ -735,17 +743,65 @@
        continue;
      }
      try
      {
        // At this point, the connection Handler either started
        // correctly or failed to start but the start process
        // should be notified and resume its work in any cases.
        synchronized (waitListen)
        {
          waitListen.notify();
        }
      // If we have gotten here, then we are about to start listening
      // for the first time since startup or since we were previously
      // disabled. Start the embedded HTTP server
      startHttpServer();
        lastIterationFailed = false;
      }
      catch (Exception e)
      {
        // clean up the messed up HTTP server
        cleanUpHttpServer();
        // error + alert about the horked config
        if (debugEnabled())
        {
          TRACER.debugCaught(DebugLogLevel.ERROR, e);
        }
        logError(ERR_CONNHANDLER_CANNOT_ACCEPT_CONNECTION.get(friendlyName,
            String.valueOf(currentConfig.dn()), getExceptionMessage(e)));
        if (lastIterationFailed)
        {
          // The last time through the accept loop we also
          // encountered a failure. Rather than enter a potential
          // infinite loop of failures, disable this acceptor and
          // log an error.
          Message message =
              ERR_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES.get(friendlyName,
                  String.valueOf(currentConfig.dn()),
                  stackTraceToSingleLineString(e));
          logError(message);
          DirectoryServer.sendAlertNotification(this,
              ALERT_TYPE_HTTP_CONNECTION_HANDLER_CONSECUTIVE_FAILURES, message);
          this.enabled = false;
        }
        else
        {
          lastIterationFailed = true;
        }
      }
    }
    // Initiate shutdown
    stopHttpServer();
  }
  private void startHttpServer()
  private void startHttpServer() throws Exception
  {
    // silence Grizzly's own logging
    Logger.getLogger("org.glassfish.grizzly").setLevel(Level.OFF);
@@ -768,8 +824,6 @@
      setHttpStatsProbe();
    }
    try
    {
      for (NetworkListener listener : this.httpServer.getListeners())
      {
        TCPNIOTransport transport = listener.getTransport();
@@ -783,8 +837,9 @@
        transport.setReadBufferSize(bufferSize);
        transport.setWriteBufferSize(bufferSize);
        transport.setIOStrategy(SameThreadIOStrategy.getInstance());
        final int numRequestHandlers = getNumRequestHandlers(
                currentConfig.getNumRequestHandlers(), friendlyName);
      final int numRequestHandlers =
          getNumRequestHandlers(currentConfig.getNumRequestHandlers(),
              friendlyName);
        transport.setSelectorRunnersCount(numRequestHandlers);
        transport.setServerConnectionBackLog(currentConfig.getAcceptBacklog());
@@ -830,22 +885,6 @@
      this.httpServer.start();
      TRACER.debugInfo("HTTP server started");
      logError(NOTE_CONNHANDLER_STARTED_LISTENING.get(handlerName));
      // At this point, the connection Handler either started
      // correctly or failed to start but the start process
      // should be notified and resume its work in any cases.
      synchronized (waitListen)
      {
        waitListen.notify();
      }
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
    }
  }
  private void setHttpStatsProbe()
@@ -926,13 +965,21 @@
  private void stopHttpServer()
  {
    if (this.httpServer != null)
    {
    TRACER.debugInfo("Stopping HTTP server...");
    this.httpServer.stop();
    this.httpServer = null;
    this.httpProbe = null;
      cleanUpHttpServer();
    TRACER.debugInfo("HTTP server stopped");
    logError(NOTE_CONNHANDLER_STOPPED_LISTENING.get(handlerName));
  }
  }
  private void cleanUpHttpServer()
  {
    this.httpServer = null;
    this.httpProbe = null;
  }
  /** {@inheritDoc} */
  @Override
opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
@@ -1059,7 +1059,7 @@
              TRACER.debugCaught(DebugLogLevel.ERROR, e);
            }
            logError(ERR_LDAP_CONNHANDLER_CANNOT_ACCEPT_CONNECTION.get(
            logError(ERR_CONNHANDLER_CANNOT_ACCEPT_CONNECTION.get(friendlyName,
                String.valueOf(currentConfig.dn()), getExceptionMessage(e)));
            if (lastIterationFailed)
@@ -1068,8 +1068,8 @@
              // encountered a failure. Rather than enter a potential
              // infinite loop of failures, disable this acceptor and
              // log an error.
              Message message = ERR_LDAP_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES
                  .get(String.valueOf(currentConfig.dn()),
              Message message = ERR_CONNHANDLER_CONSECUTIVE_ACCEPT_FAILURES
                  .get(friendlyName, String.valueOf(currentConfig.dn()),
                      stackTraceToSingleLineString(e));
              logError(message);
opends/src/server/org/opends/server/util/ServerConstants.java
@@ -1726,6 +1726,25 @@
       ALERT_TYPE_LDAP_CONNECTION_HANDLER_CONSECUTIVE_FAILURES =
            "org.opends.server.LDAPHandlerDisabledByConsecutiveFailures";
  /**
   * The description for the alert type that will be used for the alert
   * notification generated if consecutive failures in the HTTP connection
   * handler have caused it to become disabled.
   */
  public static final String
      ALERT_DESCRIPTION_HTTP_CONNECTION_HANDLER_CONSECUTIVE_FAILURES =
          "This alert type will be used to notify administrators of " +
          "consecutive failures that have occurred in the HTTP connection " +
          "handler that have caused it to become disabled.";
  /**
   * The alert type string that will be used for the alert notification
   * generated if consecutive failures in the HTTP connection handler have
   * caused it to become disabled.
   */
  public static final String
      ALERT_TYPE_HTTP_CONNECTION_HANDLER_CONSECUTIVE_FAILURES =
          "org.opends.server.HTTPHandlerDisabledByConsecutiveFailures";
  /**