replica sets 1.6

44 views
Skip to first unread message

satish

unread,
Aug 8, 2010, 7:30:04 AM8/8/10
to mongodb-user
Mac OSX 10.6.4
>> Went thru http://www.mongodb.org/display/DOCS/Replica+Set+Tutorial
>> Worked as advertised.
>> Killed all 3 servers for negative test (kill -9)
>> removed mongod.lock from each of the 3 dbs and tried to repair..
>> got the following error:
> db.repairDatabase()
*********************
0x10007c7f2 0x10022a075 0x10022bcee 0x10027f39e 0x10030a5c2
0x1002f94b1 0x1002fad98 0x1001336c4 0x1001373e8 0x10025f360
0x100266145 0x10039b422 0x1003acf94 0x7fff88e6e456 0x7fff88e6e309
0 mongod 0x000000010007c7f2
_ZN5mongo11msgassertedEiPKc + 354
1 mongod 0x000000010022a075
_ZN5mongo6Cloner2goEPKcRSsRKSsbbbb + 1685
2 mongod 0x000000010022bcee
_ZN5mongo9cloneFromEPKcRSsRKSsbbbb + 62
3 mongod 0x000000010027f39e
_ZN5mongo14repairDatabaseESsRSsbb + 894
4 mongod 0x000000010030a5c2
_ZN5mongo17CmdRepairDatabase3runERKSsRNS_7BSONObjERSsRNS_14BSONObjBuilderEb
+ 466
5 mongod 0x00000001002f94b1
_ZN5mongo11execCommandEPNS_7CommandERNS_6ClientEiPKcRNS_7BSONObjERNS_14BSONObjBuilderEb
+ 1457
6 mongod 0x00000001002fad98
_ZN5mongo12_runCommandsEPKcRNS_7BSONObjERNS_10BufBuilderERNS_14BSONObjBuilderEbi
+ 2792
7 mongod 0x00000001001336c4
_ZN5mongo11runCommandsEPKcRNS_7BSONObjERNS_5CurOpERNS_10BufBuilderERNS_14BSONObjBuilderEbi
+ 52
8 mongod 0x00000001001373e8
_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_ +
6760
9 mongod 0x000000010025f360
_ZN5mongo13receivedQueryERNS_6ClientERNS_10DbResponseERNS_7MessageE +
608
10 mongod 0x0000000100266145
_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_8SockAddrE
+ 5029
11 mongod 0x000000010039b422
_ZN5mongo10connThreadEPNS_13MessagingPortE + 562
12 mongod 0x00000001003acf94
thread_proxy + 132
13 libSystem.B.dylib 0x00007fff88e6e456
_pthread_start + 331
14 libSystem.B.dylib 0x00007fff88e6e309
thread_start + 13
{
"errmsg" : "exception: bad system.namespaces object { $err: \"not
master\", code: 10107 }",
"code" : 10290,
"ok" : 0
}
*******************
>> All attempts to initialize rs resulted in the following:
*******************
{
"errmsg" : "local.oplog.rs is not empty on the initiating member.
cannot initiate.",
"ok" : 0
}
********************
>> is the repair functionality broken in 1.6?

Eliot Horowitz

unread,
Aug 8, 2010, 8:12:33 AM8/8/10
to mongod...@googlegroups.com
With replica sets you should start with --repair. Can you try that?

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

satish

unread,
Aug 8, 2010, 12:14:55 PM8/8/10
to mongodb-user
I had done that Sir..Sorry i missed mentioning that the last time
around.
Your help is much appreciated.
Thanks

On Aug 8, 5:12 pm, Eliot Horowitz <eliothorow...@gmail.com> wrote:
> With replica sets you should start with --repair.   Can you try that?
>
> On Aug 8, 2010, at 7:30 AM, satish <satish.m...@gmail.com> wrote:
>
>
>
> > Mac OSX 10.6.4
> >>> Went thruhttp://www.mongodb.org/display/DOCS/Replica+Set+Tutorial

Eliot Horowitz

unread,
Aug 8, 2010, 12:56:26 PM8/8/10
to mongod...@googlegroups.com
Do you mean it's working now or still not

satish

unread,
Aug 8, 2010, 11:09:52 PM8/8/10
to mongodb-user
It is NOT working.

On Aug 8, 9:56 pm, Eliot Horowitz <eliothorow...@gmail.com> wrote:
> Do you mean it's working now or still not
>

Eliot Horowitz

unread,
Aug 8, 2010, 11:10:36 PM8/8/10
to mongod...@googlegroups.com
Can you send the output when you try to run with --repair?
That is what we need to fix first I think.

satish

unread,
Aug 9, 2010, 12:55:24 AM8/9/10
to mongodb-user
***********************************
Mon Aug 9 09:57:47 MongoDB starting : pid=914 port=27017 dbpath=/
Users/satish/data/db1 64-bit
Mon Aug 9 09:57:47 db version v1.6.0, pdfile version 4.5
Mon Aug 9 09:57:47 git version:
2c7f164b653f0d703947572ede064aed41cc2185
Mon Aug 9 09:57:47 sys info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel
Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/
RELEASE_I386 i386 BOOST_LIB_VERSION=1_37
Mon Aug 9 09:57:47 [initandlisten] ****
Mon Aug 9 09:57:47 [initandlisten] ****
Mon Aug 9 09:57:47 [initandlisten] need to upgrade database local
with pdfile version 4.5, new version: 4.5
Mon Aug 9 09:57:47 [initandlisten] starting upgrade
Mon Aug 9 09:57:47 [initandlisten] local repairDatabase local
Mon Aug 9 09:57:47 allocating new datafile /Users/satish/data/
db1/$tmp_repairDatabase_0/local.ns, filling with zeroes...
Mon Aug 9 09:57:47 done allocating datafile /Users/satish/data/
db1/$tmp_repairDatabase_0/local.ns, size: 16MB, took 0.012 secs
Mon Aug 9 09:57:47 allocating new datafile /Users/satish/data/
db1/$tmp_repairDatabase_0/local.0, filling with zeroes...
Mon Aug 9 09:57:47 done allocating datafile /Users/satish/data/
db1/$tmp_repairDatabase_0/local.0, size: 64MB, took 0.12 secs
Mon Aug 9 09:57:48 allocating new datafile /Users/satish/data/
db1/$tmp_repairDatabase_0/local.1, filling with zeroes...
Mon Aug 9 09:57:48 done allocating datafile /Users/satish/data/
db1/$tmp_repairDatabase_0/local.1, size: 128MB, took 0.119 secs
Mon Aug 9 09:57:50 allocating new datafile /Users/satish/data/
db1/$tmp_repairDatabase_0/local.2, filling with zeroes...
Mon Aug 9 09:57:50 done allocating datafile /Users/satish/data/
db1/$tmp_repairDatabase_0/local.2, size: 256MB, took 0.235 secs
Mon Aug 9 09:57:53 [initandlisten] building new index on { _id: 1 }
for local.slaves
Mon Aug 9 09:57:53 [initandlisten] Buildindex local.slaves idxNo:0
{ name: "_id_", ns: "local.slaves", key: { _id: 1 } }
Mon Aug 9 09:57:53 [initandlisten] done for 2 records 0.001secs
Mon Aug 9 09:57:54 [initandlisten] finished checking dbs
Mon Aug 9 09:57:54 dbexit:

Mon Aug 9 09:57:54 [initandlisten] shutdown: going to close
listening sockets...
Mon Aug 9 09:57:54 [initandlisten] shutdown: going to flush
oplog...
Mon Aug 9 09:57:54 [initandlisten] shutdown: going to close
sockets...
Mon Aug 9 09:57:54 [initandlisten] shutdown: waiting for fs
preallocator...
Mon Aug 9 09:57:54 [initandlisten] shutdown: closing all
files...
Mon Aug 9 09:57:54 closeAllFiles() finished

Mon Aug 9 09:57:54 [initandlisten] shutdown: removing fs lock...
Mon Aug 9 09:57:54 dbexit: really exiting now

****************************************

Here you go..thanks

Eliot Horowitz

unread,
Aug 9, 2010, 12:58:21 AM8/9/10
to mongod...@googlegroups.com
Ok - and after that - what happens when you bring it up?
You shouldn't need to run repairDatabase any more

satish

unread,
Aug 9, 2010, 1:15:50 AM8/9/10
to mongodb-user
Database(s) come(s) up - no issues.

When i try to initiate the replica set, i get the following error:

*****************************
> rs.status()
{
"startupStatus" : 3,
"errmsg" : "can't get local.system.replset config from self or any
seed (EMPTYCONFIG)",
"ok" : 0
}
> config = {_id: 'test', members: [
... {_id: 0, host: 'localhost:10001'},
... {_id: 1, host: 'localhost:10002'},
... {_id: 2, host: 'localhost:10003'}]}
{
"_id" : "test",
"members" : [
{
"_id" : 0,
"host" : "localhost:10001"
},
{
"_id" : 1,
"host" : "localhost:10002"
},
{
"_id" : 2,
"host" : "localhost:10003"
}
]
}
> rs.initiate(config);
{
"errmsg" : "local.oplog.rs is not empty on the initiating member.
cannot initiate.",
"ok" : 0
}

******************************

Thx & rgds

Tim Hawkins

unread,
Aug 9, 2010, 2:33:14 AM8/9/10
to mongod...@googlegroups.com
you cant use localhost as a member name in a replica set

use the machine name as returned by "hostname" command

satish

unread,
Aug 9, 2010, 2:54:21 AM8/9/10
to mongodb-user
Does'nt make a diff...

****************************
satish@smmac:~ >> mongo localhost:10001
MongoDB shell version: 1.6.0
connecting to: localhost:10001/test
> config = {_id: 'test', members: [
... {_id: 0, host: 'smmac.local:10001'},
... {_id: 1, host: 'smmac.local:10002'},
... {_id: 2, host: 'smmac.local:10003'}]}
{
"_id" : "test",
"members" : [
{
"_id" : 0,
"host" : "smmac.local:10001"
},
{
"_id" : 1,
"host" : "smmac.local:10002"
},
{
"_id" : 2,
"host" : "smmac.local:10003"
}
]
}
> rs.initiate(config);
{
"errmsg" : "local.oplog.rs is not empty on the initiating member.
cannot initiate.",
"ok" : 0
}

*****************************

> ...
>
> read more »

Eliot Horowitz

unread,
Aug 9, 2010, 7:11:21 AM8/9/10
to mongod...@googlegroups.com
Why are you trying to initiate?
It should continue from the old configuration?

Paul

unread,
Aug 11, 2010, 11:44:06 AM8/11/10
to mongodb-user
I am experiencing a similar problem. I had a replica set succesfully
up and running on 1.6.0 (3 mongod processes spread across 3 VM's). I
bounced the three VM's, removed the locks, ran with --repair and then
restarted each process. At startup each mongod process gives the
error "replSet can't get local.system.replset config from self or any
seed (EMPTYCONFIG)". Logging in to one mongod process to
rs.initiate() gives the error "local.oplog.rs is not empty on the
initiating member. cannot initate." I have tried starting up the
mongod process two ways: (1) with just "--replSet foo" as well as (2)
with "--replSet foo/serverB,serverC" but I get the same error either
way. Is there something specific I need to do in order to have the
replica set preserved across restarts?

Any advice is greatly appreciated!

Thank you!

- Paul
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

Kyle Banker

unread,
Aug 11, 2010, 1:35:09 PM8/11/10
to mongodb-user
Created a JIRA issue for this. Please track, and report any other
observations, here:
http://jira.mongodb.org/browse/SERVER-1614
> ...
>
> read more »

dwight_10gen

unread,
Aug 11, 2010, 5:06:41 PM8/11/10
to mongodb-user
Workaround / fix procedure posted in the jira comments.
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages