opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliArgumentParser.java
@@ -1913,7 +1913,7 @@ if (hostName1Arg.getValue().equalsIgnoreCase(hostName2Arg.getValue()) && !isInteractive()) { if (port1Arg.getValue() == port2Arg.getValue()) if (port1Arg.getValue().equals(port2Arg.getValue())) { Message message = ERR_REPLICATION_ENABLE_SAME_SERVER_PORT.get( hostName1Arg.getValue(), port1Arg.getValue()); @@ -2033,7 +2033,7 @@ if (hostNameSourceArg.getValue().equalsIgnoreCase( hostNameDestinationArg.getValue()) && !isInteractive()) { if (portSourceArg.getValue() == portDestinationArg.getValue()) if (portSourceArg.getValue().equals(portDestinationArg.getValue())) { Message message = ERR_REPLICATION_INITIALIZE_SAME_SERVER_PORT.get( hostNameSourceArg.getValue(), portSourceArg.getValue()); opends/src/server/org/opends/server/tools/dsreplication/ReplicationCliMain.java
@@ -2267,11 +2267,29 @@ hostDestination = ci.getHostName(); portDestination = ci.getPortNumber(); ctxDestination = createInitialLdapContextInteracting(ci); if (ctxDestination == null) boolean error = false; if (hostSource.equalsIgnoreCase(hostDestination)) { cancelled = true; if (portSource == portDestination) { portDestination = -1; Message message = ERR_REPLICATION_INITIALIZE_SAME_SERVER_PORT.get( hostSource, String.valueOf(portSource)); println(); println(message); println(); error = true; } } if (!error) { ctxDestination = createInitialLdapContextInteracting(ci); if (ctxDestination == null) { cancelled = true; } } } catch (ClientException ce)