Error When adding a member to existing Replica set

106 views
Skip to first unread message

mongouser

unread,
Apr 9, 2012, 5:48:53 PM4/9/12
to mongodb-user
Hello,

I have a replicaset (V2.02) setup running (1primary, 1 secondary & 1
arbiter) on three different servers.Now i am trying to added a 4th
member priority 0 and Hidden : true for taking backups on the second
server (So now i will be having two instances of mongo running on
second server and writing data on two diff filesystems)

I copied the dbpath from existing secondary on to another filesystem
and started a the replicaset with following command.

nohup ./mongod --rest --port 25017 --replSet myset --oplogSize=30000 --
dbpath /backups/mongodata/data/db --fork --logpath /backups/mongodata/
data/mongologs&

The port for secondary which was already running on this server was
running on 27017.

After running the above command i see following error message in the
log file.

Tue Apr 10 07:24:19 [rsStart] replSet info Couldn't load config yet.
Sleeping 20sec and will try again.
Tue Apr 10 07:24:39 [rsStart] trying to contact 10.156.240.143:26017
Tue Apr 10 07:24:47 [rsStart] DBClientCursor::init call() failed
Tue Apr 10 07:24:47 [rsStart] replSet error self not present in the
repl set configuration:
Tue Apr 10 07:24:47 [rsStart] { _id: "myset", version: 1, members:
[ { _id: 0, host: "10.156.240.142:27017" }, { _id: 1, host:
"10.156.240.143:27017" }, { _id: 2, host: "10.156.
240.148:27017", arbiterOnly: true } ] }

I tried adding this member to the replicatsets and after doing rs
status() gives me the following

},
{
"_id" : 3,
"name" : "'aux1etl02-acb:25017",
"health" : 0,
"state" : 8,
"stateStr" : "(not reachable/healthy)",
"uptime" : 0,
"optime" : {
"t" : 0,
"i" : 0
},
"optimeDate" :
ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" :
ISODate("1970-01-01T00:00:00Z"),
"pingMs" : 0,
"errmsg" : "socket exception"
}
],
"ok" : 1
}

Is this normal? why am i getting socket exception and why is my log
saying "replSet error self not present in the repl set
configuration:" ??

What should i do??

Any advice greatly appreciated.

Thanks.

Eliot Horowitz

unread,
Apr 10, 2012, 2:26:34 AM4/10/12
to mongod...@googlegroups.com
Can you send rs.conf() and rs.status()

Also - can you try connecting to the new host via the name you put in
the rs config.
From the machine itself and from another machine.

> --
> 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.
>

mongouser

unread,
Apr 10, 2012, 1:47:51 PM4/10/12
to mongodb-user
Hi Eliot,

Yes i am able to connect to the new host from ETL1 server.

appsadm@aux1etl0-acb:/apps/mongo/bin> ./mongo --host 10.156.240.143 --
port 25017
MongoDB shell version: 2.0.2
connecting to: 10.156.240.143:25017/test
> show dbs
local 30.1884765625GB
ngcore 0.203125GB
test 0.203125GB

Follwoing is the rs.conf() and rs.status() info


PRIMARY> rs.status()
{
"set" : "myset",
"date" : ISODate("2012-04-10T17:37:43Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "10.156.240.142:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"optime" : {
"t" : 1334079442000,
"i" : 1
},
"optimeDate" :
ISODate("2012-04-10T17:37:22Z"),
"self" : true
},
{
"_id" : 1,
"name" : "10.156.240.143:27017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 70019,
"optime" : {
"t" : 1334079442000,
"i" : 1
},
"optimeDate" :
ISODate("2012-04-10T17:37:22Z"),
"lastHeartbeat" :
ISODate("2012-04-10T17:37:42Z"),
"pingMs" : 0
},
{
"_id" : 2,
"name" : "10.156.240.148:27017",
"health" : 1,
"state" : 7,
"stateStr" : "ARBITER",
"uptime" : 70019,
"optime" : {
"t" : 0,
"i" : 0
},
"optimeDate" :
ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" :
ISODate("2012-04-10T17:37:41Z"),
"pingMs" : 0
},
{
"_id" : 3,
"name" : "'10.156.240.143:25017",
"health" : 0,
"state" : 8,
"stateStr" : "(not reachable/healthy)",
"uptime" : 0,
"optime" : {
"t" : 0,
"i" : 0
},
"optimeDate" :
ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" :
ISODate("1970-01-01T00:00:00Z"),
"pingMs" : 0,
"errmsg" : "socket exception"
}
],
"ok" : 1
}
PRIMARY> rs.conf()
{
"_id" : "myset",
"version" : 6,
"members" : [
{
"_id" : 0,
"host" : "10.156.240.142:27017"
},
{
"_id" : 1,
"host" : "10.156.240.143:27017"
},
{
"_id" : 2,
"host" : "10.156.240.148:27017",
"arbiterOnly" : true
},
{
"_id" : 3,
"host" : "'10.156.240.143:25017",
"priority" : 0,
"hidden" : true
}
]
}
PRIMARY>

No sure what the problem is
> > For more options, visit this group athttp://groups.google.com/group/mongodb-user?hl=en.- Hide quoted text -
>
> - Show quoted text -

mongouser

unread,
Apr 11, 2012, 4:10:00 PM4/11/12
to mongodb-user
Hello Everyone,

I am still having this issue. Any suggestions as to what could be the
issue???

Thansk,
> > > For more options, visit this group athttp://groups.google.com/group/mongodb-user?hl=en.-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -

mpobrien

unread,
Apr 11, 2012, 4:36:48 PM4/11/12
to mongodb-user
What happens if you try rs.conf() and rs.status() from the mongo shell
on the new machine?
> > > > For more options, visit this group athttp://groups.google.com/group/mongodb-user?hl=en.-Hidequoted text -

mongouser

unread,
Apr 11, 2012, 5:40:57 PM4/11/12
to mongodb-user
Hi,

We can`t spin a new machine to check this as it is in prod. I am
creating slave on the exiting ETL server on with my secondary resides.

Thanks,
> > > > > For more options, visit this group athttp://groups.google.com/group/mongodb-user?hl=en.-Hidequotedtext -

mpobrien

unread,
Apr 12, 2012, 3:51:51 PM4/12/12
to mongodb-user
Hi,
Which are you referring to?
This new machine which you added to the replica set:
10.156.240.143
It's listed as not healthy/unreachable in the rs.status from the
primary.
But you were able to connect to it from the shell; it might be helpful
to see what rs.status+rs.conf are from the point of view of that
machine, to see if it can see any other members.
Also in your first post the hostname for the new member is shown as
"aux1etl02-acb:25017" are the host/dns settings different on the
machines in such a way that the new member doesn't recognize this
hostname as itself?
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages