replica set can't find self in new replset config

438 views
Skip to first unread message

Matthias Schaffer

unread,
Mar 12, 2012, 5:19:09 AM3/12/12
to mongodb-user
i want to setup a new replica set:

mongod --replSet test --oplogSize 200 --rest --port 5005 --dbpath c:/
db

mongo starts up.....

now i log into the mongo console with "mongo --port 5005"

rs.initiate()
rs.conf()
{
"_id" : "test",
"version" : 1,
"members" : [
{
"_id" : 0,
"host" : "myserver:5005"
}
]
}
rs.status()
{
"set" : "test",
"date" : ISODate("2012-03-12T09:04:58Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "myserver:5005",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"optime" : {
"t" : 1331542607000,
"i" : 1
},
"optimeDate" :
ISODate("2012-03-12T08:56:47Z"),
"self" : true
}
],
"ok" : 1
}

So far, so good.

Now i want to reconfigure my hostname to go "online"...

var c = rs.conf()
c.members[0].host="mycoolhostname.dyndns.org:5005"
rs.reconfig(c)
{
"assertion" : "can't find self in new replset config",
"assertionCode" : 13433,
"errmsg" : "db assertion failure",
"ok" : 0
}

even when i put my external ip into the host field, it doesn't work.

port 5005 is open and forwarded to my server.


any suggestions?

thanks in advance
Matthias Schaffer

Nat

unread,
Mar 12, 2012, 6:59:35 AM3/12/12
to mongod...@googlegroups.com
Do you have multiple network cards? If so you might try to use --bindip to bind it to external port. Otherwise, you can also add an entry to host file and make both internal ip and external ip resolved back to the same host name.
https://jira.mongodb.org/browse/SERVER-4189?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

Matthias Schaffer

unread,
Mar 12, 2012, 8:09:05 AM3/12/12
to mongod...@googlegroups.com, nat....@gmail.com
I have just one network card.

It works now after adding the dyndns hostname to my hosts file, resolving 127.0.0.1.

so... resolved ;)

just wondering why it works on two other machines at other locations...
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages