When I run the following command: rs.initiate(),

I get the following error:

"info2" : "no configuration explicitly specified -- making one",
        "me" : "ip-10-0-2-113:27017",
        "ok" : 0,
        "errmsg" : "No host described in new configuration 1 for replica set s-1-rs maps to this node",
        "code" : 93

I'm just running on the local host. I'm following this guide: http://docs.mongodb.org/manual/tutorial/convert-standalone-to-replica-set/

I just skipped the part where they named the replica set.

In any case, how can I create a replica set and what am I doing wrong?


1 Answer 1


Your hostname must be an alias for in your /etc/hosts file to make it work.

aldwin@myhostname~$ cat /etc/hostname 
aldwin@myhostname:~$ hostname
aldwin@myhostname:~$ cat /etc/hosts   localhost   myhostname

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.