| | |
| | | { |
| | | DirContext dirCtx = ctx.createSubcontext(dn, attrs); |
| | | taskCreated = true; |
| | | logger.debug(LocalizableMessage.raw("created task entry: "+attrs)); |
| | | logger.info(LocalizableMessage.raw("created task entry: "+attrs)); |
| | | dirCtx.close(); |
| | | } |
| | | catch (NameAlreadyBoundException ex) |
| | |
| | | { |
| | | if (!logMsg.equals(lastLogMsg)) |
| | | { |
| | | logger.debug(LocalizableMessage.raw(logMsg)); |
| | | logger.info(LocalizableMessage.raw(logMsg)); |
| | | lastLogMsg = logMsg; |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (ManagedObjectNotFoundException monfe) |
| | | { |
| | | logger.debug(LocalizableMessage.raw("Synchronization server does not exist in "+ |
| | | logger.info(LocalizableMessage.raw("Synchronization server does not exist in "+ |
| | | ConnectionUtils.getHostPort(ctx))); |
| | | } |
| | | if (sync == null) |
| | |
| | | Set<String> alreadyConfiguredReplicationServers) |
| | | throws ReplicationCliException |
| | | { |
| | | logger.debug(LocalizableMessage.raw("Configuring base DN '"+baseDN+ |
| | | logger.info(LocalizableMessage.raw("Configuring base DN '"+baseDN+ |
| | | "' the replication servers are "+repServers)); |
| | | Set<ServerDescriptor> serversToConfigureDomain = |
| | | new HashSet<ServerDescriptor>(); |
| | |
| | | |
| | | for (ServerDescriptor s : allServers) |
| | | { |
| | | logger.debug(LocalizableMessage.raw("Configuring server "+server.getHostPort(true))); |
| | | logger.info(LocalizableMessage.raw("Configuring server "+server.getHostPort(true))); |
| | | InitialLdapContext ctx = null; |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (PeerNotFoundException pnfe) |
| | | { |
| | | logger.debug(LocalizableMessage.raw("Peer could not be found")); |
| | | logger.info(LocalizableMessage.raw("Peer could not be found")); |
| | | if (nTries == 1) |
| | | { |
| | | throw new ReplicationCliException( |
| | |
| | | } |
| | | catch (PeerNotFoundException pnfe) |
| | | { |
| | | logger.debug(LocalizableMessage.raw("Peer could not be found")); |
| | | logger.info(LocalizableMessage.raw("Peer could not be found")); |
| | | if (nTries == 1) |
| | | { |
| | | throw new ReplicationCliException( |
| | |
| | | { |
| | | DirContext dirCtx = ctx.createSubcontext(dn, attrs); |
| | | taskCreated = true; |
| | | logger.debug(LocalizableMessage.raw("created task entry: "+attrs)); |
| | | logger.info(LocalizableMessage.raw("created task entry: "+attrs)); |
| | | dirCtx.close(); |
| | | } |
| | | catch (NameAlreadyBoundException x) |
| | |
| | | { |
| | | if (!logMsg.equals(lastLogMsg)) |
| | | { |
| | | logger.debug(LocalizableMessage.raw(logMsg)); |
| | | logger.info(LocalizableMessage.raw(logMsg)); |
| | | lastLogMsg = logMsg; |
| | | } |
| | | } |
| | |
| | | { |
| | | DirContext dirCtx = ctx.createSubcontext(dn, attrs); |
| | | taskCreated = true; |
| | | logger.debug(LocalizableMessage.raw("created task entry: "+attrs)); |
| | | logger.info(LocalizableMessage.raw("created task entry: "+attrs)); |
| | | dirCtx.close(); |
| | | } |
| | | catch (NameAlreadyBoundException x) |
| | |
| | | if (((currentTime - minRefreshPeriod) > lastTimeMsgLogged)) |
| | | { |
| | | lastTimeMsgLogged = currentTime; |
| | | logger.debug(LocalizableMessage.raw("Progress msg: "+msg)); |
| | | logger.info(LocalizableMessage.raw("Progress msg: "+msg)); |
| | | } |
| | | if (displayProgress) |
| | | { |
| | |
| | | { |
| | | if (!logMsg.equals(lastLogMsg)) |
| | | { |
| | | logger.debug(LocalizableMessage.raw(logMsg)); |
| | | logger.info(LocalizableMessage.raw(logMsg)); |
| | | lastLogMsg = logMsg; |
| | | } |
| | | } |
| | |
| | | { |
| | | isOver = true; |
| | | LocalizableMessage errorMsg; |
| | | logger.debug(LocalizableMessage.raw("Last task entry: "+sr)); |
| | | logger.info(LocalizableMessage.raw("Last task entry: "+sr)); |
| | | if (displayProgress && (msg != null) && !msg.equals(lastDisplayedMsg)) |
| | | { |
| | | printProgress(msg); |
| | |
| | | printProgress(INFO_SUFFIX_INITIALIZED_SUCCESSFULLY.get()); |
| | | printlnProgress(); |
| | | } |
| | | logger.debug(LocalizableMessage.raw("Processed msg: "+errorMsg)); |
| | | logger.debug(LocalizableMessage.raw("Initialization completed successfully.")); |
| | | logger.info(LocalizableMessage.raw("Processed msg: "+errorMsg)); |
| | | logger.info(LocalizableMessage.raw("Initialization completed successfully.")); |
| | | } |
| | | } |
| | | } |
| | | catch (NameNotFoundException x) |
| | | { |
| | | isOver = true; |
| | | logger.debug(LocalizableMessage.raw("Initialization entry not found.")); |
| | | logger.info(LocalizableMessage.raw("Initialization entry not found.")); |
| | | if (displayProgress) |
| | | { |
| | | printProgress(INFO_SUFFIX_INITIALIZED_SUCCESSFULLY.get()); |
| | |
| | | catch (ManagedObjectNotFoundException monfe) |
| | | { |
| | | // It does not exist. |
| | | logger.debug(LocalizableMessage.raw("No synchronization found on "+ hostPort +".", |
| | | logger.info(LocalizableMessage.raw("No synchronization found on "+ hostPort +".", |
| | | monfe)); |
| | | } |
| | | if (sync != null) |
| | |
| | | } |
| | | if (replServer != null) |
| | | { |
| | | logger.debug(LocalizableMessage.raw("Updating references in domain " + |
| | | logger.info(LocalizableMessage.raw("Updating references in domain " + |
| | | domain.getBaseDN()+" on " + hostPort + ".")); |
| | | replServers.remove(replServer); |
| | | if (replServers.size() > 0) |
| | |
| | | catch (ManagedObjectNotFoundException monfe) |
| | | { |
| | | // It does not exist. |
| | | logger.debug(LocalizableMessage.raw("No synchronization found on "+ hostPort +".", |
| | | logger.info(LocalizableMessage.raw("No synchronization found on "+ hostPort +".", |
| | | monfe)); |
| | | } |
| | | if (sync != null) |
| | |
| | | catch (ManagedObjectNotFoundException monfe) |
| | | { |
| | | // It does not exist. |
| | | logger.debug(LocalizableMessage.raw("No synchronization found on "+ hostPort +".", |
| | | logger.info(LocalizableMessage.raw("No synchronization found on "+ hostPort +".", |
| | | monfe)); |
| | | } |
| | | if (replicationServer != null) |
| | |
| | | { |
| | | if (server.isReplicationServer()) |
| | | { |
| | | logger.debug(LocalizableMessage.raw("Seeding to replication server on "+ |
| | | logger.info(LocalizableMessage.raw("Seeding to replication server on "+ |
| | | server.getHostPort(true)+" with certificates of "+ |
| | | ConnectionUtils.getHostPort(adsCtxSource.getDirContext()))); |
| | | InitialLdapContext ctx = null; |