| | |
| | | import org.opends.server.types.*; |
| | | import static org.opends.messages.ReplicationMessages.*; |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.replication.protocol.ProtocolVersion.*; |
| | | |
| | | /** |
| | |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage errMessage = ERR_RS_DISCONNECTED_DURING_HANDSHAKE.get( |
| | | String.valueOf(getReplicationServerId()), |
| | | session.getReadableRemoteAddress()); |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | abortStart(e.getMessageObject()); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | abortStart(LocalizableMessage.raw(e.getLocalizedMessage())); |
| | | } |
| | | finally |
| | |
| | | // then it's ok and nothing else to do |
| | | if (generationId == localGenerationId) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + replicationServer.getMonitorInstanceName() |
| | | + " " + this + " RS V1 with serverID=" + serverId |
| | | + " is connected with the right generation ID"); |
| | | } |
| | |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage errMessage = ERR_RS_DISCONNECTED_DURING_HANDSHAKE.get( |
| | | Integer.toString(inReplServerStartMsg.getServerId()), |
| | | Integer.toString(replicationServer.getServerId())); |
| | |
| | | } |
| | | catch (DirectoryException e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | abortStart(e.getMessageObject()); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | abortStart(LocalizableMessage.raw(e.getLocalizedMessage())); |
| | | } |
| | | finally |
| | |
| | | */ |
| | | if (generationId == localGenerationId) |
| | | { |
| | | if (debugEnabled()) |
| | | if (logger.isTraceEnabled()) |
| | | { |
| | | TRACER.debugInfo("In " + replicationServer.getMonitorInstanceName() |
| | | logger.trace("In " + replicationServer.getMonitorInstanceName() |
| | | + " RS with serverID=" + serverId |
| | | + " is connected with the right generation ID, same as local =" |
| | | + generationId); |