Adding secondary via rs.add on MongoDB
The error message in your screenshot indicates you are trying to add identical members to your replica set under different names:

"The hosts x:27017 and y:27017 all map to this node in new configuration".


If you want to configure multiple replica set members on a single machine for testing purposes, all members need to use different ports and/or IP addresses.


  Version: The master is on Enterprise. I think 3.2 and the slave is on 2.6.


Mixed-version replica sets are only supported for consecutive major versions (i.e. 3.2 and 3.0) and expected to be used transiently during a rolling upgrade to a new major version of MongoDB. A mixed replica set with 3.2 and 2.6 members is definitely not supported.