how to fix replica set error
Simple, start your replica sets nodes with --replSet xxx (where xxx is your replica set name) -parameter. If you use config files, then replication.replSetName: xxx

Read here how to configure/deploy replica set.