Can only run replica set on 27027 as prime

I had problems setting up a replica set and constantly got “MongoServerError: This node was not started with replication enabled.”. Then I switched from ports 27017 to 27019 and instead ran the prime node on 27027 and it worked (as long as none of the others were run on 27017). I tried other ports (and of course checked that there was another prg listening to it) but only 27027 seems to work. Any ideas on why?

Make sure all your mongodb processes are set to run with replication set name. Refer to the tutorial.

I followed the tutorial and the only thing I change is the portnumbers. Still only works on 27027 as prime.

Hi @Fredrik_Schulte1,
When you have initiate the replica set, you’ve set the pair hostname:Port for alle member of cluster, so i think is normal you’ve issue with the other Port.

From the documentation: