[SERVER-3953] Cannot initialize set when using --keyFile Created: 26/Sep/11  Updated: 11/Jul/16  Resolved: 30/Sep/11

Status: Closed
Project: Core Server
Component/s: Replication, Security
Affects Version/s: 2.0.0
Fix Version/s: 2.0.1, 2.1.0

Type: Bug Priority: Major - P3
Reporter: Kristina Chodorow (Inactive) Assignee: Kristina Chodorow (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

http://groups.google.com/group/mongodb-user/browse_thread/thread/db02517210b6a706



 Comments   
Comment by Bernie David [ 25/Nov/11 ]

I just wiped the same node three times trying to reproduce the exact error and I couldn't, so the circumstances must have been more complex than just a wipe and resync. There were also mongodb restarts and attempts to rs.reconfig going on at the same time, so I won't open a new ticket till I can reproduce the problem.

I will say that removing the --keyFile parameter (and then restoring after initial sync) was the fix to my previous problem, so I am probably only slightly crazy.

Thanks for your quick response.

Comment by Eliot Horowitz (Inactive) [ 25/Nov/11 ]

@bernie - can you open a new ticket with exactly what's happening in your case?

Comment by Bernie David [ 25/Nov/11 ]

I'm glad I found this bug because I was going bonkers trying to figure out why my sharded replica sets, protected by --keyFile (and --auth) would not allow a new node or a wiped node to initialize unless I removed --keyFile.

Maybe I can bring in new members by a dump/restore and not through a rebuild sync. If I take away the keyfile setting to do an initialize – even for a minute – I am killing my shard. This is definitely not good.

My version is 2.0.1 so the fix is not working for me, as far as I can tell.

Comment by auto [ 09/Oct/11 ]

Author:

{u'login': u'kchodorow', u'name': u'Kristina', u'email': u'kristina@10gen.com'}

Message: check auth on _isSelf call SERVER-3953
Branch: v2.0
https://github.com/mongodb/mongo/commit/56b7cf65d1e646625af6cc2b0ff5285b6fbcb322

Comment by Kristina Chodorow (Inactive) [ 30/Sep/11 ]

Great! I built what I was pretty sure was the fix into the custom build, so glad that worked out. I'll request a backport to 2.0.1, watch this ticket to see if it makes it into 2.0.1 or just 2.1.0.

Comment by auto [ 30/Sep/11 ]

Author:

{u'login': u'kchodorow', u'name': u'Kristina', u'email': u'kristina@10gen.com'}

Message: check auth on _isSelf call SERVER-3953
Branch: master
https://github.com/mongodb/mongo/commit/d1971ceebde51446fd5773f3578fd9eee9bd5cb1

Comment by Rasitha Wijesinghe [ 30/Sep/11 ]

FYI - tried updating my existing dev replica set (node by node without creating downtime) and that also worked well. I didn't test reading/writing data while the replica set was running both versions side by side, but at least from the logs and http interface, everything looked good. And within few minutes I was able to upgrade other two nodes in the replica set.

Comment by Rasitha Wijesinghe [ 30/Sep/11 ]

That version is working correctly. Was able to create an admin user, add a second node and an arbiter to the replica set configuration. Everything seems to be working correctly. Looks like next week Thursday we should be able to get the release version of this?

Thanks for getting to this quickly.

Here's the log:

 
Thu Sep 29 20:22:44 [initandlisten] MongoDB starting : pid=3976 port=10001 dbpath=F:\mongodb\MONGODEVREPLSETB\data 64-bit host=MONGODEV1
Thu Sep 29 20:22:44 [initandlisten] 
Thu Sep 29 20:22:44 [initandlisten] ** NOTE: This is a development version (2.1.0-pre-) of MongoDB.
Thu Sep 29 20:22:44 [initandlisten] **       Not recommended for production.
Thu Sep 29 20:22:44 [initandlisten] 
Thu Sep 29 20:22:44 [initandlisten] db version v2.1.0-pre-, pdfile version 4.5
Thu Sep 29 20:22:44 [initandlisten] git version: 4193d05ba7ca659b78d561ae00ce7eefd7b38dd9
Thu Sep 29 20:22:44 [initandlisten] build info: windows (6, 1, 7601, 2, 'Service Pack 1') BOOST_LIB_VERSION=1_42
Thu Sep 29 20:22:44 [initandlisten] options: { config: "F:\mongodb\MONGODEVREPLSETB\conf\mongodb.conf", dbpath: "F:\mongodb\MONGODEVREPLSETB\data", keyFile: "F:\mongodb\MONGODEVREPLSETB\conf\key", logappend: "true", logpath: "F:\logs\MONGODEVREPLSETB\log.log", port: 10001, replSet: "B", rest: "true", service: true }
Thu Sep 29 20:22:44 [initandlisten] journal dir=F:/mongodb/MONGODEVREPLSETB/data/journal
Thu Sep 29 20:22:44 [initandlisten] recover : no journal files present, no recovery needed
Thu Sep 29 20:22:44 [initandlisten] waiting for connections on port 10001
Thu Sep 29 20:22:44 [rsStart] initializing _isSelf id to 4e8519e4b163f8c91d2bb291
Thu Sep 29 20:22:44 [websvr] admin web console waiting for connections on port 11001
Thu Sep 29 20:22:44 [initandlisten] connection accepted from 127.0.0.1:58929 #1 (1 connection now open)
Thu Sep 29 20:22:44 [conn1]  authenticate: { authenticate: 1, nonce: "e08b235bb4e96cbc", user: "__system", key: "4d283dbded23e09424ca8b4263c34add" }
Thu Sep 29 20:22:44 [conn1] in _isSelf: appending 4e8519e4b163f8c91d2bb291
Thu Sep 29 20:22:44 [rsStart] found myself? 1
Thu Sep 29 20:22:44 [conn1] end connection 127.0.0.1:58929 (0 connections now open)
Thu Sep 29 20:22:44 [initandlisten] connection accepted from 127.0.0.1:58930 #2 (1 connection now open)
Thu Sep 29 20:22:44 [conn2]  authenticate: { authenticate: 1, nonce: "9f72a3a693ebb034", user: "__system", key: "b11cb4d1ac0dd38ffa25504585adad04" }
Thu Sep 29 20:22:44 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Thu Sep 29 20:22:44 [rsStart] replSet info you may need to run replSetInitiate -- rs.initiate() in the shell -- if that is not already done
Thu Sep 29 20:22:54 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Thu Sep 29 20:23:04 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
Thu Sep 29 20:23:08 [initandlisten] connection accepted from 127.0.0.1:58939 #3 (2 connections now open)
Thu Sep 29 20:23:08 [conn3] note: no users configured in admin.system.users, allowing localhost access
Thu Sep 29 20:23:12 [conn3] replSet replSetInitiate admin command received from client
Thu Sep 29 20:23:12 [conn3] replSet info initiate : no configuration specified.  Using a default configuration for the set
Thu Sep 29 20:23:12 [conn3] replSet created this configuration for initiation : { _id: "B", members: [ { _id: 0, host: "MONGODEV1:10001" } ] }
Thu Sep 29 20:23:12 [conn3] replSet replSetInitiate config object parses ok, 1 members specified
Thu Sep 29 20:23:12 [conn3] checking members are up for config change
Thu Sep 29 20:23:12 [conn3] calling isSelf()
Thu Sep 29 20:23:12 [conn3] initializing _isSelf id to 4e8519e4b163f8c91d2bb291
Thu Sep 29 20:23:12 [initandlisten] connection accepted from 192.168.3.153:58940 #4 (3 connections now open)
Thu Sep 29 20:23:12 [conn4]  authenticate: { authenticate: 1, nonce: "ad2ed605c17e4c6a", user: "__system", key: "e3bdaeea950bda35ad22a674b399133a" }
Thu Sep 29 20:23:12 [conn4] in _isSelf: appending 4e8519e4b163f8c91d2bb291
Thu Sep 29 20:23:12 [conn3] found myself? 1
Thu Sep 29 20:23:12 [conn3] me is 1
Thu Sep 29 20:23:12 [conn3] replSet replSetInitiate all members seem up
Thu Sep 29 20:23:12 [conn3] ******
Thu Sep 29 20:23:12 [conn3] creating replication oplog of size: 4578MB...
Thu Sep 29 20:23:12 [conn4] end connection 192.168.3.153:58940 (2 connections now open)
Thu Sep 29 20:23:12 [conn3] ******
Thu Sep 29 20:23:12 [conn3] replSet info saving a newer config version to local.system.replset
Thu Sep 29 20:23:12 [conn3] replSet saveConfigLocally done
Thu Sep 29 20:23:12 [conn3] replSet replSetInitiate config now saved locally.  Should come online in about a minute.
Thu Sep 29 20:23:14 [rsStart] replSet STARTUP2
Thu Sep 29 20:23:14 [rsSync] replSet SECONDARY
Thu Sep 29 20:23:30 [rsSync] waiting for 2 pings from other members before syncing
Thu Sep 29 20:23:31 [rsMgr] replSet info electSelf 0
Thu Sep 29 20:23:31 [rsMgr] replSet PRIMARY
Thu Sep 29 20:23:44 [clientcursormon] mem (MB) res:49 virt:12537 mapped:6221
Thu Sep 29 20:23:45 [DataFileSync] FlushViewOfFile failed 33 file: F:/mongodb/MONGODEVREPLSETB/data/local.3
 

Comment by Kristina Chodorow (Inactive) [ 29/Sep/11 ]

Okay! That took forever to build.

Can you try running rs.initiate() with this and paste the logs: http://downloads.mongodb.org/win32/mongodb-win32-x86_64-rsinit-latest.zip

Comment by Rasitha Wijesinghe [ 29/Sep/11 ]

Yes, Win 64bit. Thx!

Comment by Kristina Chodorow (Inactive) [ 29/Sep/11 ]

Great, thanks! What environment are you on? Windows 64-bit?

Comment by Rasitha Wijesinghe [ 29/Sep/11 ]

I wasn't using --bind_ip.

Yes, I can try a custom build. Please let me know where I can download the files.

Thanks!

Comment by Kristina Chodorow (Inactive) [ 29/Sep/11 ]

Are you using --bind_ip? Would you be willing to try a custom build?

Generated at Thu Feb 08 03:04:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.