[SERVER-2692] ReplSets wont initiate in Windows Created: 07/Mar/11  Updated: 29/May/12  Resolved: 28/Oct/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 1.8.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Ed Rooth Assignee: Kristina Chodorow (Inactive)
Resolution: Incomplete Votes: 0
Labels: Windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Server 2008


Operating System: Windows
Participants:

 Description   

Everything is the same as when running 1.6.5, upgraded to 1.8.0-rc1 and now can't get the set to initialize.

Steps to reproduce:

Start up 3 replset nodes.
Connect via shell.
Define the config and execute rs.initiate(config)

Keep getting error:

{
"startupStatus" : 4,
"info" : "myReplset",
"errmsg" : "all members and seeds must be reachable to initiate set",
"ok" : 0
}

rs.initiate()
with no params doesn't work either doesnt work either.



 Comments   
Comment by Kristina Chodorow (Inactive) [ 28/Oct/11 ]

Please leave a comment or reopen if you're still around.

Comment by Kristina Chodorow (Inactive) [ 19/Oct/11 ]

Sorry about the delay! In 2.0.0, rs.initiate() will return what it thinks the name of the current server is. Can you try that and see what name it thinks it should be? Also, getting the logs from running with -vvvvv might help.

Comment by Ed Rooth [ 06/Apr/11 ]

By the way, just tried this with separate physical servers and everything works fine.
Seems to only be an issue with multiple instances on the same local machine.

Comment by Ed Rooth [ 06/Apr/11 ]

I tried again and removed all bind_ip lines from all config files.
So now the config files are the same as my comment on Mar 30 2011, but with no bind_ip.

Still having the same problem.

server reports the hostname as "BEAST-D-SQL-001"
In the replset config I use "BEAST-D-SQL-001".
When I connect with the shell I use: mongo --host BEAST-D-SQL-001
(also try IP address 192.168.50.48 with same error)

Comment by Ed Rooth [ 02/Apr/11 ]

Oh really?

I'm just using the # sign. Just like in all the examples.
I'll try removing that line completely and see if that works.

Comment by Kristina Chodorow (Inactive) [ 01/Apr/11 ]

I tried this on Windows Server 2008 and I get the same error, but only if I use bind_ip. How are you commenting it out of your config file?

Comment by Kristina Chodorow (Inactive) [ 01/Apr/11 ]

wait, scratch that. It's not even making it to saying EMPTYCONFIG. One sec.

Comment by Kristina Chodorow (Inactive) [ 01/Apr/11 ]

As a sanity check, can you paste the config you're initiating with?

Comment by Ed Rooth [ 01/Apr/11 ]

1. No firewall or anything weird like that. As I mentioned, the replset was running fine with the same configuration under 1.6.5. Same ports and everything. Only thing that has changed is the MongoDB bin files.

2. It is BEAST-D-SQL-001. I tried caps and lowercase in various combinations. Nothing seems to work.

3. hosts file has not been modified. Below is all that's there.

127.0.0.1 localhost
::1 localhost

Comment by Kristina Chodorow (Inactive) [ 31/Mar/11 ]

This is really weird, thanks for sticking with me. A couple more things to try/check:

1. Do you have any sort of firewall that you'll have to poke a hole in to access port 27017/27018/27019?

2. Can you try running

> db.serverStatus()

and pasting what's in the "host" field? Does it say beast-d-sql-001?

3. Can you paste the uncommented lines of WINDOWS\system32\drivers\etc\hosts? Can you run "ipconfig /displaydns" and paste any local-looking host records?

Comment by Ed Rooth [ 30/Mar/11 ]

Tried commenting it out and re-tried all 4 host configurations again, same error every time.

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

Can you comment out the bind_ip line in the config and try that? I think there is a bug in bind_ip in 1.8.

Comment by Ed Rooth [ 30/Mar/11 ]

Thanks.

Startup lines are simply:
mongod --config D:\path\to\config\filename.config

Started by 3 services running simultaneously on the same machine, each one pointing to a different config file. Those config file contents are below.

  1. primary node
    #===============
    dbpath = d:\db\mongodb\data\primary
    directoryperdb = true
    bind_ip = 192.168.50.48
    port = 27017
    logpath = d:\db\mongodb\logs\primary.log
    logappend = true
    noauth = true
    replSet = beastdsql001
    rest = true
  1. secondary node
    #===============
    dbpath = d:\db\mongodb\data\secondary
    directoryperdb = true
    bind_ip = 192.168.50.48
    port = 27018
    logpath = d:\db\mongodb\logs\secondary.log
    logappend = true
    noauth = true
    replSet = beastdsql001
    rest = true
  1. arbiter node
    #===============
    dbpath = d:\db\mongodb\data\arbiter
    directoryperdb = true
    bind_ip = 192.168.50.48
    port = 27019
    logpath = d:\db\mongodb\logs\arbiter.log
    logappend = true
    noauth = true
    replSet = beastdsql001
    rest = true
Comment by Kristina Chodorow (Inactive) [ 29/Mar/11 ]

Glad you made it through okay!

What's the startup line you're using and config file, if you're using one? Are you using bind_ip?

Comment by Ed Rooth [ 29/Mar/11 ]

Sorry for the late reply, things got shaken up a bit here in Tokyo.

hostname says "beast-d-sql-001" which is the name of the server.

I've tried 4 different variations of the config all of which fail with the same error.

127.0.0.1
localhost
192.168.50.48
beast-d-sql-001

By the way all 3 instances of the servers are running on the same machine.

Also tried 1.8.1-rc0 now with same issue.

Comment by Kristina Chodorow (Inactive) [ 08/Mar/11 ]

What does typing "hostname" say?

Comment by Ed Rooth [ 08/Mar/11 ]

I tried with ip and 'localhost' and neither worked.

Comment by Kristina Chodorow (Inactive) [ 08/Mar/11 ]

It looks like it can't figure out that you are localhost. Can you try initializing using your hostname or IP address?

Comment by Ed Rooth [ 08/Mar/11 ]

Mon Mar 07 17:32:59 [initandlisten] MongoDB starting : pid=3836 port=27017 dbpath=d:\db\mongodb\data\r0 64-bit
Mon Mar 07 17:32:59 [initandlisten] db version v1.8.0-rc1, pdfile version 4.5
Mon Mar 07 17:32:59 [initandlisten] git version: 87dd5720e48e875487d5fbd78cbe120d5a610973
Mon Mar 07 17:32:59 [initandlisten] build sys info: windows (6, 1, 7600, 2, '') BOOST_LIB_VERSION=1_42
Mon Mar 07 17:32:59 [initandlisten] waiting for connections on port 27017
Mon Mar 07 17:32:59 [websvr] web admin interface listening on port 28017
Mon Mar 07 17:33:00 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:33:01 [startReplSets] couldn't connect to localhost:27017: couldn't connect to server localhost:27017
Mon Mar 07 17:33:02 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:33:09 [initandlisten] connection accepted from 192.168.50.48:54090 #1
Mon Mar 07 17:33:13 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:33:14 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:33:21 [conn1] replSet replSetInitiate admin command received from client
Mon Mar 07 17:33:25 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:33:26 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:33:37 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:33:38 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:33:49 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:33:50 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:34:01 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:34:02 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:34:13 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:34:14 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:34:25 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:34:26 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:34:37 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:34:38 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:34:49 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:34:50 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:35:01 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:35:02 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:35:13 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:35:14 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:35:25 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:35:26 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:35:37 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:35:38 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:35:49 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:35:50 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:36:01 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:36:02 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:36:13 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:36:14 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:36:25 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:36:26 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:36:37 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:36:38 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:36:49 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:36:50 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:37:01 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:37:02 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:37:13 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:37:14 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:37:25 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:37:26 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:37:37 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:37:38 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:37:49 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:37:50 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:37:57 [conn1] replSet replSetInitiate admin command received from client
Mon Mar 07 17:38:01 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:38:02 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:38:13 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:38:14 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:38:25 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:38:26 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:38:37 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:38:38 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:38:49 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:38:50 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:39:01 [conn1] end connection 192.168.50.48:54090
Mon Mar 07 17:39:01 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:39:02 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:39:13 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:39:14 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:39:25 [startReplSets] trying to contact localhost:27017
Mon Mar 07 17:39:26 [startReplSets] replSet can't get local.system.replset config from self or any seed (yet)
Mon Mar 07 17:39:37 shutdown: going to close listening sockets...

Comment by Eliot Horowitz (Inactive) [ 07/Mar/11 ]

Can you send the log of the server where you run initiate

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